import.dhs: Import DHS data.

Description Usage Arguments Note See Also Examples

View source: R/import.dhs.prevR.r

Description

This step by step function guides users to import data from a Demographic and Health Survey (DHS) and create an object of class prevR.

Usage

1
import.dhs(file.sav, file.dbf)

Arguments

file.sav

DHS data (one individual per line) in SPSS format (.sav), downloaded from https://www.dhsprogram.com/. Could also be directly a data.frame.

file.dbf

GPS position of clusters in DATABASE format (.dbf), downloaded from https://www.dhsprogram.com/. Could also be directly a data.frame.

Note

If you don't provide the precise path of files, R will check the working directory (see base::setwd()). To specify the file path, see base::file.path().

This function was developed specifically for importing DHS. For a generic function for creating an object of class prevR, see as.prevR().

See Also

as.prevR(), prevR class.

Examples

1
2
3
4
## Not run: 
imported_data <- import.dhs("data.sav", "gps.dbf")

## End(Not run)

prevR documentation built on Aug. 28, 2020, 5:08 p.m.