Releases: BRANCHlab/abcdutils
Releases · BRANCHlab/abcdutils
0.2.0
Final release supporting ABCD Releases 4.0 and earlier.
New functions
Extraction
cbcl_raw_to_threshconverts raw cbcl depress, anxiety, attention, and aggressive scores to ordinal scale (normal, borderline clinical, and clinical) using the threshold cutoffs of 93rd - 97th percentile being borderline clinical and 97th percentile + being clinicalget_all_wmndextracts all non-summary white matter ROIs according to both the AtlasTrack major regions as well as the Desikan Cortical Parcellation peri-cortical/sub-adjacent regionsget_mtbi_age_ldetermines age at latest mTBI for subjects at the 1yfu and 2yfu timepointget_mtbi_loc_l,get_mtbi_mem_daze_l, andget_mtbi_mechanism_lfunctions added for 1yfu and 2yfu timepointsget_uninjured_subjectsreturns those subjects who were never injured
QC
- qc functions added for neuroimaging:
qc_rsfmri,qc_dmri,qc_smri
Plotting
clean_plotallows elements of a generated plot to easily be removed (currently only xlabel, ylabel, and legend)
General utility
generate_mock_datasafely scrambles a provided dataframe, generating practice/demo data for sharingpath_maker,make_reader, andmake_writerfunctions to help organize file importing and exportingcommon_subjectsfunction returns subjects present in all dataframes stored in a provided list of dataframescol_to_num_all_possibleconverts all pure number features into numeric typetrain_test_assignconsistently assigns subjects with a UID to train or test set using the one-at-a-time hash function- convenience filtering function for train/test data:
keep_split merge_df_listinner joins all dataframes in a listflex_condvariation of the if function that returns FALSE when the conditional statement would originally have returned an error or 0-length vectoraequickly check if two objects are equal, not considering their attributes (wrapper for all.equal)
Changes
get_exercisenow returns a single-feature scaled average of all physical activity scores (physical_activity1_y, physical_activity2_y, physical_activity5_y) rather than each score separatelyget_cbcl_depress_rand similar functions (anxiety, aggressive, depress) now haverawparameter set asTRUEby default to allow extraction of raw or thresholded scoresget_mtbi_mechanismnow returns undummied data instead of dummied data by default- bug fixes for tbi variable renaming
- restructuring of table in
original_tbi_names - better handling of longitudinal data in various tbi extraction functions
0.1.0
abcdutils 0.1.0
First release of the abcdutils package to facilitate working with NDA's ABCD dataset.
-
Initial package release, including:
- utility functions:
dummy: generate dummy variablescol_to_num: convert specific factor columns to numericcol_to_fac: convert specific character columns to numeric
- tbi functions:
rename_tbi: provide meaningful column names to abcd_otbi01.txtoriginal_otbi_names: view original abcd_otbi01.txt column namesidentify_all_tbi: label mTBIs and moderate/severe TBIsidentify_mtbi: identify which mechanism of injury counts as an mTBIidentify_mtbi_times: identify time since most recent mTBIidentify_latest_mtbi_mechanism: identify mechanism of injury for latest mTBIidentify_num_mtbi: identify how many mTBIs a subject sustainedidentify_latest_mtbi_loc: identify LOC time for latest mTBIidentify_latest_mtbi_mem_daze: identify if memory loss / feeling dazed or confused occurred for latest mTBIdetail_mtbi: apply all other TBI functions to a dataframe
- extraction functions:
get_mtbi_subjectsget_cbcl_aggressive_rget_cbcl_anxiety_rget_cbcl_attention_rget_cbcl_depress_rget_cbcl_dizzyget_cbcl_headachesget_cbcl_overtiredget_cbcl_sleeping_lessget_cbcl_sleeping_moreget_cbcl_vomitingget_cort_saget_cort_tget_exerciseget_family_functionget_full_sleep_dfget_gord_corget_gord_varget_headachesget_incomeget_lonelinessget_mtbi_ageget_mtbi_countget_mtbi_locget_mtbi_mechanismget_mtbi_mem_dazeget_nihtbx_cardsort_fcget_nihtbx_list_fcget_nihtbx_pattern_fcget_parent_psychopathologyget_prosocial_behaviourget_pubertal_statusget_raceget_screen_timeget_sexget_sports_and_activitiesget_subc_corget_subc_vget_subc_varget_wmnd
- subsetting functions:
filter_timepoint: (isolate to specific data collection year)filter_subjects: (isolate to provided list of subjects)
- data dictionary functions:
remove_dd: remove the data dictionary from a dataframesearch_dd: open the data dictionary search results for a stringabcd_dd: open the data dictionary page for a data item's short name
- plotting functions:
vis_missing_by_df: visualize missing data across multiple dataframes
- utility functions:
-
Added a
NEWS.mdfile to track changes to the package.