This function perform some check on the data
The function only works for FAOST_CODE. If the country coding system is not in FAOST_CODE then use the translateCountryCode function to translate it.
FAOcheck(
var,
year = "Year",
data,
type = c("overlap", "multiChina"),
take = c("simpleCheck", "takeNew", "takeOld", "complete")
)var |
The variable to be checked. |
year |
The column which index the time. |
data |
The data frame. |
type |
The type of check. |
take |
The type of check/replacement to be done in case of type equals to overlap. |
## test.df = ## data.frame(FAOST_CODE = rep(c(51,167,199), each = 3), ## Year = rep(c(1990:1992), 3), ## Value = c(c(3,4,4), c(2,2,2), c(1,2,NA))) ## FAOcheck(var = "Value", data = test.df, type = "overlap", take = "simpleCheck") ## FAOcheck(var = "Value", data = test.df, type = "overlap", take = "takeNew") ## FAOcheck(var = "Value", data = test.df, type = "overlap", take = "takeOld") ## FAOcheck(var = "Value", data = test.df, type = "overlap", take = "complete")
Please choose more modern alternatives, such as Google Chrome or Mozilla Firefox.