R/svar.R

svar <- function(x, na.rm=TRUE){			#BeginFnc
  if(na.rm==FALSE){
    x <- na.omit(x)
  }
  output <- 1/length(x)*sum((x-mean(x))^2)
  return(output)
}					#EndFnc

Try the rpsychi package in your browser

Any scripts or data that you put into this service are public.

rpsychi documentation built on May 1, 2019, 10:10 p.m.