Description Usage Arguments Value Examples
Calculate mean an standard error from a numeric vector and return a character string.
1 | simple_mean(x, digits = 2, units = "", na.rm = FALSE)
|
x |
numeric vector. |
digits |
Minimum number of signiicant digits past the decimal point to keep. Default: 2. |
units |
(optional) string vector with units, Default: NULL |
na.rm |
a logical value indicating whether NA values should be stripped before the computation proceeds. |
A string with the format "Mean ± SEM"
1 2 3 4 5 6 7 8 9 10 11 | ## Not run:
if(interactive()){
## Basic example
x <- rnorm(50 + rnorm(50))
simple_mean(x, digits = 3)
## With units
simple_mean(iris$Petal.Length, units = "cm")
}
## End(Not run)
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.