Skip to contents

Data manipulation

combine_answers()
Combine answers of a multiple answers question
cut_quartiles()
Cut a continuous variable in quartiles
long_to_periods()
Transform a data frame from long format to period format
long_to_seq()
Transform a data frame from long format to a sequence obect
periods_to_long()
Transform a data frame from period format to long format
unrowwise()
Remove row-wise grouping

Descriptive statistics

mean_sd()
Compute means, standard deviations and confidence intervals by sub-groups
median_iqr()
Compute median, quartiles and interquartile range by sub-groups
proportion()
Compute proportions
round_preserve_sum()
Round values while preserve their rounded sum in R

Statistical tests

fisher.simulate.p() svyttest_oneway()
Additional tests for gtsummary
svyoneway()
Test for Equal Means for survey design object

Statistical plots

plot_categorical()
Plot a categorical variable by sub-groups
plot_continuous()
Plot a continuous variable by sub-groups
plot_means()
Plot means by sub-groups
plot_multiple_answers() plot_multiple_answers_dodge()
Plot a multiple answers question
plot_proportions() stratified_by() dummy_proportions()
Plot proportions by sub-groups
plot_trajectories() plot_periods()
Plot trajectories
safe_pal() scale_fill_safe() scale_colour_safe() scale_color_safe()
A safe discrete colour palette

Models

grouped_tbl_pivot_wider() multinom_add_global_p_pivot_wider() style_grouped_tbl()
Helpers for grouped tables generated with gtsummary
observed_vs_theoretical()
Plot observed vs predicted distribution of a fitted model
step_with_na()
Apply step(), taking into account missing values

Classification tree

plot_inertia_from_tree() get_inertia_from_tree()
Plot inertia, absolute loss and relative loss from a classification tree

Logical operators

is_different() is_equal() cumdifferent() num_cycle()
Comparison tests considering NA as values to be compared

Utilities

Datasets

titanic
Titanic data set in long format