ji.var.ds: Computes the variance of a vector or matrix

Description Usage Arguments Value Author(s) Examples

Description

Computes the variance of a vector or matrix

Usage

1
  ji.var.ds(x, y = NULL)

Arguments

x

a numeric vector, matrix or data frame.

y

NULL (default) or a vector, matrix or data frame with compatible dimensions to x.

Value

a single value if x and y are vectors and a matrix otherwise

Author(s)

Isaeva, J.

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
## Not run: 
# load the file that contains the login details
library(opal)
data(logindata)

# login and assign a numeric variable to R
myvar <- list("LAB_TSC","LAB_TRIG")
opals <- datashield.login(logins=logindata,assign=TRUE,variables=myvar)

# compute the variance of LAB_TSC
stat.var <- datashield.aggregate(opals, quote(ji.var.ds(D$LAB_TSC)))

# compute the variance of matrix (LAB_TSC,LAB_TRIG)
datashield.assign(opals,'dummy', quote(cbind(D$LAB_TSC,D$LAB_TRIG)))
stat.var <- datashield.aggregate(opals, quote(ji.var.ds(dummy)))

## End(Not run)

datashield/ji.dev.sv documentation built on May 14, 2019, 7:53 p.m.