This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
library(tidyverse) | |
# Exercise 1 | |
years <- c("08", "10", "14", "16") | |
# append all IT datasets from 2008 to 2016 | |
it_df <- purrr::map_dfr(.x = years, | |
.f = ~read.LIS(glue::glue("it{.x}p"), vars = c("year", "educlev", "educ_c", "enroll", "sex", "age" ))) | |
table(it_df$educlev, it_df$educ_c) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# This is an example of how to read multiple files at once in LISSY | |
# To read multiple years of one country: | |
library(tidyverse) | |
years <- c("08", "10", "14", "16") | |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
library(lissyrtools) | |
library(magrittr) | |
files_h <- read_lissy_files(c("ca14h", "ca15h", "ca16h", "ca17h", "ca18h", "ca19h"), | |
col_select = "dhi") | |
files_p <- read_lissy_files(c("ca14p", "ca15p", "ca16p", "ca17p", "ca18p", "ca19p"), | |
col_select = c("pi11", "age")) | |
lissy_datasets <- merge_dataset_levels(files_h, files_p) |
OlderNewer