add_year_column: Adds the year column

Description Usage Arguments Value Examples

View source: R/add_year_column.R

Description

This function works by extracting the year string contained in the data set name and appending a new column to the data set with the numeric value of the year. This means that the data sets have to have a name of the form data_set_2001 or data_2001_europe, etc

Usage

1
add_year_column(list_of_datasets)

Arguments

list_of_datasets

A list containing named datasets

Value

A list of datasets with the year column

Examples

1
2
3
4
5
6
7
8
## Not run: 
#`list_of_data_sets` is a list containing named data sets
# For example, to access the first data set, called dataset_1 you would
# write
list_of_data_sets$dataset_1
add_year_column(list_of_data_sets)

## End(Not run)

b-rodrigues/brotools documentation built on April 21, 2020, 2:27 p.m.