My raw data is in several Excel files, some for data and other for metadata. The simpler solution is to import data and metadata to SPSS. But I wanted to know if there is an R similar solution for this problem.
Here is an example using two csv files. But I have a problem with value labels.
> data
# A tibble: 6 × 2
se ctr
<chr> <chr>
1 1 1
2 1 2
3 2 3
4 2 2
5 1 1
6 2 3
> metadata
# A tibble: 2 × 3
var var_label val_lab
<chr> <chr> <chr>
1 se sex (1,'Female'),(2,'Male')
2 ctr country (1,'UK'),(2,'USA'),(3,'France')