dssCov: The covariance matrix of a data frame or matrix

View source: R/dssCov.R

dssCovR Documentation

The covariance matrix of a data frame or matrix

Description

The covariance matrix of a data frame or matrix

Usage

dssCov(
  x,
  collist = NULL,
  type = "combine",
  na.rm = FALSE,
  wt = NULL,
  cor = FALSE,
  center = TRUE,
  method = "unbiased",
  async = TRUE,
  datasources = NULL
)

Arguments

x

a character name of the data frame

collist

a vector of columns for the covariances. 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.

na.rm

a logical default FALSE, should NAs be removed before calculation? The TRUE value is processed only if type = 'split' and it calls the cov() function on each node with use = "pairwise.complete.obs"

wt

if set, either a vector of weights or the name of such a vector. If the former, the same vector will be sent to all the nodes. If the latter, different vectors can be first uploaded (with dssUpload) to the respective nodes. In both cases, the function will execute cov.wt on the nodes and it will return a matrix per node irrespectve of the the parameter "type" above

cor

center, method - parameters for the cov.wt function, ignored if wt is NULL (the default)

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 (or one $global element if type='combine'). Each element contains a vector with the respective column means, the covariance matrix and the number of rows


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