nth | R Documentation |
Every nth element of a vector.
nth(x, n, first = 1L)
x |
a vector (or a list) |
n |
an integer |
first |
where to start |
Subsets are chosen with Extract
, so for a list a new
list is returned.
a vector (or a list)
Enrico Schumann
Extract
nth(1:20, 2, 1)
nth(1:20, 2, 2)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.