check_sim_stats.Rd
check_sim_stats
Generates a table of the correlations and means of numeric columns in a data frame
check_sim_stats(dat, grp_by = NULL, digits = 2, usekable = FALSE)
dat | the existing dataframe |
---|---|
grp_by | an optional list of column names to group by |
digits | how many digits to round to (default = 2) |
usekable | logical. If TRUE, output with knitr::kable |
tibble or kable
check_sim_stats(iris, "Species")#> # A tibble: 12 x 8 #> Species var Sepal.Length Sepal.Width Petal.Length Petal.Width mean sd #> <fct> <chr> <dbl> <dbl> <dbl> <dbl> <dbl> <dbl> #> 1 setosa Sepal… 1 0.74 0.27 0.28 5.01 0.35 #> 2 setosa Sepal… 0.74 1 0.18 0.23 3.43 0.38 #> 3 setosa Petal… 0.27 0.18 1 0.33 1.46 0.17 #> 4 setosa Petal… 0.28 0.23 0.33 1 0.25 0.11 #> 5 versico… Sepal… 1 0.53 0.75 0.55 5.94 0.52 #> 6 versico… Sepal… 0.53 1 0.56 0.66 2.77 0.31 #> 7 versico… Petal… 0.75 0.56 1 0.79 4.26 0.47 #> 8 versico… Petal… 0.55 0.66 0.79 1 1.33 0.2 #> 9 virgini… Sepal… 1 0.46 0.86 0.28 6.59 0.64 #> 10 virgini… Sepal… 0.46 1 0.4 0.54 2.97 0.32 #> 11 virgini… Petal… 0.86 0.4 1 0.32 5.55 0.55 #> 12 virgini… Petal… 0.28 0.54 0.32 1 2.03 0.27