read_rds: Read A Survey File

Description Usage Arguments Details Value See Also Examples

View source: R/read_survey.R View source: R/read_rds.R

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 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.

Usage

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
20
21
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.

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.

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.

See Also

data_eb_waves

data_eb_waves

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
path <- system.file("examples", "ZA7576.rds", package = "eurobarometer")
read_eb <- read_rds(path)
attributes(read_eb)
path <- system.file("examples", "iris1.sav", package = "eurobarometer")
read_spss <- read_spss(path)
attributes(read_eb)
path <- system.file("examples", "ZA7576.rds", package = "eurobarometer")
read_eb <- read_rds(path)
attributes(read_eb)
path <- system.file("examples", "iris1.sav", package = "eurobarometer")
read_spss <- read_spss(path)
attributes(read_eb)

antaldaniel/eurobarometer documentation built on Aug. 31, 2020, 10:57 p.m.