Description Usage Arguments Details Value See Also Examples
Automates the downloading and merging of the Afrobarometer data. Fetches
any missing, publicly available files, creates a master MonetDB database in
options(afrobarometer.data)
, and merges available spatial data with
the questionnaires for each round.
1 | afrb_build(rounds = 1:6, overwrite = FALSE)
|
rounds |
A sequence of integers indicating which rounds to build. As
of February 2017, there are six rounds. Default is value |
overwrite |
A boolean value indicating whether or not the SQLite
database in the local Afrobarometer data directory should be overwritten
when |
May only run afrb_round
after afrb_dir
and before
afrb_round
.
Builds the database in options("afrobarometer.data")
,
downloading files as needed into sub-directories and merging the resulting
data file.path(options("afrobarometer.data"), "build")
.
1 2 3 4 5 6 7 8 9 10 11 | ## Not run:
library(afrobarometer)
afrb_dir(path = "~/foo")
# download first 3 rounds but do not overwrite the existing database.
# This will fail if the database is already populated with merged tables.
afrb_build(rounds = 3:4)
# download all rounds and overwrite the existing database.
afrb_build(rounds = 3:4, overwrite = TRUE)
r3 <- afrb_round(round = 3)
## End(Not run)
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.