Last data update: 2014.03.03
|
R: Return the nth item from a vector
Return the nth item from a vector
Description
Return the nth item from a vector
Usage
nth(x, n, default = NA)
Arguments
x |
Vector
|
n |
The n in nth
|
default |
Value to pad missing data with
|
Value
nth item from vector
See Also
Other utility functions: between ,
cumall , cumany ,
cummean , distribute ,
first , lag ,
last , lead ,
n_distinct , n_groups ,
n
Examples
nth (1:10, 5)
nth (1:10, 11, default=123)
Results
|