read_redcap_formatted: Convencience function to load datasets downloaded from a...

Description Usage Arguments Details Value Examples

View source: R/loadData.R

Description

This function is specifically tailored to the way the default import script provided by a Redcap database functions. First, the Hmisc package is loaded. The .csv file containing the data is assumed to be located in the current working directory. Labels are assigned to all variables. Variables which are supposed to be factors are twice, once as a factor and once in an unformatted way.

Usage

1
read_redcap_formatted(path_to_redcap_script = NULL)

Arguments

path_to_redcap_script

(character) Path to the (automatically generated) redcap script for data import

Details

This script removes the "unformatted factor" variables and properly assignes labels.

Value

tibble with data

Examples

1
2
path_to_redcap_script <- system.file("examples", "testredcap.r", package = "DescrTab2")
read_redcap_formatted(path_to_redcap_script)

DescrTab2 documentation built on Jan. 20, 2022, 5:09 p.m.