This step by step function guides users to import data from a Demographic and Health Survey (DHS) and create an object of class prevR.
DHS data (one individual per line) in SPSS format (.sav), downloaded from https://www.dhsprogram.com/. Could also be directly a data.frame.
GPS position of clusters in DATABASE format (.dbf), downloaded from https://www.dhsprogram.com/. Could also be directly a data.frame.
If you don't provide the precise path of files, R will check the working directory
base::setwd()). To specify the file path, see
This function was developed specifically for importing DHS.
For a generic function for creating an object of class prevR,
as.prevR(), prevR class.
1 2 3 4
## Not run: imported_data <- import.dhs("data.sav", "gps.dbf") ## End(Not run)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.