gather_years | R Documentation |
Gather columns beginning with 'CY', 'RY', 'PY', as well as columns that look like "naive" four-digit years.
gather_years( input_data, value_var, year_var = "year", pattern = "([CBRP]Y)?([0-9]{4})", na.rm = TRUE, verbose = getOption("verbose") )
input_data |
(tabular data) |
value_var |
(character or symbol) defaults to "ems_qty" |
year_var |
(character) |
pattern |
(regexp) gather columns matching this |
na.rm |
(logical) drop rows from output where value would be 'NA' |
verbose |
(logical) display messages |
tabular data with column 'year'
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.