combine_nsu_across_dirs: Combine all NSU data of the same type across food group...

Description Usage Arguments

Description

Apply combine_nsu_in_dir() iteratively to each food group folders. Combine the data. Combine value labels. Save the output to combined data to disk in Stata format.

Usage

1
2
3
4
5
6
7
combine_nsu_across_dirs(
  dir_in,
  dir_regexp = "_STATA_",
  data_type,
  df_type,
  dir_out
)

Arguments

dir_in

Character. Root directory where food group sub-directories are located.

dir_regexp

Character. Regular expression to identify folders over which to iterate.

data_type

Character. One of: "consumption", "production". For data from markets, "consumption"; for data from farmers, "production".

df_type

Character. For consumption data, one of : "unitesFixes", "releve", "unitesautre1", "autre1releve", "unitesautre2", "autre2releve" For production data, one of: "unitesFixes", "unitesAutre1", "unitesAutre2"

dir_out

Character. Directory where combined files should be saved.


arthur-shaw/nsuoutils documentation built on Dec. 19, 2021, 4:41 a.m.