powered by
Suppresses every n th element of a vector
every_nth(x, nth, empty = TRUE, inverse = FALSE)
a vector with the remaining values
a vector (numbers, integers, characters, you name it)
the multiple of position where the elements will be suppressed (nth + 1 actually) or kept (if inverse = T)
whether the suppressed element should be replaced by ""
opposite reaction: n th elements only will be kept
Adam D. Smith
practical usage of this function for axes: minorAxis
minorAxis
numvec <- 0:20 every_nth(numvec, 3) every_nth(numvec, 3, empty = FALSE) every_nth(numvec, 3, inverse = TRUE) every_nth(numvec, 3, empty = FALSE, inverse = TRUE)
Run the code above in your browser using DataLab