ds_tailobs {descriptr}R Documentation

Tail Observations

Description

Returns the n highest/lowest observations from a numeric vector.

Usage

ds_tailobs(data, n, type = c("low", "high"))

Arguments

data

a numeric vector

n

number of observations to be returned

type

if low, the n lowest observations are returned, else the highest n obervations are returned

Details

Any NA values are stripped from data before computation takes place.

Value

n highest/lowest observations from data

See Also

top_n

Examples

ds_tailobs(mtcarz$mpg, 5)
ds_tailobs(mtcarz$mpg, 5, type = "high")

[Package descriptr version 0.5.2 Index]