dssColMeans: Column means of a data frame

View source: R/dssColMeans.R

dssColMeansR Documentation

Column means of a data frame

Description

This function is similar to the R function colMeans

Usage

dssColMeans(
  x = NULL,
  na.rm = TRUE,
  collist = NULL,
  type = "combine",
  async = TRUE,
  datasources = NULL
)

Arguments

x

a character name of the data frame

na.rm

a logical. Should missing values (including NaN) be omitted from the calculations?

collist

a vector of columns whose means will be calculated. They must exist in x. If null, all the *numeric* columns from x will be used.

type

a character which represents the type of analysis to carry out. If type is set to 'combine', global column means are calculated if type is set to 'split', the column means are calculated separately for each node.

async

a logical, see datashield.aggregate

datasources

a list of opal objects obtained after logging into the opal servers (see datashield.login)

Value

a list with one element for each node (and one $global element if type='combine'). Each element contains, for each numeric column, the respective mean, number of rows and number of NAs


sib-swiss/dsSwissKnifeClient documentation built on July 16, 2025, 6:25 p.m.