Learn R Programming

readbulk (version 1.1.2)

process_labjs: Process lab.js data stored in survey software

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

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.

Examples

Run this code
# 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)
# }
# NOT RUN {
# }

Run the code above in your browser using DataLab