library(tidyverse) # for the map() command
## ── Attaching core tidyverse packages ──────────────────────── tidyverse 2.0.0 ──
## ✔ dplyr 1.1.2 ✔ readr 2.1.4
## ✔ forcats 1.0.0 ✔ stringr 1.5.0
## ✔ ggplot2 3.4.2 ✔ tibble 3.2.1
## ✔ lubridate 1.9.2 ✔ tidyr 1.3.0
## ✔ purrr 1.0.1
## ── Conflicts ────────────────────────────────────────── tidyverse_conflicts() ──
## ✖ dplyr::filter() masks stats::filter()
## ✖ dplyr::lag() masks stats::lag()
## ℹ Use the conflicted package (<http://conflicted.r-lib.org/>) to force all conflicts to become errors
library(psych)
##
## Attaching package: 'psych'
##
## The following objects are masked from 'package:ggplot2':
##
## %+%, alpha
library(naniar)
library(expss)
## Loading required package: maditr
##
## To select columns from data: columns(mtcars, mpg, vs:carb)
##
##
## Attaching package: 'maditr'
##
## The following objects are masked from 'package:dplyr':
##
## between, coalesce, first, last
##
## The following object is masked from 'package:purrr':
##
## transpose
##
## The following object is masked from 'package:readr':
##
## cols
##
##
## Use 'expss_output_rnotebook()' to display tables inside R Notebooks.
## To return to the console output, use 'expss_output_default()'.
##
##
## Attaching package: 'expss'
##
## The following object is masked from 'package:naniar':
##
## is_na
##
## The following objects are masked from 'package:stringr':
##
## fixed, regex
##
## The following objects are masked from 'package:dplyr':
##
## compute, contains, na_if, recode, vars, where
##
## The following objects are masked from 'package:purrr':
##
## keep, modify, modify_if, when
##
## The following objects are masked from 'package:tidyr':
##
## contains, nest
##
## The following object is masked from 'package:ggplot2':
##
## vars
# use the read.csv() command to import your downloaded CSV file
df <- read.csv(file="ARC_processed_data.csv", header=T)
# use the names() command to view the list of columns or variables in your dataframe
names(df)
## [1] "X"
## [2] "record_id"
## [3] "redcap_event_name"
## [4] "redcap_data_access_group"
## [5] "date"
## [6] "group"
## [7] "consent"
## [8] "consent_parent"
## [9] "information_and_consent_complete"
## [10] "age"
## [11] "gender"
## [12] "trans"
## [13] "sexual_orientation"
## [14] "ethnicity"
## [15] "relationship_status"
## [16] "country"
## [17] "uk_country"
## [18] "urban_rural"
## [19] "dwelling"
## [20] "dwelling_other"
## [21] "tenure"
## [22] "rooms"
## [23] "n_adults"
## [24] "n_under_18s"
## [25] "income"
## [26] "education"
## [27] "employment"
## [28] "health___1"
## [29] "health___2"
## [30] "health___3"
## [31] "health___4"
## [32] "health___5"
## [33] "health___6"
## [34] "health___7"
## [35] "health___8"
## [36] "health___9"
## [37] "health___10"
## [38] "health___11"
## [39] "medical_other"
## [40] "pregnant___1"
## [41] "pregnant___2"
## [42] "pregnant___3"
## [43] "smoking"
## [44] "alcohol"
## [45] "caring_responsibilities___1"
## [46] "caring_responsibilities___2"
## [47] "caring_responsibilities___3"
## [48] "pet___1"
## [49] "pet___2"
## [50] "pet___3"
## [51] "pet___4"
## [52] "pet___5"
## [53] "pet___6"
## [54] "support_parents_1"
## [55] "support_parents_2"
## [56] "support_parents_3"
## [57] "support_parents_4"
## [58] "support_friends_1"
## [59] "support_friends_2"
## [60] "support_friends_3"
## [61] "support_friends_4"
## [62] "support_employment_1"
## [63] "support_employment_2"
## [64] "support_employment_3"
## [65] "support_employment_4"
## [66] "support_employment_5"
## [67] "support_employment_6"
## [68] "covid_positive_1"
## [69] "covid_positive_why___1"
## [70] "covid_positive_why___2"
## [71] "covid_positive_why___3"
## [72] "covid_positive_why___4"
## [73] "covid_positive_why___5"
## [74] "covid_positive_why___6"
## [75] "covid_positive_why___7"
## [76] "covid_positive_why___8"
## [77] "covid_positive_why___9"
## [78] "covid_positive_why___10"
## [79] "covid_positive_why___11"
## [80] "covid_positive_why___12"
## [81] "covid_positive_why___13"
## [82] "covid_positive_why___14"
## [83] "covid_positive_why___15"
## [84] "covid_positive_other"
## [85] "covid_positive_groups"
## [86] "covid_positive_most"
## [87] "covid_negative"
## [88] "covid_negative_what___1"
## [89] "covid_negative_what___2"
## [90] "covid_negative_what___3"
## [91] "covid_negative_what___4"
## [92] "covid_negative_what___5"
## [93] "covid_negative_what___6"
## [94] "covid_negative_what___7"
## [95] "covid_negative_what___8"
## [96] "covid_negative_other"
## [97] "covid_negative_most"
## [98] "demographics_complete"
## [99] "monthly_survey_complete"
## [100] "mental_health___1"
## [101] "mental_health___2"
## [102] "mental_health___3"
## [103] "mental_health___4"
## [104] "mental_health___5"
## [105] "mental_health___6"
## [106] "mental_health___7"
## [107] "mental_health___8"
## [108] "mental_health___9"
## [109] "mental_health___10"
## [110] "mental_health___11"
## [111] "mental_health___12"
## [112] "mental_health___13"
## [113] "mental_health___14"
## [114] "mental_health___15"
## [115] "mental_health_other"
## [116] "mental_health_recovery"
## [117] "treatment1"
## [118] "treatment1_other"
## [119] "treatment1_format"
## [120] "treatment1_format_other"
## [121] "mental_health_undiagnosed"
## [122] "treatment_complete"
## [123] "big_5_1"
## [124] "big_5_2"
## [125] "big_5_3"
## [126] "big_5_4"
## [127] "big_5_5"
## [128] "big_5_6"
## [129] "big_5_7"
## [130] "big_5_8"
## [131] "big_5_9"
## [132] "big_5_10"
## [133] "big_5_11"
## [134] "big_5_12"
## [135] "big_5_13"
## [136] "big_5_14"
## [137] "big_5_15"
## [138] "university_1"
## [139] "university_offer"
## [140] "university_offer2"
## [141] "university_offer3"
## [142] "personality_complete"
## [143] "pswq_a_1"
## [144] "pswq_a_2"
## [145] "pswq_a_3"
## [146] "pswq_a_4"
## [147] "pswq_a_5"
## [148] "pswq_a_6"
## [149] "pswq_a_7"
## [150] "pswq_a_8"
## [151] "pswq_a_9"
## [152] "pswq_a_10"
## [153] "pswq_a_11"
## [154] "pswq_a_12"
## [155] "pswq_a_13"
## [156] "pswq_a_14"
## [157] "pswq_a_15"
## [158] "pswq_a_16"
## [159] "pswq_c_1"
## [160] "pswq_c_2"
## [161] "pswq_c_3"
## [162] "pswq_c_4"
## [163] "pswq_c_5"
## [164] "pswq_c_6"
## [165] "pswq_c_7"
## [166] "pswq_c_8"
## [167] "pswq_c_9"
## [168] "pswq_c_10"
## [169] "pswq_c_11"
## [170] "pswq_c_12"
## [171] "pswq_c_13"
## [172] "pswq_c_14"
## [173] "pswq_complete"
## [174] "iou_1"
## [175] "iou_2"
## [176] "iou_3"
## [177] "iou_4"
## [178] "iou_5"
## [179] "iou_6"
## [180] "iou_7"
## [181] "iou_8"
## [182] "iou_9"
## [183] "iou_10"
## [184] "iou_11"
## [185] "iou_12"
## [186] "iou_13"
## [187] "iou_14"
## [188] "iou_15"
## [189] "iou_16"
## [190] "iou_17"
## [191] "iou_18"
## [192] "iou_19"
## [193] "iou_20"
## [194] "iou_21"
## [195] "iou_22"
## [196] "iou_23"
## [197] "iou_24"
## [198] "iou_25"
## [199] "iou_26"
## [200] "iou_27"
## [201] "iou12_complete"
## [202] "mfq_26_1"
## [203] "mfq_26_2"
## [204] "mfq_26_3"
## [205] "mfq_26_4"
## [206] "mfq_26_5"
## [207] "mfq_26_6"
## [208] "mfq_26_7"
## [209] "mfq_26_8"
## [210] "mfq_26_9"
## [211] "mfq_26_10"
## [212] "mfq_26_11"
## [213] "mfq_26_12"
## [214] "mfq_26_13"
## [215] "mfq_26_14"
## [216] "mfq_26_15"
## [217] "mfq_26_16"
## [218] "mfq_26_17"
## [219] "mfq_26_18"
## [220] "mfq_26_19"
## [221] "mfq_26_20"
## [222] "mfq26_complete"
## [223] "rse_1"
## [224] "rse_2"
## [225] "rse_3"
## [226] "rse_4"
## [227] "rse_5"
## [228] "rse_6"
## [229] "rse_7"
## [230] "rse_8"
## [231] "rse_9"
## [232] "rse_10"
## [233] "rse10_complete"
## [234] "weekly_survey_complete"
## [235] "monthly_onethird_complete"
## [236] "school_1"
## [237] "school_2"
## [238] "homeschool_1"
## [239] "homeschool_2"
## [240] "homeschool_3"
## [241] "homeschool_4"
## [242] "school_support_1"
## [243] "school_support_2"
## [244] "school_support_3"
## [245] "school_support_4"
## [246] "school_support_5"
## [247] "school_stress"
## [248] "school_pos_neg_1"
## [249] "school_pos_neg_2"
## [250] "school_pos_neg_3"
## [251] "school_pos_neg_4"
## [252] "school_pos_neg_5"
## [253] "school_pos_neg_6"
## [254] "school_pos_neg_7"
## [255] "school_pos_neg_8"
## [256] "school_pos_neg_9"
## [257] "school_pos_neg_10"
## [258] "school_pos_neg_11"
## [259] "pas_covid_1"
## [260] "pas_covid_2"
## [261] "pas_covid_3"
## [262] "pas_covid_4"
## [263] "pas_covid_5"
## [264] "pas_covid_6"
## [265] "pas_covid_7"
## [266] "pas_covid_8"
## [267] "pas_covid_9"
## [268] "covid_complete"
## [269] "pss_1"
## [270] "pss_2"
## [271] "pss_3"
## [272] "pss_4"
## [273] "pss4_complete"
## [274] "phq_1"
## [275] "phq_2"
## [276] "phq_3"
## [277] "phq_4"
## [278] "phq_5"
## [279] "phq_6"
## [280] "phq_7"
## [281] "phq_8"
## [282] "phq_9"
## [283] "phq9_complete"
## [284] "gad_1"
## [285] "gad_2"
## [286] "gad_3"
## [287] "gad_4"
## [288] "gad_5"
## [289] "gad_6"
## [290] "gad_7"
## [291] "gad7_complete"
## [292] "mfq_state_1"
## [293] "mfq_state_2"
## [294] "mfq_state_3"
## [295] "mfq_state_4"
## [296] "mfq_state_5"
## [297] "mfq_state_6"
## [298] "mfq_state_7"
## [299] "mfq_state_8"
## [300] "mfqs11_complete"
## [301] "weeklymid_complete"
## [302] "monthly_twothird_complete"
## [303] "other_sleep"
## [304] "sleep_hours"
## [305] "other_isolation_adult_1"
## [306] "other_isolation_adult_2"
## [307] "other_isolation_adult_3"
## [308] "other_isolation_child_1"
## [309] "other_isolation_child_2"
## [310] "other_isolation_child_3"
## [311] "other_isolation_adult_4"
## [312] "other_isolation_child_4"
## [313] "other_support_1"
## [314] "other_support_2"
## [315] "other_support_3"
## [316] "other_support_4"
## [317] "other_support_5"
## [318] "other_support_6"
## [319] "other_smoking"
## [320] "other_alcohol"
## [321] "rmother_complete"
## [322] "edeq_1"
## [323] "edeq_2"
## [324] "edeq_3"
## [325] "edeq_4"
## [326] "edeq_5"
## [327] "edeq_6"
## [328] "edeq_7"
## [329] "edeq_8"
## [330] "edeq_9"
## [331] "edeq_10"
## [332] "edeq_11"
## [333] "edeq_12"
## [334] "edeq12_complete"
## [335] "media_tv"
## [336] "media_why_tv_socialise"
## [337] "media_why_tv_avoid"
## [338] "media_why_tv_work"
## [339] "media_why_tv_fun"
## [340] "media_why_tv_news"
## [341] "media_why_tv_nothing"
## [342] "media_playing"
## [343] "media_why_playing_social"
## [344] "media_why_playing_avoid"
## [345] "media_why_play_work"
## [346] "media_why_playing_fun"
## [347] "media_why_playing_news"
## [348] "media_why_playing_nothing"
## [349] "media_social_media"
## [350] "media_why_visit_social"
## [351] "media_why_visit_avoid"
## [352] "media_why_visit_work"
## [353] "media_why_visit_fun"
## [354] "media_why_visit_news"
## [355] "media_why_visit_nothing"
## [356] "media_messaging"
## [357] "media_why_message_social"
## [358] "media_why_message_avoid"
## [359] "media_why_message_work"
## [360] "media_why_message_fun"
## [361] "media_why_message_news"
## [362] "media_why_message_nothing"
## [363] "media_video"
## [364] "media_why_video_social"
## [365] "media_why_video_avoid"
## [366] "media_why_video_work"
## [367] "media_why_video_fun"
## [368] "media_why_video_news"
## [369] "media_why_video_nothing"
## [370] "media_playing_voice"
## [371] "media_why_voice_social"
## [372] "media_why_voice_avoid"
## [373] "media_why_voice_work"
## [374] "media_why_voice_fun"
## [375] "media_why_voice_news"
## [376] "media_why_voice_nothing"
## [377] "activity_exercise_inside"
## [378] "activity_exercise_outside"
## [379] "activity_exercise_outside2"
## [380] "technology_complete"
## [381] "brs_1"
## [382] "brs_2"
## [383] "brs_3"
## [384] "brs_4"
## [385] "brs_5"
## [386] "brs_6"
## [387] "brs_complete"
## [388] "swemws_1"
## [389] "swemws_2"
## [390] "swemws_3"
## [391] "swemws_4"
## [392] "swemws_5"
## [393] "swemws_6"
## [394] "swemws_7"
## [395] "swemws7_complete"
## [396] "oxford_arc_study_optional_task_complete"
## [397] "family_code"
## [398] "start_date"
## [399] "Weekday"
## [400] "weekStart"
## [401] "surveysran"
## [402] "surveyscompleted"
## [403] "remove"
## [404] "big5_O"
## [405] "big5_C"
## [406] "big5_E"
## [407] "big5_A"
## [408] "big5_N"
## [409] "pswq_a_total"
## [410] "pswq_c_total"
## [411] "iou_total"
## [412] "mfq_20_total"
## [413] "rse_total"
## [414] "pas_covid_total"
## [415] "pss_total"
## [416] "phq_total"
## [417] "gad_total"
## [418] "mfq_state_total"
## [419] "isolation4_child"
## [420] "isolation4_adult"
## [421] "edeq"
## [422] "brs"
## [423] "swemws"
# use the head() command to view the first few lines of your dataframe
head(df)
## X record_id redcap_event_name redcap_data_access_group date group consent
## 1 1 12 baseline NA 4/29/20 parent 1
## 2 2 12 week2 NA 5/6/20 parent NA
## 3 3 12 week3 NA 5/13/20 parent NA
## 4 4 12 week4 NA 5/20/20 parent NA
## 5 5 12 week5 NA 5/27/20 parent NA
## 6 6 12 week6 NA 6/3/20 parent NA
## consent_parent information_and_consent_complete age gender trans
## 1 NA 2 NA female no
## 2 NA NA NA female no
## 3 NA NA NA female no
## 4 NA NA NA female no
## 5 NA NA NA female no
## 6 NA NA NA female no
## sexual_orientation ethnicity
## 1 Heterosexual/Straight White - British, Irish, other
## 2 Heterosexual/Straight <NA>
## 3 Heterosexual/Straight <NA>
## 4 Heterosexual/Straight <NA>
## 5 Heterosexual/Straight <NA>
## 6 Heterosexual/Straight <NA>
## relationship_status country uk_country
## 1 In a relationship/married and cohabiting United Kingdom <NA>
## 2 <NA> United Kingdom <NA>
## 3 <NA> United Kingdom <NA>
## 4 <NA> United Kingdom <NA>
## 5 <NA> United Kingdom <NA>
## 6 <NA> United Kingdom <NA>
## urban_rural dwelling dwelling_other tenure rooms n_adults n_under_18s income
## 1 1 1 2 7 2 1 5
## 2 NA NA NA NA NA NA NA
## 3 NA NA NA NA NA NA NA
## 4 NA NA NA NA NA NA NA
## 5 NA NA NA NA NA NA NA
## 6 NA NA NA NA NA NA NA
## education employment health___1 health___2 health___3 health___4 health___5
## 1 7 3 0 0 0 0 0
## 2 NA NA NA NA NA NA NA
## 3 NA NA NA NA NA NA NA
## 4 NA NA NA NA NA NA NA
## 5 NA NA NA NA NA NA NA
## 6 NA NA NA NA NA NA NA
## health___6 health___7 health___8 health___9 health___10 health___11
## 1 0 0 0 0 1 0
## 2 NA NA NA NA NA NA
## 3 NA NA NA NA NA NA
## 4 NA NA NA NA NA NA
## 5 NA NA NA NA NA NA
## 6 NA NA NA NA NA NA
## medical_other
## 1 data from open-ended variables have been omited to protect rivacy and anonymity, please contact authors if you require ccess for your research questions
## 2 data from open-ended variables have been omited to protect rivacy and anonymity, please contact authors if you require ccess for your research questions
## 3 data from open-ended variables have been omited to protect rivacy and anonymity, please contact authors if you require ccess for your research questions
## 4 data from open-ended variables have been omited to protect rivacy and anonymity, please contact authors if you require ccess for your research questions
## 5 data from open-ended variables have been omited to protect rivacy and anonymity, please contact authors if you require ccess for your research questions
## 6 data from open-ended variables have been omited to protect rivacy and anonymity, please contact authors if you require ccess for your research questions
## pregnant___1 pregnant___2 pregnant___3 smoking alcohol
## 1 1 0 0 1 0
## 2 NA NA NA NA NA
## 3 NA NA NA NA NA
## 4 NA NA NA NA NA
## 5 NA NA NA NA NA
## 6 NA NA NA NA NA
## caring_responsibilities___1 caring_responsibilities___2
## 1 0 0
## 2 NA NA
## 3 NA NA
## 4 NA NA
## 5 NA NA
## 6 NA NA
## caring_responsibilities___3 pet___1 pet___2 pet___3 pet___4 pet___5 pet___6
## 1 0 1 0 0 0 0 0
## 2 NA NA NA NA NA NA NA
## 3 NA NA NA NA NA NA NA
## 4 NA NA NA NA NA NA NA
## 5 NA NA NA NA NA NA NA
## 6 NA NA NA NA NA NA NA
## support_parents_1 support_parents_2 support_parents_3 support_parents_4
## 1 NA NA NA NA
## 2 NA NA NA NA
## 3 NA NA NA NA
## 4 NA NA NA NA
## 5 NA NA NA NA
## 6 NA NA NA NA
## support_friends_1 support_friends_2 support_friends_3 support_friends_4
## 1 NA NA NA NA
## 2 NA NA NA NA
## 3 NA NA NA NA
## 4 NA NA NA NA
## 5 NA NA NA NA
## 6 NA NA NA NA
## support_employment_1 support_employment_2 support_employment_3
## 1 NA NA NA
## 2 NA NA NA
## 3 NA NA NA
## 4 NA NA NA
## 5 NA NA NA
## 6 NA NA NA
## support_employment_4 support_employment_5 support_employment_6
## 1 NA NA NA
## 2 NA NA NA
## 3 NA NA NA
## 4 NA NA NA
## 5 NA NA NA
## 6 NA NA NA
## covid_positive_1 covid_positive_why___1 covid_positive_why___2
## 1 NA 0 0
## 2 NA NA NA
## 3 NA NA NA
## 4 NA NA NA
## 5 NA NA NA
## 6 NA NA NA
## covid_positive_why___3 covid_positive_why___4 covid_positive_why___5
## 1 0 0 0
## 2 NA NA NA
## 3 NA NA NA
## 4 NA NA NA
## 5 NA NA NA
## 6 NA NA NA
## covid_positive_why___6 covid_positive_why___7 covid_positive_why___8
## 1 0 0 0
## 2 NA NA NA
## 3 NA NA NA
## 4 NA NA NA
## 5 NA NA NA
## 6 NA NA NA
## covid_positive_why___9 covid_positive_why___10 covid_positive_why___11
## 1 0 0 0
## 2 NA NA NA
## 3 NA NA NA
## 4 NA NA NA
## 5 NA NA NA
## 6 NA NA NA
## covid_positive_why___12 covid_positive_why___13 covid_positive_why___14
## 1 0 0 0
## 2 NA NA NA
## 3 NA NA NA
## 4 NA NA NA
## 5 NA NA NA
## 6 NA NA NA
## covid_positive_why___15
## 1 0
## 2 NA
## 3 NA
## 4 NA
## 5 NA
## 6 NA
## covid_positive_other
## 1 data from open-ended variables have been omited to protect rivacy and anonymity, please contact authors if you require ccess for your research questions
## 2 data from open-ended variables have been omited to protect rivacy and anonymity, please contact authors if you require ccess for your research questions
## 3 data from open-ended variables have been omited to protect rivacy and anonymity, please contact authors if you require ccess for your research questions
## 4 data from open-ended variables have been omited to protect rivacy and anonymity, please contact authors if you require ccess for your research questions
## 5 data from open-ended variables have been omited to protect rivacy and anonymity, please contact authors if you require ccess for your research questions
## 6 data from open-ended variables have been omited to protect rivacy and anonymity, please contact authors if you require ccess for your research questions
## covid_positive_groups
## 1 data from open-ended variables have been omited to protect rivacy and anonymity, please contact authors if you require ccess for your research questions
## 2 data from open-ended variables have been omited to protect rivacy and anonymity, please contact authors if you require ccess for your research questions
## 3 data from open-ended variables have been omited to protect rivacy and anonymity, please contact authors if you require ccess for your research questions
## 4 data from open-ended variables have been omited to protect rivacy and anonymity, please contact authors if you require ccess for your research questions
## 5 data from open-ended variables have been omited to protect rivacy and anonymity, please contact authors if you require ccess for your research questions
## 6 data from open-ended variables have been omited to protect rivacy and anonymity, please contact authors if you require ccess for your research questions
## covid_positive_most
## 1 data from open-ended variables have been omited to protect rivacy and anonymity, please contact authors if you require ccess for your research questions
## 2 data from open-ended variables have been omited to protect rivacy and anonymity, please contact authors if you require ccess for your research questions
## 3 data from open-ended variables have been omited to protect rivacy and anonymity, please contact authors if you require ccess for your research questions
## 4 data from open-ended variables have been omited to protect rivacy and anonymity, please contact authors if you require ccess for your research questions
## 5 data from open-ended variables have been omited to protect rivacy and anonymity, please contact authors if you require ccess for your research questions
## 6 data from open-ended variables have been omited to protect rivacy and anonymity, please contact authors if you require ccess for your research questions
## covid_negative covid_negative_what___1 covid_negative_what___2
## 1 NA 0 0
## 2 NA NA NA
## 3 NA NA NA
## 4 NA NA NA
## 5 NA NA NA
## 6 NA NA NA
## covid_negative_what___3 covid_negative_what___4 covid_negative_what___5
## 1 0 0 0
## 2 NA NA NA
## 3 NA NA NA
## 4 NA NA NA
## 5 NA NA NA
## 6 NA NA NA
## covid_negative_what___6 covid_negative_what___7 covid_negative_what___8
## 1 0 0 0
## 2 NA NA NA
## 3 NA NA NA
## 4 NA NA NA
## 5 NA NA NA
## 6 NA NA NA
## covid_negative_other
## 1 data from open-ended variables have been omited to protect rivacy and anonymity, please contact authors if you require ccess for your research questions
## 2 data from open-ended variables have been omited to protect rivacy and anonymity, please contact authors if you require ccess for your research questions
## 3 data from open-ended variables have been omited to protect rivacy and anonymity, please contact authors if you require ccess for your research questions
## 4 data from open-ended variables have been omited to protect rivacy and anonymity, please contact authors if you require ccess for your research questions
## 5 data from open-ended variables have been omited to protect rivacy and anonymity, please contact authors if you require ccess for your research questions
## 6 data from open-ended variables have been omited to protect rivacy and anonymity, please contact authors if you require ccess for your research questions
## covid_negative_most
## 1 data from open-ended variables have been omited to protect rivacy and anonymity, please contact authors if you require ccess for your research questions
## 2 data from open-ended variables have been omited to protect rivacy and anonymity, please contact authors if you require ccess for your research questions
## 3 data from open-ended variables have been omited to protect rivacy and anonymity, please contact authors if you require ccess for your research questions
## 4 data from open-ended variables have been omited to protect rivacy and anonymity, please contact authors if you require ccess for your research questions
## 5 data from open-ended variables have been omited to protect rivacy and anonymity, please contact authors if you require ccess for your research questions
## 6 data from open-ended variables have been omited to protect rivacy and anonymity, please contact authors if you require ccess for your research questions
## demographics_complete monthly_survey_complete mental_health___1
## 1 2 NA 0
## 2 NA NA NA
## 3 NA NA NA
## 4 NA NA NA
## 5 NA NA NA
## 6 NA NA NA
## mental_health___2 mental_health___3 mental_health___4 mental_health___5
## 1 0 0 0 0
## 2 NA NA NA NA
## 3 NA NA NA NA
## 4 NA NA NA NA
## 5 NA NA NA NA
## 6 NA NA NA NA
## mental_health___6 mental_health___7 mental_health___8 mental_health___9
## 1 0 0 0 0
## 2 NA NA NA NA
## 3 NA NA NA NA
## 4 NA NA NA NA
## 5 NA NA NA NA
## 6 NA NA NA NA
## mental_health___10 mental_health___11 mental_health___12 mental_health___13
## 1 0 0 0 0
## 2 NA NA NA NA
## 3 NA NA NA NA
## 4 NA NA NA NA
## 5 NA NA NA NA
## 6 NA NA NA NA
## mental_health___14 mental_health___15
## 1 0 1
## 2 NA NA
## 3 NA NA
## 4 NA NA
## 5 NA NA
## 6 NA NA
## mental_health_other
## 1 data from open-ended variables have been omited to protect rivacy and anonymity, please contact authors if you require ccess for your research questions
## 2 data from open-ended variables have been omited to protect rivacy and anonymity, please contact authors if you require ccess for your research questions
## 3 data from open-ended variables have been omited to protect rivacy and anonymity, please contact authors if you require ccess for your research questions
## 4 data from open-ended variables have been omited to protect rivacy and anonymity, please contact authors if you require ccess for your research questions
## 5 data from open-ended variables have been omited to protect rivacy and anonymity, please contact authors if you require ccess for your research questions
## 6 data from open-ended variables have been omited to protect rivacy and anonymity, please contact authors if you require ccess for your research questions
## mental_health_recovery
## 1 data from open-ended variables have been omited to protect rivacy and anonymity, please contact authors if you require ccess for your research questions
## 2 data from open-ended variables have been omited to protect rivacy and anonymity, please contact authors if you require ccess for your research questions
## 3 data from open-ended variables have been omited to protect rivacy and anonymity, please contact authors if you require ccess for your research questions
## 4 data from open-ended variables have been omited to protect rivacy and anonymity, please contact authors if you require ccess for your research questions
## 5 data from open-ended variables have been omited to protect rivacy and anonymity, please contact authors if you require ccess for your research questions
## 6 data from open-ended variables have been omited to protect rivacy and anonymity, please contact authors if you require ccess for your research questions
## treatment1
## 1 1
## 2 NA
## 3 NA
## 4 NA
## 5 NA
## 6 NA
## treatment1_other
## 1 data from open-ended variables have been omited to protect rivacy and anonymity, please contact authors if you require ccess for your research questions
## 2 data from open-ended variables have been omited to protect rivacy and anonymity, please contact authors if you require ccess for your research questions
## 3 data from open-ended variables have been omited to protect rivacy and anonymity, please contact authors if you require ccess for your research questions
## 4 data from open-ended variables have been omited to protect rivacy and anonymity, please contact authors if you require ccess for your research questions
## 5 data from open-ended variables have been omited to protect rivacy and anonymity, please contact authors if you require ccess for your research questions
## 6 data from open-ended variables have been omited to protect rivacy and anonymity, please contact authors if you require ccess for your research questions
## treatment1_format
## 1 data from open-ended variables have been omited to protect rivacy and anonymity, please contact authors if you require ccess for your research questions
## 2 data from open-ended variables have been omited to protect rivacy and anonymity, please contact authors if you require ccess for your research questions
## 3 data from open-ended variables have been omited to protect rivacy and anonymity, please contact authors if you require ccess for your research questions
## 4 data from open-ended variables have been omited to protect rivacy and anonymity, please contact authors if you require ccess for your research questions
## 5 data from open-ended variables have been omited to protect rivacy and anonymity, please contact authors if you require ccess for your research questions
## 6 data from open-ended variables have been omited to protect rivacy and anonymity, please contact authors if you require ccess for your research questions
## treatment1_format_other
## 1 data from open-ended variables have been omited to protect rivacy and anonymity, please contact authors if you require ccess for your research questions
## 2 data from open-ended variables have been omited to protect rivacy and anonymity, please contact authors if you require ccess for your research questions
## 3 data from open-ended variables have been omited to protect rivacy and anonymity, please contact authors if you require ccess for your research questions
## 4 data from open-ended variables have been omited to protect rivacy and anonymity, please contact authors if you require ccess for your research questions
## 5 data from open-ended variables have been omited to protect rivacy and anonymity, please contact authors if you require ccess for your research questions
## 6 data from open-ended variables have been omited to protect rivacy and anonymity, please contact authors if you require ccess for your research questions
## mental_health_undiagnosed treatment_complete big_5_1 big_5_2 big_5_3 big_5_4
## 1 2 6 6 2 2
## 2 NA NA NA NA NA
## 3 NA NA NA NA NA
## 4 NA NA NA NA NA
## 5 NA NA NA NA NA
## 6 NA NA NA NA NA
## big_5_5 big_5_6 big_5_7 big_5_8 big_5_9 big_5_10 big_5_11 big_5_12 big_5_13
## 1 2 6 5 5 6 5 5 5 7
## 2 NA NA NA NA NA NA NA NA NA
## 3 NA NA NA NA NA NA NA NA NA
## 4 NA NA NA NA NA NA NA NA NA
## 5 NA NA NA NA NA NA NA NA NA
## 6 NA NA NA NA NA NA NA NA NA
## big_5_14 big_5_15 university_1 university_offer university_offer2
## 1 3 6 NA NA NA
## 2 NA NA NA NA NA
## 3 NA NA NA NA NA
## 4 NA NA NA NA NA
## 5 NA NA NA NA NA
## 6 NA NA NA NA NA
## university_offer3 personality_complete pswq_a_1 pswq_a_2 pswq_a_3 pswq_a_4
## 1 NA 2 1 5 1 5
## 2 NA NA NA NA NA NA
## 3 NA NA NA NA NA NA
## 4 NA NA NA NA NA NA
## 5 NA NA NA NA NA NA
## 6 NA NA NA NA NA NA
## pswq_a_5 pswq_a_6 pswq_a_7 pswq_a_8 pswq_a_9 pswq_a_10 pswq_a_11 pswq_a_12
## 1 5 5 5 1 5 1 1 5
## 2 NA NA NA NA NA NA NA NA
## 3 NA NA NA NA NA NA NA NA
## 4 NA NA NA NA NA NA NA NA
## 5 NA NA NA NA NA NA NA NA
## 6 NA NA NA NA NA NA NA NA
## pswq_a_13 pswq_a_14 pswq_a_15 pswq_a_16 pswq_c_1 pswq_c_2 pswq_c_3 pswq_c_4
## 1 5 5 4 5 NA NA NA NA
## 2 NA NA NA NA NA NA NA NA
## 3 NA NA NA NA NA NA NA NA
## 4 NA NA NA NA NA NA NA NA
## 5 NA NA NA NA NA NA NA NA
## 6 NA NA NA NA NA NA NA NA
## pswq_c_5 pswq_c_6 pswq_c_7 pswq_c_8 pswq_c_9 pswq_c_10 pswq_c_11 pswq_c_12
## 1 NA NA NA NA NA NA NA NA
## 2 NA NA NA NA NA NA NA NA
## 3 NA NA NA NA NA NA NA NA
## 4 NA NA NA NA NA NA NA NA
## 5 NA NA NA NA NA NA NA NA
## 6 NA NA NA NA NA NA NA NA
## pswq_c_13 pswq_c_14 pswq_complete iou_1 iou_2 iou_3 iou_4 iou_5 iou_6 iou_7
## 1 NA NA 2 4 3 5 2 3 3 3
## 2 NA NA NA NA NA NA NA NA NA NA
## 3 NA NA NA NA NA NA NA NA NA NA
## 4 NA NA NA NA NA NA NA NA NA NA
## 5 NA NA NA NA NA NA NA NA NA NA
## 6 NA NA NA NA NA NA NA NA NA NA
## iou_8 iou_9 iou_10 iou_11 iou_12 iou_13 iou_14 iou_15 iou_16 iou_17 iou_18
## 1 4 3 5 3 2 1 2 3 5 3 3
## 2 NA NA NA NA NA NA NA NA NA NA NA
## 3 NA NA NA NA NA NA NA NA NA NA NA
## 4 NA NA NA NA NA NA NA NA NA NA NA
## 5 NA NA NA NA NA NA NA NA NA NA NA
## 6 NA NA NA NA NA NA NA NA NA NA NA
## iou_19 iou_20 iou_21 iou_22 iou_23 iou_24 iou_25 iou_26 iou_27 iou12_complete
## 1 3 2 3 4 2 4 3 3 5 2
## 2 NA NA NA NA NA NA NA NA NA NA
## 3 NA NA NA NA NA NA NA NA NA NA
## 4 NA NA NA NA NA NA NA NA NA NA
## 5 NA NA NA NA NA NA NA NA NA NA
## 6 NA NA NA NA NA NA NA NA NA NA
## mfq_26_1 mfq_26_2 mfq_26_3 mfq_26_4 mfq_26_5 mfq_26_6 mfq_26_7 mfq_26_8
## 1 4 3 2 3 4 5 3 5
## 2 NA NA NA NA NA NA NA NA
## 3 NA NA NA NA NA NA NA NA
## 4 NA NA NA NA NA NA NA NA
## 5 NA NA NA NA NA NA NA NA
## 6 NA NA NA NA NA NA NA NA
## mfq_26_9 mfq_26_10 mfq_26_11 mfq_26_12 mfq_26_13 mfq_26_14 mfq_26_15
## 1 3 3 2 5 5 4 5
## 2 NA NA NA NA NA NA NA
## 3 NA NA NA NA NA NA NA
## 4 NA NA NA NA NA NA NA
## 5 NA NA NA NA NA NA NA
## 6 NA NA NA NA NA NA NA
## mfq_26_16 mfq_26_17 mfq_26_18 mfq_26_19 mfq_26_20 mfq26_complete rse_1 rse_2
## 1 5 6 6 6 5 2 2 4
## 2 NA NA NA NA NA NA NA NA
## 3 NA NA NA NA NA NA NA NA
## 4 NA NA NA NA NA NA NA NA
## 5 NA NA NA NA NA NA NA NA
## 6 NA NA NA NA NA NA NA NA
## rse_3 rse_4 rse_5 rse_6 rse_7 rse_8 rse_9 rse_10 rse10_complete
## 1 4 3 2 4 3 4 2 2 2
## 2 NA NA NA NA NA NA NA NA NA
## 3 NA NA NA NA NA NA NA NA NA
## 4 NA NA NA NA NA NA NA NA NA
## 5 NA NA NA NA NA NA NA NA NA
## 6 NA NA NA NA NA NA NA NA NA
## weekly_survey_complete monthly_onethird_complete school_1 school_2
## 1 2 2 NA NA
## 2 2 NA NA NA
## 3 2 NA NA NA
## 4 2 NA NA NA
## 5 2 NA NA NA
## 6 2 NA NA NA
## homeschool_1 homeschool_2 homeschool_3 homeschool_4 school_support_1
## 1 NA NA NA NA NA
## 2 NA NA NA NA NA
## 3 NA NA NA NA NA
## 4 NA NA NA NA NA
## 5 NA NA NA NA NA
## 6 NA NA NA NA NA
## school_support_2 school_support_3 school_support_4 school_support_5
## 1 NA NA NA NA
## 2 NA NA NA NA
## 3 NA NA NA NA
## 4 NA NA NA NA
## 5 NA NA NA NA
## 6 NA NA NA NA
## school_stress school_pos_neg_1 school_pos_neg_2 school_pos_neg_3
## 1 NA NA NA NA
## 2 NA NA NA NA
## 3 NA NA NA NA
## 4 NA NA NA NA
## 5 NA NA NA NA
## 6 NA NA NA NA
## school_pos_neg_4 school_pos_neg_5 school_pos_neg_6 school_pos_neg_7
## 1 NA NA NA NA
## 2 NA NA NA NA
## 3 NA NA NA NA
## 4 NA NA NA NA
## 5 NA NA NA NA
## 6 NA NA NA NA
## school_pos_neg_8 school_pos_neg_9 school_pos_neg_10 school_pos_neg_11
## 1 NA NA NA NA
## 2 NA NA NA NA
## 3 NA NA NA NA
## 4 NA NA NA NA
## 5 NA NA NA NA
## 6 NA NA NA NA
## pas_covid_1 pas_covid_2 pas_covid_3 pas_covid_4 pas_covid_5 pas_covid_6
## 1 4 2 2 2 5 3
## 2 5 3 4 2 4 2
## 3 5 3 4 3 4 2
## 4 4 3 4 2 4 2
## 5 4 3 4 3 4 2
## 6 4 3 4 2 4 2
## pas_covid_7 pas_covid_8 pas_covid_9 covid_complete pss_1 pss_2 pss_3 pss_4
## 1 3 4 4 2 3 4 3 5
## 2 2 2 4 2 2 4 4 2
## 3 2 2 4 2 3 4 5 1
## 4 2 2 4 2 4 2 2 3
## 5 2 2 4 2 3 3 3 2
## 6 2 2 4 2 1 4 4 2
## pss4_complete phq_1 phq_2 phq_3 phq_4 phq_5 phq_6 phq_7 phq_8 phq_9
## 1 2 2 1 1 2 1 1 2 1 1
## 2 2 1 1 1 2 1 1 1 1 1
## 3 2 1 1 1 1 1 1 1 1 1
## 4 2 3 2 2 2 1 1 4 1 1
## 5 2 2 2 2 2 1 1 2 1 1
## 6 2 1 1 2 2 1 1 2 1 1
## phq9_complete gad_1 gad_2 gad_3 gad_4 gad_5 gad_6 gad_7 gad7_complete
## 1 2 2 2 2 2 2 2 1 2
## 2 2 2 2 2 2 1 2 1 2
## 3 2 2 2 2 2 1 2 1 2
## 4 2 4 4 2 4 4 4 1 2
## 5 2 2 2 2 2 2 3 1 2
## 6 2 2 2 1 2 1 2 1 2
## mfq_state_1 mfq_state_2 mfq_state_3 mfq_state_4 mfq_state_5 mfq_state_6
## 1 4 2 4 4 3 4
## 2 5 5 5 5 4 5
## 3 6 4 4 5 5 5
## 4 3 2 2 3 3 3
## 5 4 3 3 4 3 3
## 6 5 3 3 5 5 5
## mfq_state_7 mfq_state_8 mfqs11_complete weeklymid_complete
## 1 3 5 2 NA
## 2 5 6 2 2
## 3 5 6 2 2
## 4 3 5 2 2
## 5 3 5 2 2
## 6 5 5 2 2
## monthly_twothird_complete other_sleep sleep_hours other_isolation_adult_1
## 1 NA 3 3 2
## 2 NA 4 3 NA
## 3 NA 4 3 NA
## 4 NA 2 3 NA
## 5 NA 3 3 NA
## 6 NA 2 2 NA
## other_isolation_adult_2 other_isolation_adult_3 other_isolation_child_1
## 1 2 2 NA
## 2 NA NA NA
## 3 NA NA NA
## 4 NA NA NA
## 5 NA NA NA
## 6 NA NA NA
## other_isolation_child_2 other_isolation_child_3 other_isolation_adult_4
## 1 NA NA 3
## 2 NA NA NA
## 3 NA NA NA
## 4 NA NA NA
## 5 NA NA NA
## 6 NA NA NA
## other_isolation_child_4 other_support_1 other_support_2 other_support_3
## 1 NA 3 4 1
## 2 NA 5 4 2
## 3 NA 3 3 4
## 4 NA 2 2 4
## 5 NA 2 2 3
## 6 NA 2 2 3
## other_support_4 other_support_5 other_support_6 other_smoking other_alcohol
## 1 2 3 2 0 0
## 2 3 3 3 0 0
## 3 4 4 3 0 0
## 4 4 4 2 0 0
## 5 2 3 2 0 0
## 6 3 3 2 0 0
## rmother_complete edeq_1 edeq_2 edeq_3 edeq_4 edeq_5 edeq_6 edeq_7 edeq_8
## 1 2 1 1 1 1 2 4 1 1
## 2 2 1 1 1 1 2 2 1 1
## 3 2 1 1 1 1 2 1 NA 1
## 4 2 2 1 1 1 2 1 1 1
## 5 2 1 1 1 1 2 1 1 1
## 6 2 1 1 1 1 2 1 1 1
## edeq_9 edeq_10 edeq_11 edeq_12 edeq12_complete media_tv
## 1 1 1 2 3 2 0.5
## 2 2 1 3 3 2 0.5
## 3 2 1 3 3 2 0.5
## 4 1 1 2 3 2 0.75
## 5 1 1 2 3 2 0.75
## 6 1 1 3 3 2 0.75
## media_why_tv_socialise media_why_tv_avoid media_why_tv_work media_why_tv_fun
## 1 NA NA 1 NA
## 2 4 1 1 4
## 3 4 1 1 1
## 4 4 1 1 4
## 5 4 1 1 4
## 6 4 1 1 4
## media_why_tv_news media_why_tv_nothing media_playing media_why_playing_social
## 1 NA NA 1.00 NA
## 2 1 1 0.00 NA
## 3 1 1 0.50 4
## 4 1 1 0.00 NA
## 5 1 1 0.25 NA
## 6 1 1 0.00 NA
## media_why_playing_avoid media_why_play_work media_why_playing_fun
## 1 NA NA NA
## 2 NA NA NA
## 3 1 1 4
## 4 NA NA NA
## 5 NA NA NA
## 6 NA NA NA
## media_why_playing_news media_why_playing_nothing media_social_media
## 1 NA NA 0.50
## 2 NA NA 0.25
## 3 1 1 0.00
## 4 NA NA 0.25
## 5 NA NA 0.00
## 6 NA NA 0.00
## media_why_visit_social media_why_visit_avoid media_why_visit_work
## 1 NA NA NA
## 2 3 1 1
## 3 NA NA NA
## 4 NA NA NA
## 5 NA NA NA
## 6 NA NA NA
## media_why_visit_fun media_why_visit_news media_why_visit_nothing
## 1 NA NA NA
## 2 1 1 3
## 3 NA NA NA
## 4 NA NA NA
## 5 NA NA NA
## 6 NA NA NA
## media_messaging media_why_message_social media_why_message_avoid
## 1 0.50 5 1
## 2 1.00 5 1
## 3 0.50 4 1
## 4 1.00 NA NA
## 5 0.50 NA NA
## 6 0.75 4 1
## media_why_message_work media_why_message_fun media_why_message_news
## 1 1 1 5
## 2 1 1 1
## 3 1 1 4
## 4 NA NA NA
## 5 NA NA NA
## 6 1 1 1
## media_why_message_nothing media_video media_why_video_social
## 1 1 0.50 NA
## 2 1 0.00 NA
## 3 1 1.00 4
## 4 NA 0.25 NA
## 5 NA 0.00 NA
## 6 1 2.00 4
## media_why_video_avoid media_why_video_work media_why_video_fun
## 1 NA NA NA
## 2 NA NA NA
## 3 1 4 1
## 4 NA NA NA
## 5 NA NA NA
## 6 1 4 1
## media_why_video_news media_why_video_nothing media_playing_voice
## 1 NA NA 0.0
## 2 NA NA 0.0
## 3 1 1 1.0
## 4 NA NA 0.0
## 5 NA NA 0.0
## 6 1 1 0.5
## media_why_voice_social media_why_voice_avoid media_why_voice_work
## 1 NA NA NA
## 2 NA NA NA
## 3 4 1 4
## 4 NA NA NA
## 5 NA NA NA
## 6 1 1 4
## media_why_voice_fun media_why_voice_news media_why_voice_nothing
## 1 NA NA NA
## 2 NA NA NA
## 3 1 1 1
## 4 NA NA NA
## 5 NA NA NA
## 6 1 1 1
## activity_exercise_inside activity_exercise_outside activity_exercise_outside2
## 1 0.0 0.00 0.00
## 2 3.0 0.00 0.00
## 3 0.5 0.25 0.00
## 4 0.5 0.00 0.00
## 5 0.5 0.50 0.00
## 6 1.0 0.25 0.25
## technology_complete brs_1 brs_2 brs_3 brs_4 brs_5 brs_6 brs_complete swemws_1
## 1 2 NA NA NA NA NA NA 0 2
## 2 2 NA NA NA NA NA NA NA 3
## 3 2 NA NA NA NA NA NA NA 4
## 4 2 NA NA NA NA NA NA 0 3
## 5 2 NA NA NA NA NA NA NA 4
## 6 2 NA NA NA NA NA NA NA 3
## swemws_2 swemws_3 swemws_4 swemws_5 swemws_6 swemws_7 swemws7_complete
## 1 2 2 2 4 3 5 2
## 2 4 3 4 4 4 5 2
## 3 3 3 4 5 3 5 2
## 4 4 1 1 3 2 4 2
## 5 2 2 3 4 2 4 2
## 6 4 2 3 4 2 5 2
## oxford_arc_study_optional_task_complete family_code start_date Weekday
## 1 NA NA 4/29/20 4
## 2 NA NA 4/29/20 4
## 3 NA NA 4/29/20 4
## 4 NA NA 4/29/20 4
## 5 NA NA 4/29/20 4
## 6 NA NA 4/29/20 4
## weekStart surveysran surveyscompleted remove big5_O big5_C big5_E big5_A
## 1 4/27/20 19 19 0 16 16 4 11
## 2 5/4/20 19 19 0 NA NA NA NA
## 3 5/11/20 19 19 0 NA NA NA NA
## 4 5/18/20 19 19 0 NA NA NA NA
## 5 5/25/20 19 19 0 NA NA NA NA
## 6 6/1/20 19 19 0 NA NA NA NA
## big5_N pswq_a_total pswq_c_total iou_total mfq_20_total rse_total
## 1 16 79 NA 86 84 23
## 2 NA NA NA NA NA NA
## 3 NA NA NA NA NA NA
## 4 NA NA NA NA NA NA
## 5 NA NA NA NA NA NA
## 6 NA NA NA NA NA NA
## pas_covid_total pss_total phq_total gad_total mfq_state_total
## 1 29 13 12 13 29
## 2 28 8 10 12 40
## 3 29 7 9 12 40
## 4 27 15 17 23 24
## 5 28 11 14 14 28
## 6 27 7 12 11 36
## isolation4_child isolation4_adult edeq brs swemws
## 1 NA 9 19 NA 20
## 2 NA NA 19 NA 27
## 3 NA NA NA NA 27
## 4 NA NA 17 NA 18
## 5 NA NA 16 NA 21
## 6 NA NA 17 NA 23
# use the str() command to see what kinds of variables are in your dataframe
str(df)
## 'data.frame': 8867 obs. of 423 variables:
## $ X : int 1 2 3 4 5 6 7 8 9 10 ...
## $ record_id : int 12 12 12 12 12 12 12 12 12 12 ...
## $ redcap_event_name : chr "baseline" "week2" "week3" "week4" ...
## $ redcap_data_access_group : logi NA NA NA NA NA NA ...
## $ date : chr "4/29/20" "5/6/20" "5/13/20" "5/20/20" ...
## $ group : chr "parent" "parent" "parent" "parent" ...
## $ consent : int 1 NA NA NA NA NA NA NA NA NA ...
## $ consent_parent : int NA NA NA NA NA NA NA NA NA NA ...
## $ information_and_consent_complete : int 2 NA NA NA NA NA NA NA NA NA ...
## $ age : int NA NA NA NA NA NA NA NA NA NA ...
## $ gender : chr "female" "female" "female" "female" ...
## $ trans : chr "no" "no" "no" "no" ...
## $ sexual_orientation : chr "Heterosexual/Straight" "Heterosexual/Straight" "Heterosexual/Straight" "Heterosexual/Straight" ...
## $ ethnicity : chr "White - British, Irish, other" NA NA NA ...
## $ relationship_status : chr "In a relationship/married and cohabiting" NA NA NA ...
## $ country : chr "United Kingdom" "United Kingdom" "United Kingdom" "United Kingdom" ...
## $ uk_country : chr NA NA NA NA ...
## $ urban_rural : int 1 NA NA NA NA NA NA NA NA NA ...
## $ dwelling : int 1 NA NA NA NA NA NA NA NA NA ...
## $ dwelling_other : chr "" "" "" "" ...
## $ tenure : int 2 NA NA NA NA NA NA NA NA NA ...
## $ rooms : int 7 NA NA NA NA NA NA NA NA NA ...
## $ n_adults : int 2 NA NA NA NA NA NA NA NA NA ...
## $ n_under_18s : int 1 NA NA NA NA NA NA NA NA NA ...
## $ income : int 5 NA NA NA NA NA NA NA NA NA ...
## $ education : int 7 NA NA NA NA NA NA NA NA NA ...
## $ employment : int 3 NA NA NA NA NA NA NA NA NA ...
## $ health___1 : int 0 NA NA NA NA NA NA NA NA NA ...
## $ health___2 : int 0 NA NA NA NA NA NA NA NA NA ...
## $ health___3 : int 0 NA NA NA NA NA NA NA NA NA ...
## $ health___4 : int 0 NA NA NA NA NA NA NA NA NA ...
## $ health___5 : int 0 NA NA NA NA NA NA NA NA NA ...
## $ health___6 : int 0 NA NA NA NA NA NA NA NA NA ...
## $ health___7 : int 0 NA NA NA NA NA NA NA NA NA ...
## $ health___8 : int 0 NA NA NA NA NA NA NA NA NA ...
## $ health___9 : int 0 NA NA NA NA NA NA NA NA NA ...
## $ health___10 : int 1 NA NA NA NA NA NA NA NA NA ...
## $ health___11 : int 0 NA NA NA NA NA NA NA NA NA ...
## $ medical_other : chr "data from open-ended variables have been omited to protect rivacy and anonymity, please contact authors if you "| __truncated__ "data from open-ended variables have been omited to protect rivacy and anonymity, please contact authors if you "| __truncated__ "data from open-ended variables have been omited to protect rivacy and anonymity, please contact authors if you "| __truncated__ "data from open-ended variables have been omited to protect rivacy and anonymity, please contact authors if you "| __truncated__ ...
## $ pregnant___1 : int 1 NA NA NA NA NA NA NA NA NA ...
## $ pregnant___2 : int 0 NA NA NA NA NA NA NA NA NA ...
## $ pregnant___3 : int 0 NA NA NA NA NA NA NA NA NA ...
## $ smoking : int 1 NA NA NA NA NA NA NA NA NA ...
## $ alcohol : int 0 NA NA NA NA NA NA NA NA NA ...
## $ caring_responsibilities___1 : int 0 NA NA NA NA NA NA NA NA NA ...
## $ caring_responsibilities___2 : int 0 NA NA NA NA NA NA NA NA NA ...
## $ caring_responsibilities___3 : int 0 NA NA NA NA NA NA NA NA NA ...
## $ pet___1 : int 1 NA NA NA NA NA NA NA NA NA ...
## $ pet___2 : int 0 NA NA NA NA NA NA NA NA NA ...
## $ pet___3 : int 0 NA NA NA NA NA NA NA NA NA ...
## $ pet___4 : int 0 NA NA NA NA NA NA NA NA NA ...
## $ pet___5 : int 0 NA NA NA NA NA NA NA NA NA ...
## $ pet___6 : int 0 NA NA NA NA NA NA NA NA NA ...
## $ support_parents_1 : int NA NA NA NA NA NA NA NA NA NA ...
## $ support_parents_2 : int NA NA NA NA NA NA NA NA NA NA ...
## $ support_parents_3 : int NA NA NA NA NA NA NA NA NA NA ...
## $ support_parents_4 : int NA NA NA NA NA NA NA NA NA NA ...
## $ support_friends_1 : int NA NA NA NA NA NA NA NA NA NA ...
## $ support_friends_2 : int NA NA NA NA NA NA NA NA NA NA ...
## $ support_friends_3 : int NA NA NA NA NA NA NA NA NA NA ...
## $ support_friends_4 : int NA NA NA NA NA NA NA NA NA NA ...
## $ support_employment_1 : int NA NA NA NA NA NA NA NA NA NA ...
## $ support_employment_2 : int NA NA NA NA NA NA NA NA NA NA ...
## $ support_employment_3 : int NA NA NA NA NA NA NA NA NA NA ...
## $ support_employment_4 : int NA NA NA NA NA NA NA NA NA NA ...
## $ support_employment_5 : int NA NA NA NA NA NA NA NA NA NA ...
## $ support_employment_6 : int NA NA NA NA NA NA NA NA NA NA ...
## $ covid_positive_1 : int NA NA NA NA NA NA NA NA NA NA ...
## $ covid_positive_why___1 : int 0 NA NA NA NA NA NA NA NA NA ...
## $ covid_positive_why___2 : int 0 NA NA NA NA NA NA NA NA NA ...
## $ covid_positive_why___3 : int 0 NA NA NA NA NA NA NA NA NA ...
## $ covid_positive_why___4 : int 0 NA NA NA NA NA NA NA NA NA ...
## $ covid_positive_why___5 : int 0 NA NA NA NA NA NA NA NA NA ...
## $ covid_positive_why___6 : int 0 NA NA NA NA NA NA NA NA NA ...
## $ covid_positive_why___7 : int 0 NA NA NA NA NA NA NA NA NA ...
## $ covid_positive_why___8 : int 0 NA NA NA NA NA NA NA NA NA ...
## $ covid_positive_why___9 : int 0 NA NA NA NA NA NA NA NA NA ...
## $ covid_positive_why___10 : int 0 NA NA NA NA NA NA NA NA NA ...
## $ covid_positive_why___11 : int 0 NA NA NA NA NA NA NA NA NA ...
## $ covid_positive_why___12 : int 0 NA NA NA NA NA NA NA NA NA ...
## $ covid_positive_why___13 : int 0 NA NA NA NA NA NA NA NA NA ...
## $ covid_positive_why___14 : int 0 NA NA NA NA NA NA NA NA NA ...
## $ covid_positive_why___15 : int 0 NA NA NA NA NA NA NA NA NA ...
## $ covid_positive_other : chr "data from open-ended variables have been omited to protect rivacy and anonymity, please contact authors if you "| __truncated__ "data from open-ended variables have been omited to protect rivacy and anonymity, please contact authors if you "| __truncated__ "data from open-ended variables have been omited to protect rivacy and anonymity, please contact authors if you "| __truncated__ "data from open-ended variables have been omited to protect rivacy and anonymity, please contact authors if you "| __truncated__ ...
## $ covid_positive_groups : chr "data from open-ended variables have been omited to protect rivacy and anonymity, please contact authors if you "| __truncated__ "data from open-ended variables have been omited to protect rivacy and anonymity, please contact authors if you "| __truncated__ "data from open-ended variables have been omited to protect rivacy and anonymity, please contact authors if you "| __truncated__ "data from open-ended variables have been omited to protect rivacy and anonymity, please contact authors if you "| __truncated__ ...
## $ covid_positive_most : chr "data from open-ended variables have been omited to protect rivacy and anonymity, please contact authors if you "| __truncated__ "data from open-ended variables have been omited to protect rivacy and anonymity, please contact authors if you "| __truncated__ "data from open-ended variables have been omited to protect rivacy and anonymity, please contact authors if you "| __truncated__ "data from open-ended variables have been omited to protect rivacy and anonymity, please contact authors if you "| __truncated__ ...
## $ covid_negative : int NA NA NA NA NA NA NA NA NA NA ...
## $ covid_negative_what___1 : int 0 NA NA NA NA NA NA NA NA NA ...
## $ covid_negative_what___2 : int 0 NA NA NA NA NA NA NA NA NA ...
## $ covid_negative_what___3 : int 0 NA NA NA NA NA NA NA NA NA ...
## $ covid_negative_what___4 : int 0 NA NA NA NA NA NA NA NA NA ...
## $ covid_negative_what___5 : int 0 NA NA NA NA NA NA NA NA NA ...
## $ covid_negative_what___6 : int 0 NA NA NA NA NA NA NA NA NA ...
## $ covid_negative_what___7 : int 0 NA NA NA NA NA NA NA NA NA ...
## $ covid_negative_what___8 : int 0 NA NA NA NA NA NA NA NA NA ...
## $ covid_negative_other : chr "data from open-ended variables have been omited to protect rivacy and anonymity, please contact authors if you "| __truncated__ "data from open-ended variables have been omited to protect rivacy and anonymity, please contact authors if you "| __truncated__ "data from open-ended variables have been omited to protect rivacy and anonymity, please contact authors if you "| __truncated__ "data from open-ended variables have been omited to protect rivacy and anonymity, please contact authors if you "| __truncated__ ...
## $ covid_negative_most : chr "data from open-ended variables have been omited to protect rivacy and anonymity, please contact authors if you "| __truncated__ "data from open-ended variables have been omited to protect rivacy and anonymity, please contact authors if you "| __truncated__ "data from open-ended variables have been omited to protect rivacy and anonymity, please contact authors if you "| __truncated__ "data from open-ended variables have been omited to protect rivacy and anonymity, please contact authors if you "| __truncated__ ...
## $ demographics_complete : int 2 NA NA NA NA NA NA NA NA NA ...
## $ monthly_survey_complete : int NA NA NA NA NA NA NA NA NA NA ...
## [list output truncated]
d <- subset(df, redcap_event_name == "baseline", select=c( group, gender, n_adults, n_under_18s))
d %>%
map(table, useNA = "always")
## $group
##
## parent young person <NA>
## 606 1467 0
##
## $gender
##
## female I use another term male Prefer not to say
## 1472 47 311 55
## <NA>
## 188
##
## $n_adults
##
## 0 1 2 3 4 5 6 7 8 9 10 22 <NA>
## 35 381 1047 261 80 16 6 2 1 1 1 1 241
##
## $n_under_18s
##
## 0 1 2 3 4 5 6 7 8 11 13 14 24 <NA>
## 338 669 582 181 40 14 2 1 3 1 1 1 1 239
#Univarite Normality
describe(d)
## vars n mean sd median trimmed mad min max range skew
## group* 1 2073 1.71 0.45 2 1.76 0.00 1 2 1 -0.91
## gender* 2 1885 1.44 0.87 1 1.27 0.00 1 4 3 1.61
## n_adults 3 1832 2.05 1.03 2 1.97 0.00 0 22 22 5.06
## n_under_18s 4 1834 1.48 1.28 1 1.38 1.48 0 24 24 4.67
## kurtosis se
## group* -1.17 0.01
## gender* 0.98 0.02
## n_adults 81.09 0.02
## n_under_18s 63.13 0.03
table(d$gender, useNA = "always")
##
## female I use another term male Prefer not to say
## 1472 47 311 55
## <NA>
## 188
d$gender_rc[d$gender == "female"] <- "f"
d$gender_rc[d$gender == "male"] <- "m"
d$gender_rc[d$gender == "I use another term"] <- "nb"
d$gender_rc[d$gender == "Prefer not to say"] <- NA
table(d$gender_rc, useNA = "always")
##
## f m nb <NA>
## 1472 311 47 243
table(d$group, useNA = "always")
##
## parent young person <NA>
## 606 1467 0
d$group_rc[d$group == "I am aged 13-18"] <- "adolesence"
d$group_rc[d$group == "I am a parent/carer of a 13-18 year old"] <- "adult"
table(d$group, useNA = "always")
##
## parent young person <NA>
## 606 1467 0
table(d$n_adults, useNA = "always")
##
## 0 1 2 3 4 5 6 7 8 9 10 22 <NA>
## 35 381 1047 261 80 16 6 2 1 1 1 1 241
d$n_adults_rc[d$n_adults == 1] <- 4
d$n_adults_rc[d$n_adults == 2] <- 3
d$n_adults_rc[d$n_adults == 3] <- 2
d$n_adults_rc[d$n_adults == 4] <- 1
table(d$n_adults, useNA = "always")
##
## 0 1 2 3 4 5 6 7 8 9 10 22 <NA>
## 35 381 1047 261 80 16 6 2 1 1 1 1 241
table(d$n_under_18s, useNA = "always")
##
## 0 1 2 3 4 5 6 7 8 11 13 14 24 <NA>
## 338 669 582 181 40 14 2 1 3 1 1 1 1 239
d$n_under_18s_rc[d$n_under_18s == 1] <- 4
d$n_under_18s_rc[d$n_under_18s == 2] <- 3
d$n_under_18s_rc[d$n_under_18s == 3] <- 2
d$n_under_18s_rc[d$n_under_18s == 4] <- 1
table(d$n_under_18s_rc, useNA = "always")
##
## 1 2 3 4 <NA>
## 40 181 582 669 601
# use the subset() command to finalize your current dataframe
# in the version of the subset() command below, a dash is added to the 'c' argument so that instead of keeping the columns listed in the parentheses, R will drop them instead
d2 <- subset(d, select=c( group, gender_rc, n_adults, n_under_18s))
write.csv(d2, file="arc_test.csv", row.names = F)
# use the write.csv() command to export your finalized dataframe
write.csv(d2, file="gss_final.csv", row.names = F)