se: Standard errors

Description Usage Arguments Original URL Author(s) See Also Examples

Description

This function computes the standard error (i.e. sd / sqrt(n)) of the values in x. If na.rm is TRUE then missing values are removed before computation proceeds.

Usage

1
se(x, na.rm = FALSE)

Arguments

x

A numeric vector or an R object which is coercible to one by as.vector.

na.rm

Logical. Should missing values be removed?

Original URL

http://cran.r-project.org/doc/manuals/R-intro.html

Author(s)

From the Writing R Extensions manual, modified by Mathieu Basille basille@ufl.edu

See Also

var and sd for the variance and standard deviation.

Examples

1
2
3
4
5
6
7
8
bla <- rnorm(1000, sd = 100)
sd(bla)
sqrt(var(bla)/length(bla))
se(bla)

is.na(bla) <- 200:300
sd(bla, na.rm = TRUE)
se(bla, na.rm = TRUE)

basille/basr documentation built on May 11, 2019, 8:32 p.m.