REDCapCAST24.12.1 package

REDCap Metadata Casting and Castellated Data Handling

all_na

Check if vector is all NA

apply_factor_labels

Preserve all factor levels from REDCap data dictionary in data export

apply_field_label

Apply REDCap filed labels to data frame

as_factor

Convert labelled vectors to factors while preserving attributes

case_match_regex_list

List-base regex case_when

cast_data_overview

Overview of REDCapCAST data for shiny

cast_meta_overview

Overview of REDCapCAST meta data for shiny

char2choice

Simple function to generate REDCap choices from character vector

char2cond

Simple function to generate REDCap branching logic from character vect...

clean_field_label

Very simple function to remove rich text formatting from field label a...

clean_redcap_name

clean_redcap_name

compact_vec

Compacting a vector of any length with or without names

create_html_table

Create two-column HTML table for data piping in REDCap instruments

create_instrument_meta

DEPRICATED Create zips file with necessary content based on data set

d2w

Convert single digits to words

doc2dd

Doc table to data dictionary - EARLY, DOCS MISSING

ds2dd_detailed

Extract data from stata file for data dictionary

ds2dd

(DEPRECATED) Data set to data dictionary function

easy_redcap

Secure API key storage and data acquisition in one

export_redcap_instrument

Creates zip-file with necessary content to manually add instrument to ...

fct_drop

Drop unused levels preserving label data

fct2num

Allows conversion of factor to numeric values preserving original leve...

file_extension

DEPRECATED Helper to import files correctly

focused_metadata

focused_metadata

format_redcap_factor

Converts REDCap choices to factor levels and stores in labels attribut...

format_subheader

Sub-header formatting wrapper

get_api_key

Retrieve project API key if stored, if not, set and retrieve

get_attr

Extract attribute. Returns NA if none

get_id_name

Get the id name

guess_time_only_filter

Try at determining which are true time only variables

guess_time_only

Guess time variables based on naming pattern

haven_all_levels

Finish incomplete haven attributes substituting missings with values

hms2character

Change "hms" to "character" for REDCap upload.

html_tag_wrap

Simple html tag wrapping for REDCap text formatting

is_missing

Multi missing check

is_repeated_longitudinal

Test if repeatable or longitudinal

is.labelled

Tests for multiple label classes

mark_complete

Completion marking based on completed upload

match_fields_to_form

Match fields to forms

named_levels

Get named vector of factor levels and values

nav_bar_page

Nav_bar defining function for shiny ui

numchar2fct

Applying var2fct across data set

parse_data

Helper to auto-parse un-formatted data with haven and readr

possibly_numeric

Tests if vector can be interpreted as numeric without introducing NAs ...

possibly_roman

Test if vector can be interpreted as roman numerals

process_user_input.character

User input processing character

process_user_input.data.frame

User input processing data.frame

process_user_input.default

User input processing default

process_user_input

User input processing

process_user_input.response

User input processing response

read_input

Flexible file import based on extension

read_redcap_instrument

Convenience function to download complete instrument, using token stor...

read_redcap_tables

Download REDCap data

REDCap_split

Split REDCap repeating instruments table into multiple tables

redcap_wider

Transforms list of REDCap data.frames to a single wide data.frame

REDCapCAST-package

REDCapCAST: REDCap Metadata Casting and Castellated Data Handling

replace_curly_quote

Replace curly apostrophes and quotes from word

sanitize_split

Sanitize list of data frames

set_attr

Set attributes for named attribute. Appends if attr is NULL

shiny_cast

Launch the included Shiny-app for database casting and upload

split_non_repeating_forms

Split a data frame into separate tables for each form

strsplitx

Extended string splitting

suffix2label

Transfer variable name suffix to label in widened data

time_only_correction

Correction based on time_only_filter function

var2fct

Convert vector to factor based on threshold of number of unique levels

vec2choice

Named vector to REDCap choices (wrapping compact_vec())

Casting metadata for REDCap database creation and handling of castellated data using repeated instruments and longitudinal projects in 'REDCap'. Keeps a focused data export approach, by allowing to only export required data from the database. Also for casting new REDCap databases based on datasets from other sources. Originally forked from the R part of 'REDCapRITS' by Paul Egeler. See <https://github.com/pegeler/REDCapRITS>. 'REDCap' (Research Electronic Data Capture) is a secure, web-based software platform designed to support data capture for research studies, providing 1) an intuitive interface for validated data capture; 2) audit trails for tracking data manipulation and export procedures; 3) automated export procedures for seamless data downloads to common statistical packages; and 4) procedures for data integration and interoperability with external sources (Harris et al (2009) <doi:10.1016/j.jbi.2008.08.010>; Harris et al (2019) <doi:10.1016/j.jbi.2019.103208>).

  • Maintainer: Andreas Gammelgaard Damsbo
  • License: GPL (>= 3)
  • Last published: 2024-12-02