This function checks if a linking error data.frame is compatible with multiple trend eatGADS data bases.

checkLEs(filePaths, leDF)

Arguments

filePaths

Character vectors with at least two paths to the eatGADS db files.

leDF

Linking error data.frame.

Details

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.

Value

Returns a report list.

Examples

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.