Package: REDCapCAST 24.11.2

Andreas Gammelgaard Damsbo

REDCapCAST: REDCap Metadata Casting and Castellated Data Handling

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>).

Authors:Andreas Gammelgaard Damsbo [aut, cre], Paul Egeler [aut]

REDCapCAST_24.11.2.tar.gz
REDCapCAST_24.11.2.tar.gz(r-4.5-noble)REDCapCAST_24.11.2.tar.gz(r-4.4-noble)
REDCapCAST_24.11.2.tgz(r-4.4-emscripten)REDCapCAST_24.11.2.tgz(r-4.3-emscripten)
REDCapCAST.pdf |REDCapCAST.html
REDCapCAST/json (API)
NEWS

# Install 'REDCapCAST' in R:
install.packages('REDCapCAST', repos = c('https://cran.r-universe.dev', 'https://cloud.r-project.org'))

Peer review:

Bug tracker:https://github.com/agdamsbo/redcapcast/issues

Datasets:

3.78 score 10 scripts 270 downloads 47 exports 99 dependencies

Last updated 3 days agofrom:bed6cbf7ab. Checks:OK: 2. Indexed: no.

TargetResultDate
Doc / VignettesOKNov 23 2024
R-4.5-linuxOKNov 23 2024

Exports:all_naas_factorcase_match_regex_listcast_data_overviewcast_meta_overviewchar2choicechar2condclean_redcap_namecompact_veccreate_html_tablecreate_instrument_metad2wdoc2ddds2ddds2dd_detailedeasy_redcapexport_redcap_instrumentfct2numfile_extensionfocused_metadataformat_subheaderget_api_keyget_attrguess_time_onlyguess_time_only_filterhaven_all_levelshtml_tag_wrapis_repeated_longitudinalmatch_fields_to_formnamed_levelsnav_bar_pagenumchar2fctparse_datapossibly_romanprocess_user_inputread_inputread_redcap_instrumentread_redcap_tablesREDCap_splitredcap_widersanitize_splitset_attrshiny_castsplit_non_repeating_formsstrsplitxvar2fctvec2choice

Dependencies:askpassassertthatbackportsbase64encbigDbitbit64bitopsbslibcachemcellrangercheckmateclicliprcolorspacecommonmarkcpp11crayoncurldigestdplyrevaluatefansifarverfastmapfilelockfontawesomeforcatsfsgenericsgluegthavenherehighrhmshtmltoolshtmlwidgetshttpuvhttrjquerylibjsonlitejuicyjuicekeyringknitrlabelinglaterlifecyclemagrittrmarkdownmemoisemimemintymunsellopensslopenxlsx2pillarpkgconfigprettyunitsprogresspromisespurrrR6rappdirsRColorBrewerRcppreactablereactRreadODSreadrREDCapRrematchrlangrmarkdownrprojrootsassscalesshinysodiumsourcetoolsstringistringrsystibbletidyrtidyselecttinytextzdbutf8V8vctrsviridisLitevroomwithrxfunxml2xtableyamlzip

Database-creation

Rendered fromDatabase-creation.Rmdusingknitr::rmarkdownon Nov 23 2024.

Last update: 2024-11-22
Started: 2024-02-29

REDCapCAST

Rendered fromREDCapCAST.Rmdusingknitr::rmarkdownon Nov 23 2024.

Last update: 2024-11-22
Started: 2024-11-22

Readme and manuals

Help Manual

Help pageTopics
Check if vector is all NAall_na
Convert labelled vectors to factors while preserving attributesas_factor as_factor.character as_factor.factor as_factor.haven_labelled as_factor.labelled as_factor.logical as_factor.numeric
List-base regex case_whencase_match_regex_list
Overview of REDCapCAST data for shinycast_data_overview
Overview of REDCapCAST meta data for shinycast_meta_overview
Simple function to generate REDCap choices from character vectorchar2choice
Simple function to generate REDCap branching logic from character vectorchar2cond
clean_redcap_nameclean_redcap_name
Compacting a vector of any length with or without namescompact_vec
Create two-column HTML table for data piping in REDCap instrumentscreate_html_table
DEPRICATED Create zips file with necessary content based on data setcreate_instrument_meta
Convert single digits to wordsd2w
Doc table to data dictionary - EARLY, DOCS MISSINGdoc2dd
(DEPRECATED) Data set to data dictionary functionds2dd
Extract data from stata file for data dictionaryds2dd_detailed
Secure API key storage and data acquisition in oneeasy_redcap
Creates zip-file with necessary content to manually add instrument to databaseexport_redcap_instrument
Allows conversion of factor to numeric values preserving original levelsfct2num
DEPRECATED Helper to import files correctlyfile_extension
focused_metadatafocused_metadata
Sub-header formatting wrapperformat_subheader
Retrieve project API key if stored, if not, set and retrieveget_api_key
Extract attribute. Returns NA if noneget_attr
Get the id nameget_id_name
Guess time variables based on naming patternguess_time_only
Try at determining which are true time only variablesguess_time_only_filter
Finish incomplete haven attributes substituting missings with valueshaven_all_levels
Change "hms" to "character" for REDCap upload.hms2character
Simple html tag wrapping for REDCap text formattinghtml_tag_wrap
Multi missing checkis_missing
Test if repeatable or longitudinalis_repeated_longitudinal
Completion marking based on completed uploadmark_complete
Match fields to formsmatch_fields_to_form
mtcars dataset slightly modified to use for Shiny app upload demonstrationmtcars_redcap
Get named vector of factor levels and valuesnamed_levels
Nav_bar defining function for shiny uinav_bar_page
Applying var2fct across data setnumchar2fct
Helper to auto-parse un-formatted data with haven and readrparse_data
Test if vector can be interpreted as roman numeralspossibly_roman
User input processingprocess_user_input
User input processing characterprocess_user_input.character
User input processing data.frameprocess_user_input.data.frame
User input processing defaultprocess_user_input.default
User input processing responseprocess_user_input.response
Flexible file import based on extensionread_input
Convenience function to download complete instrument, using token storage in keyring.read_redcap_instrument
Download REDCap dataread_redcap_tables
Split REDCap repeating instruments table into multiple tablesREDCap_split
Redcap Widerredcap_wider
Data set for demonstrationredcapcast_data
REDCap metadata from data baseredcapcast_meta
Replace curly apostrophes and quotes from wordreplace_curly_quote
Sanitize list of data framessanitize_split
Set attributes for named attribute. Appends if attr is NULLset_attr
Launch the included Shiny-app for database casting and uploadshiny_cast
Split a data frame into separate tables for each formsplit_non_repeating_forms
Extended string splittingstrsplitx
Correction based on time_only_filter functiontime_only_correction
Convert vector to factor based on threshold of number of unique levelsvar2fct
Named vector to REDCap choices (`wrapping compact_vec()`)vec2choice