read_survey: Read a Survey

Description Usage Arguments Details Author(s) Examples

View source: R/io.R

Description

Read a Survey that has been written by write_survey (or created manually using the PLS-wizard). This function also reads output from the PLS-wizard, such as inner and outer weights. Hidden fields will be updated to reflect changes in input-files when reading a survey directory.

Usage

1
2
read_survey(file, mainentity = "q1", inner_weight = FALSE,
  outer_weight = FALSE)

Arguments

file

Output file or directory.

mainentity

Name of the mainentity variable in data.

inner_weight

Optional: Read inner weights from output.

outer_weight

Optional: Read outer weights from output.

Details

If file is a directory the following directories and files will be read:

Author(s)

Kristian D. Olsen

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
## Not run: 
library(reporttoolDT)
lnk <- sharepoint_mount("http://domain.com/path/to/dir")

# Read the directory
srv <- read_survey(lnk, inner_weight = TRUE, outer_weight = TRUE)

# Read just the .sav and hidden fields (.Rdata).
srv <- read_survey(file.path(lnk, "Data", "Example study EM.sav"))

## End(Not run)

itsdalmo/reporttoolDT documentation built on May 18, 2019, 7:11 a.m.