Browse Source

Añadida función sem.

main
Marcel Costa 2 years ago
parent
commit
46b6efc706
2 changed files with 21 additions and 0 deletions
  1. +4
    -0
      R/sem.R
  2. +17
    -0
      man/sem.Rd

+ 4
- 0
R/sem.R

@ -0,0 +1,4 @@
sem <- function(x, na.rm=F){
sem<-sd(x, na.rm = na.rm)/sqrt(length(x))
return(sem)
}

+ 17
- 0
man/sem.Rd

@ -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)
}

Loading…
Cancel
Save