# NOT RUN {
set_email("your_email@email.com")
# Get first three rounds for Denmark
dk_three <- import_country("Denmark", 1:3)
# Only download the files, this will return nothing
temp_dir <- tempdir()
download_country(
"Turkey",
rounds = c(2, 4),
output_dir = temp_dir
)
# By default, download_country downloads 'stata' files but
# you can also download 'spss' or 'sas' files.
download_country(
"Turkey",
rounds = c(2, 4),
output_dir = temp_dir,
format = 'spss'
)
# If email is not registered at ESS website, error will arise
uk_one <- import_country("United Kingdom", 5, "wrong_email@email.com")
# Error in authenticate(ess_email) :
# The email address you provided is not associated with any registered user.
# Create an account at http://www.europeansocialsurvey.org/user/new
# If selected rounds don't exist, error will arise
czech_two <- import_country("Czech Republic", c(1, 22))
# Error in country_url(country, rounds) :
# Only rounds ESS1, ESS2, ESS4, ESS5, ESS6, ESS7, ESS8 available
# for Czech Republic
# }
# NOT RUN {
# }
Run the code above in your browser using DataLab