## create an example GADSdat
example_df <- data.frame(ID = 1:4,
age = c(12, 14, 16, 13),
citizenship1 = c("German", "English", "Polish", "Chinese"),
citizenship2 = c(NA, "German", "Chinese", "Polish"),
stringsAsFactors = TRUE)
gads <- import_DF(example_df)
## remove variables from GADSdat
gads2 <- removeVars(gads, vars = c("citizenship2", "age"))
## extract GADSdat with specific variables
gads3 <- extractVars(gads, vars = c("ID", "citizenship1"))
Run the code above in your browser using DataLab