R/partMean.R

Defines functions partMean

partMean <- function(x, na.rm = TRUE){

  # must be datashield valid (more than <datashield.privacyLevel> rows):
  if(!.dsBase_isValidDSS(x)){
    return(NA)
  }

  return(list(mean = mean(x, na.rm = na.rm), len = length(x)))

}
sib-swiss/dsSwissKnife documentation built on Nov. 27, 2024, 6:03 p.m.