af_load: Loads the Afrobarometer dataset

Description Arguments Value Examples

View source: R/af_load.R

Description

Loads the Afrobarometer dataset

Arguments

round

A number specifying which round of the Afrobarometer to load (6 by default)

force

A boolean specifiying whether or not to force the download of a new copy from the website (false by default)

clean

A boolean specifying whether or not to clean the dataset (TRUE by default)

Value

Returns the dataframe afro, and sets a global integer af.round

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
# Load the 6th round of the Afrobarometer from local file if available,
# or from the website if the local file does not exist
af_load()

# Download and load the 5th round of the Afrobarometer, ignoring and
# overwriting any local files that exist
af_load(5, force=T)

# Download and load the 3rd round of the Afrobarometer, ignoring and
# overwriting any local files that exist, do not automatically clean
af_load(5, force=T, clean=F)

mdaku/afrobar documentation built on Nov. 4, 2019, 6:23 p.m.