powered by
Select every other (nth) element from a vector
every_other(x, n = 2, start = 1, fill = NULL)
Vector with elements removed
Vector to select (remove) elements from
Numeric value for the number of elements to skip. Default is 2, i.e. skips every second element
Numeric value to indicate which element of the vector to commence from.
Character string to be used in place of skipped element. By default is NULL and hence skipped elements are removed rather than replaced.
NULL
every_other(x = letters) every_other(LETTERS, n = 3, start = 6) every_other(x = letters, fill = "")
Run the code above in your browser using DataLab