Reproducible, programmatic retrieval of survey datasets from the Pew Research Center.
pewdata
is an R package that provides reproducible, programmatic access to survey datasets from the Pew Research Center.
To install:
install.packages("pewdata")
if (!require(ghit)) install.packages("ghit")ghit::install_github("fsolt/pewdata")
Note that pewdata
depends on the Firefox browser; if you don't already have it installed on your machine, get it here.
For more details, check out the vignette.
rvest
functions.if-else if
chains with the switch statements.for
loop by a sapply
function..Rprofile
by themselves. If the informaiton is missing the function will automatically call an input request at the terminal to ask for required information for the downloading..Rprofile
by switching the argument reset
to TRUE
.Allows nested directories to be automatically created if necessary if specified using the download_dir
argument
First release.