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.