Learn R Programming

REDCapExporter (version 0.3.0)

format_record: Format Record

Description

Use REDCap project metadata to build a well formatted data.frame for the record.

Usage

format_record(x, metadata = NULL, col_type = NULL, ...)

Value

A data.frame

Arguments

x

a rcer_rccore, rcer_raw_record, or rcer_record object.

metadata

a rcer_metadata or rcer_raw_metadata object. Will be ignored if col_type is defined.

col_type

a rcer_col_type object.

...

other arguments passed to col_type

See Also

export_core, export_content, vignette("formatting", package = "REDCapExporter")

Examples

Run this code

data("avs_raw_metadata")
data("avs_raw_record")

# Formatting the record can be called in different ways and the same result
# will be generated
identical(
  format_record(avs_raw_record, avs_raw_metadata),
  format_record(avs_raw_core)
)

avs <- format_record(avs_raw_record, avs_raw_metadata)
avs

Run the code above in your browser using DataLab