An agrisvy object are used to store useful information that help generate files, folders scripts but most importantly customize pre-populated scripts and anonymization report template. It is used as input by some bulk run function for pre-processing, anonymization archiving, etc.

createAgrisvy(
  svyName = "[Survey name]",
  author = "[Author]",
  language = "en",
  workingDir = NULL,
  dataDir = NULL,
  type = NULL
)

Arguments

svyName

Name of the survey (will be used in the code comments and to customize the anonymization report)

author

Author or institution (ex. "FAO")

language

Language (used to customize the language of folder names and the anonymization report). The possible values are "en" for English, "fr" for French and "es" for Spanish. The default value is "en".

workingDir

path to the working directory (where the anonymization working folder will be generated). It is recommended for this folder to be empty.

dataDir

path to the folder where the data to be anonymized are located

type

Format of the microdata. The possible values are ".dta" for STATA, ".sav" for SPSS

Value

an agrisvy object

Examples

if (FALSE) {
agrissvy_obj=createAgrisvy(
                svyName = "AGRIS SURVEY 2023",
                author = "AgriSurvey Team",
                language = "en",
                workingDir = "C/Documents/anonymization",
                dataDir = "C/Documents/AgrisData",
                type = ".dta"
                )

agrissvy_obj
}