read_surveys: Read Survey Files Import surveys into a list. Adds filename...

Description Usage Arguments Value See Also Examples

Description

Read Survey Files

Import surveys into a list. Adds filename as a constant to each element of the list.

Usage

1
read_surveys(import_file_names, .f = "read_rds", save_to_rds = TRUE)

Arguments

import_file_names

A vector of file names to import.

.f

A function to import the surveys with. Defaults to 'read_rds'. For SPSS files, read_spss is recommended, which is a well-parameterized version of read_spss that saves some metadata, too.

save_to_rds

Should it save the imported survey to .rds? Defaults to TRUE.

Value

A list of the surveys. Each element of the list is a data frame-like survey type object where some metadata, such as the original file name, doi identifier if present, and other information is recorded for a reproducible workflow.

See Also

survey

Other import functions: pull_survey(), read_rds(), read_spss(), subset_save_surveys()

Examples

1
2
3
4
5
6
file1 <- system.file(
    "examples", "ZA7576.rds", package = "retroharmonize")
file2 <- system.file(
    "examples", "ZA5913.rds", package = "retroharmonize")

read_surveys (c(file1,file2), .f = 'read_rds' )

antaldaniel/retroharmonize documentation built on Aug. 15, 2020, 10:13 a.m.