Skip to content

Releases: BRANCHlab/abcdutils

0.2.0

06 Jul 15:20
Compare
Choose a tag to compare
0.2.0 Pre-release
Pre-release

Final release supporting ABCD Releases 4.0 and earlier.

New functions

Extraction

  • cbcl_raw_to_thresh converts 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 clinical
  • get_all_wmnd extracts all non-summary white matter ROIs according to both the AtlasTrack major regions as well as the Desikan Cortical Parcellation peri-cortical/sub-adjacent regions
  • get_mtbi_age_l determines age at latest mTBI for subjects at the 1yfu and 2yfu timepoint
  • get_mtbi_loc_l, get_mtbi_mem_daze_l, and get_mtbi_mechanism_l functions added for 1yfu and 2yfu timepoints
  • get_uninjured_subjects returns those subjects who were never injured

QC

  • qc functions added for neuroimaging: qc_rsfmri, qc_dmri, qc_smri

Plotting

  • clean_plot allows elements of a generated plot to easily be removed (currently only xlabel, ylabel, and legend)

General utility

  • generate_mock_data safely scrambles a provided dataframe, generating practice/demo data for sharing
  • path_maker, make_reader, and make_writer functions to help organize file importing and exporting
  • common_subjects function returns subjects present in all dataframes stored in a provided list of dataframes
  • col_to_num_all_possible converts all pure number features into numeric type
  • train_test_assign consistently 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_list inner joins all dataframes in a list
  • flex_cond variation of the if function that returns FALSE when the conditional statement would originally have returned an error or 0-length vector
  • ae quickly check if two objects are equal, not considering their attributes (wrapper for all.equal)

Changes

  • get_exercise now returns a single-feature scaled average of all physical activity scores (physical_activity1_y, physical_activity2_y, physical_activity5_y) rather than each score separately
  • get_cbcl_depress_r and similar functions (anxiety, aggressive, depress) now have raw parameter set as TRUE by default to allow extraction of raw or thresholded scores
  • get_mtbi_mechanism now 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

19 Jan 21:22
Compare
Choose a tag to compare
0.1.0 Pre-release
Pre-release

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 variables
      • col_to_num: convert specific factor columns to numeric
      • col_to_fac: convert specific character columns to numeric
    • tbi functions:
      • rename_tbi: provide meaningful column names to abcd_otbi01.txt
      • original_otbi_names: view original abcd_otbi01.txt column names
      • identify_all_tbi: label mTBIs and moderate/severe TBIs
      • identify_mtbi: identify which mechanism of injury counts as an mTBI
      • identify_mtbi_times: identify time since most recent mTBI
      • identify_latest_mtbi_mechanism: identify mechanism of injury for latest mTBI
      • identify_num_mtbi: identify how many mTBIs a subject sustained
      • identify_latest_mtbi_loc: identify LOC time for latest mTBI
      • identify_latest_mtbi_mem_daze: identify if memory loss / feeling dazed or confused occurred for latest mTBI
      • detail_mtbi: apply all other TBI functions to a dataframe
    • extraction functions:
      • get_mtbi_subjects
      • get_cbcl_aggressive_r
      • get_cbcl_anxiety_r
      • get_cbcl_attention_r
      • get_cbcl_depress_r
      • get_cbcl_dizzy
      • get_cbcl_headaches
      • get_cbcl_overtired
      • get_cbcl_sleeping_less
      • get_cbcl_sleeping_more
      • get_cbcl_vomiting
      • get_cort_sa
      • get_cort_t
      • get_exercise
      • get_family_function
      • get_full_sleep_df
      • get_gord_cor
      • get_gord_var
      • get_headaches
      • get_income
      • get_loneliness
      • get_mtbi_age
      • get_mtbi_count
      • get_mtbi_loc
      • get_mtbi_mechanism
      • get_mtbi_mem_daze
      • get_nihtbx_cardsort_fc
      • get_nihtbx_list_fc
      • get_nihtbx_pattern_fc
      • get_parent_psychopathology
      • get_prosocial_behaviour
      • get_pubertal_status
      • get_race
      • get_screen_time
      • get_sex
      • get_sports_and_activities
      • get_subc_cor
      • get_subc_v
      • get_subc_var
      • get_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 dataframe
      • search_dd: open the data dictionary search results for a string
      • abcd_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
  • Added a NEWS.md file to track changes to the package.