Skip to content

Commit

Permalink
Merge pull request #11 from ucsf-bhhi/stata-helpers
Browse files Browse the repository at this point in the history
Fix more variable names and types for Stata
  • Loading branch information
eveyp authored Apr 4, 2022
2 parents 892bc86 + 6f1aa9f commit 949d3d6
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 3 deletions.
2 changes: 1 addition & 1 deletion DESCRIPTION
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
Package: statewide.survey.tools
Title: Statewide Survey Tools
Version: 0.3.5
Version: 0.3.6
Authors@R:
person("Eve", "Perry", , "[email protected]", role = c("aut", "cre"))
Description: Helper tools for the Statewide Survey.
Expand Down
5 changes: 4 additions & 1 deletion R/fetch_redcap_data.R
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,10 @@ fetch_redcap_data = function(
col_types = readr::cols(
"age_self_report" = readr::col_double(),
"date" = readr::col_character(),
"episode_date" = readr::col_character(),
"housing_time_months" = readr::col_double(),
"housing_time_years" = readr::col_double(),
"jail_days" = readr::col_double(),
"jail_months" = readr::col_double(),
"stable_time_years" = readr::col_double(),
"yrs_ago" = readr::col_character()
)
Expand Down
4 changes: 3 additions & 1 deletion R/prepare_for_stata.R
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,9 @@ prepare_for_stata = function(data) {
history_of_homelessn_v_7 = history_of_homelessness_complete,
income_employment_an_v_8 = income_employment_and_benefits_timestamp,
income_employment_an_v_9 = income_employment_and_benefits_complete,
healthcare_utilizati_v_10 = healthcare_utilization_timestamp
healthcare_utilizati_v_10 = healthcare_utilization_timestamp,
healthcare_utilizati_v_11 = healthcare_utilization_complete,
phys_violence_6mo_b4_v_12 = phys_violence_6mo_b4_current_v2
) %>%
dplyr::rename_with(stata_safe_variable_names, everything())
}
Expand Down

0 comments on commit 949d3d6

Please sign in to comment.