afrb_round: Load data for an Afrobarometer Survey round as a local tibble

Description Usage Arguments Details Value Examples

View source: R/afrb-round.R

Description

After the local database has been built (afrb_build), afrb_round reads data for the specified round into the workspace as a data.frame.

Usage

1
2
3

Arguments

round

An integer of the round to select. round %in% 1:6 must be true

Details

afrb_round loads built data for round as a data.frame. Assumes afrb_build has been run. afrb_list_rounds lists built datasets in the Afrobarometer data directory, if any exist.

Value

afrb_round(x) returns a data.frame for Round ]codex. afrb_list_rounds returns a character vector of file paths for built datasets from afrb_build, if any exist.

Examples

1
2
3
4
5
6
7
## Not run: 
library(afrobarometer)
afrb_dir("~/foo")
afrb_build(rounds = 3, overwrite = TRUE)
r3 <- afrb_round(round = 3)

## End(Not run)

sboysel/afrobarometer documentation built on May 29, 2019, 3:24 p.m.