Skip to content

Commit

Permalink
Merge pull request #79 from RSGInc/76-update-hts_summary_cat-and-hts_…
Browse files Browse the repository at this point in the history
…summary-examples

76 update hts summary cat and hts summary examples
  • Loading branch information
erika-redding authored Jan 26, 2024
2 parents 903238b + f9d1912 commit e159a03
Show file tree
Hide file tree
Showing 5 changed files with 46 additions and 8 deletions.
2 changes: 2 additions & 0 deletions .Rbuildignore
Original file line number Diff line number Diff line change
Expand Up @@ -7,3 +7,5 @@
^CONTRIBUTING.md$
^LICENSE.md$
^scratch.R
^_pkgdown.yml
^docs
17 changes: 16 additions & 1 deletion R/hts_summary.R
Original file line number Diff line number Diff line change
Expand Up @@ -67,7 +67,22 @@
#' summarize_by = 'age',
#' summarize_vartype = 'numeric',
#' wtname = 'trip_weight')
#'
#'
#' DT = hts_prep_data(summarize_var = 'race',
#' summarize_by = 'age',
#' variables_dt = variable_list,
#' data = list('hh' = hh,
#' 'person' = person,
#' 'day' = day,
#' 'trip' = trip,
#' 'vehicle' = vehicle))$cat
#' output = hts_summary(prepped_dt = DT,
#' summarize_var = 'race',
#' summarize_by = 'age',
#' summarize_vartype = 'categorical',
#' wtname = 'person_weight',
#' checkbox_valname = 'value',
#' checkbox_yesval = 1)


hts_summary = function(
Expand Down
9 changes: 6 additions & 3 deletions R/hts_summary_cat.R
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,8 @@
#' hts_summary_cat(prepped_dt = DT,
#' summarize_var = 'age',
#' wtname = 'person_weight')
#' DT = hts_prep_data(summarize_var = 'age',
#'
#' DT = hts_prep_data(summarize_var = 'race',
#' summarize_by = 'employment',
#' variables_dt = variable_list,
#' data = list('hh' = hh,
Expand All @@ -49,9 +50,11 @@
#' 'trip' = trip,
#' 'vehicle' = vehicle))$cat
#' hts_summary_cat(prepped_dt = DT,
#' summarize_var = 'age',
#' summarize_var = 'race',
#' summarize_by = 'employment',
#' wtname = 'person_weight')
#' wtname = 'person_weight',
#' checkbox_valname = 'value',
#' checkbox_yesval = 1)
#'
#' DT = hts_prep_data(summarize_var = 'employment',
#' summarize_by = c('race', 'income_detailed', 'gender'),
Expand Down
17 changes: 16 additions & 1 deletion man/hts_summary.Rd

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

9 changes: 6 additions & 3 deletions man/hts_summary_cat.Rd

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

0 comments on commit e159a03

Please sign in to comment.