View source: R/ch_sub_set_Years.R
ch_sub_set_Years | R Documentation |
Sub-samples a vector every n places. Many times there are so many
years the labels on the plot overlap. ch_sub_set_years
returns the position and label
for the subset. The function can be used on any type of simple array.
ch_sub_set_Years(years, n)
years |
a vector of years |
n |
sample size |
a list containing:
position |
array of axis positions |
label |
array of labels |
Paul Whitfield
myears <- c(1900:2045)
myears <- ch_sub_set_Years(myears, 20)
myears
a <- LETTERS
my_alpha <- ch_sub_set_Years(a, 5)
my_alpha
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.