| iscamsummary | R Documentation |
summary calculates the five number summary, mean, and standard
deviation of the quantitative variable x. An optional second, categorical
variable can be specified and values will be calculated separately for
each group. The number of digits in output can also be specified. Skewness is
sample skewness: g_1 := \frac{m_3}{m_2^{3/2}}, where
m_2 := \frac{1}{n}\sum_{i=1}^{n}(x_i - \bar{x})^2
and m_3 := \frac{1}{n}\sum_{i=1}^{n}(x_i - \bar{x})^3 are the second
and third central sample moments.
iscamsummary(x, explanatory = NULL, digits = 3)
x |
data to summarize. |
explanatory |
(optional) explanatory variable to group by. |
digits |
(optional) number of digits to round to, defaults to 3. |
A table with some summary statistics of x.
set.seed(0)
fake_data <- rnorm(30) # simulating some data
groups <- sample(c("group1","group2"), 30, TRUE)
iscamsummary(fake_data)
iscamsummary(fake_data, explanatory = groups, digits = 2) # with groups
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.