federatePCA | R Documentation |
Perform the principal component analysis for the virtual cohort.
federatePCA(loginFD,
logins,
func,
symbol,
ncomp = 2,
chunk = 500L,
mc.cores = 1)
loginFD |
Login information of the FD server (one of the servers containing cohort data). |
logins |
Login information of other servers containing cohort data. |
func |
Encoded definition of a function for preparation of raw data matrices. Two arguments are required: conns (list of Opal connections), symbol (name of the R symbol) (see datashield.assign). |
symbol |
Encoded vector of names of the R symbols to assign in the
DataSHIELD R session on each server in |
ncomp |
Number of components. Default, 2. |
chunk |
Size of chunks into what the resulting matrix is partitioned. Default, 500L. |
mc.cores |
Number of cores for parallel computing. Default, 1. |
PCA object
## Not run:
dataProc <- function(conns, symbol) {
DSI::datashield.assign(conns, symbol, 'test.CNSIM',
variables=c('LAB_TRIG', 'LAB_GLUC_ADJUSTED', 'PM_BMI_CONTINUOUS'))
}
federatePCA(.encode.arg(loginFD), .encode.arg(logins),
.encode.arg(dataProc, serialize.it = T),
.encode.arg("rawData"))
## End(Not run)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.