Read a survey into a survey data.frame, and record its important metadata: information about the Eurobarometer wave, the filename, the digital object identifier, the timeframe of the survey and a short description.

Read a survey into a survey data.frame, and record its important metadata: information about the Eurobarometer wave, the filename, the digital object identifier, the timeframe of the survey and a short description.

read_rds(file, id = NULL, doi = NULL)

read_spss(
  file,
  user_na = TRUE,
  id = NULL,
  filename = NULL,
  doi = NULL,
  .name_repair = "unique"
)

read_rds(file, id = NULL, doi = NULL)

read_spss(
  file,
  user_na = TRUE,
  id = NULL,
  filename = NULL,
  doi = NULL,
  .name_repair = "unique"
)

Arguments

file

A re-saved survey, imported with haven::read_spss

id

An identifier of the tibble, if omitted, defaults to the file name.

doi

An optional document object identifier.

user_na

Should user-defined na_values be imported? Defaults to TRUE.

filename

An import file name.

.name_repair

Defaults to "unique" See tibble::as_tibble for details.

Value

The survey data in a retorharmonize_survey class which records important metadata about the survey contents.

The survey data in a retorharmonize_survey class which records important metadata about the survey contents.

The survey data in a retorharmonize_survey class which records important metadata about the survey contents.

The survey data in a retorharmonize_survey class which records important metadata about the survey contents.

Details

The retorharmonize_survey class extends the metadata of the survey data frame, but otherwise it inherits all methods of a modern tibble data frame.

The retorharmonize_survey class extends the metadata of the survey data frame, but otherwise it inherits all methods of a modern tibble data frame.

See also

data_eb_waves

data_eb_waves

Examples

path <- system.file("examples", "ZA7576.rds", package = "eurobarometer") read_eb <- read_rds(path)
#> Error in retroharmonize::read_rds(file, id = id, doi = doi): The file does not exist.
attributes(read_eb)
#> Error in eval(expr, envir, enclos): object 'read_eb' not found
path <- system.file("examples", "iris1.sav", package = "eurobarometer") read_spss <- read_spss(path)
#> Error in retroharmonize::read_spss(file, .name_repair = "unique", id = id, doi = doi): The file does not exist.
attributes(read_eb)
#> Error in eval(expr, envir, enclos): object 'read_eb' not found
path <- system.file("examples", "ZA7576.rds", package = "eurobarometer") read_eb <- read_rds(path)
#> Error in retroharmonize::read_rds(file, id = id, doi = doi): The file does not exist.
attributes(read_eb)
#> Error in eval(expr, envir, enclos): object 'read_eb' not found
path <- system.file("examples", "iris1.sav", package = "eurobarometer") read_spss <- read_spss(path)
#> Error in retroharmonize::read_spss(file, .name_repair = "unique", id = id, doi = doi): The file does not exist.
attributes(read_eb)
#> Error in eval(expr, envir, enclos): object 'read_eb' not found