R/descriptives_by_cluster.R
mean_sd_tab.Rd
Means and standard deviations by group variable formatted in table
mean_sd_tab(features, groups, decimals = 2, na.rm = FALSE, return_diff = FALSE)
A table that illustrates means and standard deviations (in brackets)
data(iris)
mean_sd_tab(iris[, -5], iris[, 5])
#> Sepal.Length Sepal.Width Petal.Length Petal.Width
#> setosa "5.01 (0.35)" "3.43 (0.38)" "1.46 (0.17)" "0.25 (0.11)"
#> versicolor "5.94 (0.52)" "2.77 (0.31)" "4.26 (0.47)" "1.33 (0.20)"
#> virginica "6.59 (0.64)" "2.97 (0.32)" "5.55 (0.55)" "2.03 (0.27)"