powered by
Returns the n highest/lowest observations from a numeric vector.
tailobs(data, n, type = c("low", "high"))
a numeric vector
number of observations to be returned
if low, the n lowest observations are returned, else the highest n obervations are returned
low
n
n highest/lowest observations from data
data
Any NA values are stripped from data before computation takes place.
top_n
tailobs(mtcars$mpg, 5) tailobs(mtcars$mpg, 5, type = "high")
Run the code above in your browser using DataLab