# Recode_vars

From lucas v1.0
0th

Percentile

##### Update values to fit 2018

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
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.

To create the conection please see Connect_to_db

• Recode_vars
##### Examples
# NOT RUN {
Recode_vars(con, '/data/LUCAS_harmo/data/mappings/RecodeVars.csv', c(2006, 2009, 2012, 2015, 2018))
# }

Documentation reproduced from package lucas, version 1.0, License: GPL (>= 3)

### Community examples

Looks like there are no examples yet.