| sem | R Documentation |
Compute the standard error of the mean (SEM), defined as the standard deviation of the sampling distribution of the mean.
The SEM therefore quantifies the precision of the sample mean as an estimate of the population mean.
If na.rm is TRUE then missing values are removed before computation proceeds.
sem(x, na.rm = FALSE)
x |
a numeric vector |
na.rm |
logical. Should missing values be removed? |
A numeric scalar – the standard error of the mean.
The SEM of a zero-length vector (after removal of NAs if na.rm = TRUE) is not defined and gives an error.
The SEM of a length-one vector is NA.
sd
## Calculate mean and SEM for variable soil depth
mean(schedenenv$soil_depth)
sem(schedenenv$soil_depth)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.