Añadida función sem.
This commit is contained in:
@@ -0,0 +1,4 @@
|
||||
sem <- function(x, na.rm=F){
|
||||
sem<-sd(x, na.rm = na.rm)/sqrt(length(x))
|
||||
return(sem)
|
||||
}
|
||||
+17
@@ -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)
|
||||
}
|
||||
Reference in New Issue
Block a user