View source: R/summ_mean_wsd.R
summ_mean_wsd | R Documentation |
Create center with spread data summary for table
summ_mean_wsd(x, digits = 1, na.rm = T)
x |
Numeric Vector |
na.rm |
logical value for exclusion of NA values from calculation of mean and sd |
limits |
numeric vector of length 2 for lower and upper limit, defaults to IQR |
Character String of the form mean(x) (sd(x))
set.seed(1234)
x = sample(1:100, size = 100, replace = T)
summ_mean_wsd(x,digits = 3)
summ_mean_wsd(c(x, NA), digits = 1)
summ_mean_wsd(c(x, NA), digits = 1, na.rm = T)
data("iris")
bind_rows(
iris %>%
group_by(Species) %>%
summarise_all(summ_mean_wsd),
iris %>%
select(-Species)
summarise_all(summ_mean_wsd) %>%
mutate(Species = "All")
)
bind_rows(
iris %>%
group_by(Species) %>%
summarise_all(summ_mean_wsd, digits = 2),
iris %>%
select(-Species)
summarise_all(summ_mean_wsd, digits = 2) %>%
mutate(Species = "All")
)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.