# NOT RUN {
# }
# NOT RUN {
set_email("your_email@email.com")
# Get first three rounds
three_rounds <- import_rounds(1:3)
temp_dir <- tempdir()
# Only download the files to output_dir, this will return nothing.
download_rounds(
rounds = 1:3,
output_dir = temp_dir,
)
# By default, download_rounds saves a 'stata' file. You can
# also download 'spss' and 'sas' files.
download_rounds(
rounds = 1:3,
output_dir = temp_dir,
format = 'spss'
)
# If rounds are repeated, will download only unique ones
two_rounds <- import_rounds(c(1, 1))
# If email is not registered at ESS website, error will arise
two_rounds <- import_rounds(c(1, 2), "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 https://www.europeansocialsurvey.org/user/new
# If selected rounds don't exist, error will arise
two_rounds <- import_rounds(c(1, 22))
# Error in round_url(rounds) :
# ESS round 22 is not a available. Check show_rounds()
# }
# NOT RUN {
# }
Run the code above in your browser using DataLab