R/se.R

Defines functions se

Documented in se

#' Calculates standard error
#'
#' @param x numeric or integer
#'
#' @return value
#'
#' @examples
#' se(CN_mass_data$n_pct)
#' plyr::ddply(CN_mass_data, plyr::.(species, pool_label), plyr::summarise, se = se(n_pct))
#' @importFrom stats sd
#' @export
se <- function(x){
  sd(x, na.rm = T) / sqrt(sum(!is.na(x) == T))
}

Try the NitrogenUptake2016 package in your browser

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

NitrogenUptake2016 documentation built on May 1, 2019, 11:31 p.m.