Añadida función sem.

This commit is contained in:
2022-02-12 12:05:34 +01:00
parent 728b2429f6
commit 46b6efc706
2 changed files with 21 additions and 0 deletions
+4
View File
@@ -0,0 +1,4 @@
sem <- function(x, na.rm=F){
sem<-sd(x, na.rm = na.rm)/sqrt(length(x))
return(sem)
}
+17
View File
@@ -0,0 +1,17 @@
\name{sem}
\alias{sem}
\title{sem}
\usage{
sem(x, na.rm=T)
}
\arguments{
\item{x}{A numeric vector or an R object but not a factor coercible to numeric by as.double(x).}
\item{na.rm}{A logical value indicating whether NA values should be stripped before the computation proceeds.}
}
\description{
This function computes the Standard Error of the Mean of the values in x. If na.rm is TRUE then missing values are removed before computation proceeds.
}
\examples{
v<-rnorm(10)
sem(v)
}