checkLEs.Rd
This function checks if a linking error data.frame
is compatible with multiple trend eatGADS
data bases.
checkLEs(filePaths, leDF)
This function inspects whether all linking error variables correspond to variables in the eatGADS
data base
and if the key variables also correspond to existing variables in the trend eatGADS
data bases.
Returns a report list.
trenddat1 <- system.file("extdata", "trend_gads_2010.db", package = "eatGADS")
trenddat2 <- system.file("extdata", "trend_gads_2015.db", package = "eatGADS")
trenddat3 <- system.file("extdata", "trend_gads_2020.db", package = "eatGADS")
load(system.file("extdata", "linking_error.rda", package = "eatRep"))
check1 <- checkLEs(c(trenddat1, trenddat2, trenddat3), lErr)
#> The following variables have linking errors but are not variables in data base 1: 'value', 'valueTransfBista'
#> The following variables have linking errors but are not variables in data base 2: 'value', 'valueTransfBista'
#> The following variables have linking errors but are not variables in data base 3: 'value', 'valueTransfBista'
check2 <- checkLEs(c(trenddat1, trenddat2, trenddat3), lErr[1:14,])
#> The following variables have linking errors but are not variables in data base 1: 'value', 'valueTransfBista'
#> The following variables have linking errors but are not variables in data base 2: 'value', 'valueTransfBista'
#> The following variables have linking errors but are not variables in data base 3: 'value', 'valueTransfBista'
#> Warning: Number of trend levels do not match: Expect 3 trend levels in data base ('filePaths' has length 3). 2 trend levels for linking errors ('2010', '2015') found.