ntop() returns the top 'n' elements of a vector or per vector in a list.

ntop(x, n, remove.lower = FALSE)

Arguments

x

A vector or list.

n

Number of elements to return.

remove.lower

Remove vectors that have fewer than 'n' elements. Default: FALSE

Value

A vector or list of the same type as 'x', with a maximum of 'n' elements per vector.