fmt_est | R Documentation |
Formats mean sd/se to a format as x.x or x.x (x.xx) if both mean and sd/sd are defined.
fmt_est(
mean,
sd = rep(NA, length(mean)),
digits = c(1, 1),
width = c(4, 3) + digits
)
mean |
A numeric vector of mean value. |
sd |
A numeric vector of standard deviation value. |
digits |
Digits of each column, i.e., format as x.x (x.xx). |
width |
Width of each column. |
The function assumes 1 column or 2 columns:
If there is only 1 column, only represent mean.
If there are 2 columns, represent mean (sd) or mean(se). Decimals will understand the number will be formatted as x.x (x.xx).
The same data frame with additional attributes for page features.
The contents of this section are shown in PDF user manual only.
fmt_est(mean(iris$Petal.Length), sd(iris$Petal.Length))
fmt_est(mean(iris$Petal.Length), sd(iris$Petal.Length), digits = c(2, 3))
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.