process_labjs: Process lab.js data stored in survey software

Description Usage Arguments Value Author(s) Examples

View source: R/process_labjs.R

Description

Process lab.js data stored in survey software by converting them from JSON data to a data.frame in long format. This function is currently in beta mode.

Usage

1
2
3
4
5
6
7
8
process_labjs(
  data,
  labjs_column,
  keep = NULL,
  remove_no_json = FALSE,
  verbose = FALSE,
  ...
)

Arguments

data

a data.frame.

labjs_column

a character string specifying the column in data that contains the lab.js data.

keep

a character vector specifying which additional columns in data should be kept.

remove_no_json

logical indicating whether rows with no JSON data should be kept. Only relevant if keep contains one or more variables.

verbose

logical indicating whether function should report its progress.

...

additional arguments passed on to fromJSON.

Value

A data.frame containing the processed data.

Author(s)

Felix Henninger (mailbox@felixhenninger.com)

Pascal J. Kieslich (kieslich@psychologie.uni-mannheim.de)

Examples

1
2
3
4
5
6
7
8
9
## Not run: 
raw_data <- read.csv("raw_data.csv",encoding="UTF-8")

dataset <- process_labjs(data=raw_data,
  labjs_column = "FB01_01",
  keep=c("CASE","SERIAL"),
  verbose=TRUE)

## End(Not run)

readbulk documentation built on Aug. 25, 2020, 5:08 p.m.