split_instruments: Split Instruments from Raw Report

View source: R/split_instruments.R

split_instrumentsR Documentation

Split Instruments from Raw Report

Description

Given a dataframe from a raw report, convert the dataframe into a list of dataframes. Each dataframe is 1 Redcap instrument's worth of data in tidy format. Instrument data can be accessed through $ notation such as output$nnb to get the data from the Northwestern Naming Battery. The name of each dataframe is set to be the instrument prefix to keep things short.

Usage

split_instruments(
  report_data,
  lookup = anrlab::anrlab_instruments,
  record_id_col = "record_id",
  verbose = FALSE
)

Arguments

report_data

Dataframe, the raw exported data from a report

lookup

Dataframe, instrument name-prefix lookup table.

record_id_col

Defaults to record_id

verbose

Logical, if True will print each instrument as it's processing

Value

List of dataframes, named according to instrument prefix


tsostarics/anrlab documentation built on Nov. 6, 2022, 3:54 a.m.