Description Usage Arguments Details Examples
Create a data frame for charting from the freq_t_test and freq_prop_test outputs
1 2 |
tbl_df |
A df object created from either the freq_t_test or the freq_prop_test functions. |
subgroup |
A factor variable name that subgroups cases, in quotes. |
space_label |
A numeric value indicating how much to offset the icons from a geom_text label. This doesn't need a value if 'compare' is set to "w2w" or "curr". It is recommended to be 0.3 for proportions, but trial and error may be necessary. It definitely is for means. |
space_between |
A numeric value indicating how much to offset the icons from each other. A value is needed if 'compare' is set to "total", but can otherwise be ignored. It is recommended to be 0.1 for proportions, but trial and error may be necessary. It definitely is for means. |
compare |
A string value indicating how the result of significant differences will be displayed. This is expanded in the Details section. |
'all': The default setting. All significant differences will be displayed. This is to be used when comparing across subgroups.
'total': This setting is when you wish to compare a particular subgroup to the rest of the sample.
'w2w': This setting is for tracking waves in which we are only showing those significant differences from one wave to the next.
'curr': This setting is for tracking waves in which we are only showing those past waves that are significantly different from the current wave.
1 2 3 4 5 6 7 8 9 10 11 12 | ### With proportions:
gss_data1 <- dplyr::filter(gss_data, year == "2016",
conlegis %in% c("A GREAT DEAL", "ONLY SOME", "HARDLY ANY"))
my_results <- freq_prop_test(gss_data1, "conlegis", "region", weight = "wtssall")
tbl_sig(my_results, "region", space_label = 0.1, space_between = 0.2)
### With means:
gss_data1 <- dplyr::filter(gss_data, year == "2016", coninc > 0)
my_results <- freq_t_test(gss_data1, "coninc", "region", weight = "wtssnr")
tbl_sig(my_results, "region", space_label = 1, space_between = 4)
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.