Recode_vars: Update values to fit 2018

Description Usage Arguments See Also Examples

View source: R/lucas.r

Description

Updates values in all tables to fit the last survey (2018) in terms of the coding of different variables; update is based on pre-made mappings

Usage

1
Recode_vars(con, csv, years, nonHarmonizeableVars)

Arguments

con

Connection to db

csv

CSV file that holds the pre-prepared variable mappings

years

Numeric vector of years to be harmonised

nonHarmonizeableVars

Characer vector of variables that cannot be harmonized between the years. These pertain to the variables which have been collected at the earlier stages (before 2018) of survey as ordered categorical variables, and at later stages (at and later than (?) 2018) - as discrete numbers. Such attributes are lc1/2_perc, lu1/2_perc and soil_stones_perc.

See Also

To create the conection please see Connect_to_db

Examples

1
2
3
## Not run: 
Recode_vars(con, '/data/LUCAS_harmo/data/mappings/RecodeVars.csv', c(2006, 2009, 2012, 2015, 2018))
## End(Not run)

lucas documentation built on Oct. 23, 2020, 7:55 p.m.

Related to Recode_vars in lucas...