View source: R/uth_make_outcome_rate.R
uth_make_outcome_rate | R Documentation |
Use this function to aggregate counts and totals to then make rates in a data frame. A typical use case would involve a data frame with student ids, a Boolean variable to make a rate such as is_returned_next_fall or Is_graduated, as well as a collection of grouping attributes.
uth_make_outcome_rate(.data, rate_var, ...)
.data |
A data frame with columns you would like to aggregate on. |
rate_var |
A Boolean variable to make a rate such as is_returned_next_fall or Is_graduated. This must be the 2nd argument used in the function or must be hard coded as rate_var = . |
... |
The columns you would like to aggregate over. Don't forget the column you are counting, i.e. student number. all the grouping variables for a given metric. this can be a variables in "quotes" separated by commas or be it can be variables defined in a named list. Example uses: 'uth_make_outcome_rate(.data = grad_data_raw, rate_var = “is_graduated”, “cohort_start_term_id”, “gender_code”) grouping_list <- c(“cohort_start_term_id”, “gender_code”, “cohort_code_desc”) uth_make_outcome_rate(grad_data_raw, “is_graduated”, grouping_list) |
A table with aggregated counts, totals, and rates of column attributes
utHelpR::uth_make_outcome_rate(fake_enrollment, "is_graduated", "gender_code", "primary_degree_id")
utHelpR::uth_make_outcome_rate(fake_enrollment, "is_returned_next_fall", "student_type_code")
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.