Description Usage Arguments Value See Also Examples
Allows mixing and matching of local pseudo-connections and normal opal remote connections in the same object
1 | datashield.login(x, ...)
|
... |
optional, the parameters for opal::datashield.login (logins dataframe, etc). See the documentation for that function for details. |
pseudo.conn |
optional, a list containing the local "servers" to "connect" to. Normally the output of dssCreatePseudoServers (or a subset of it) |
an opal object containing 0 or more local pseudo-connections and 0 or more real opal connections
dssCreatePseudoServers
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 | # Mixed opal connections, local(fake, in my session) + remote(real)
# Read a real connection dataframe from a file
logindata <- read.delim('/path to your/logindata.txt')
# say it looks like this:
logindata
server url user password table
1 real1 https://remote.opal.node some_user some_pass proj.TABLE
# create 2 local connections:
locals <- dssCreatePseudoServers(c('fake1', 'fake2'))
#login the the remote node:
opals <- datashield.login(locals, logindata)
# opals contains 3 connections, 2 locals, one remote. You can examine them:
opals
#' # we can use it to load 3 chunks of the 'iris' dataset, each on a different node
datashield.aggregate(opals['fake1'], as.symbol('partialData("iris", 1, 40)'))
datashield.aggregate(opals['fake2'], as.symbol('partialData("iris", 41, 100)'))
datashield.aggregate(opals['real1'], as.symbol('partialData("iris", 101, 150)'))
# load dsBaseClient and run some ds... commands:
library(dsBaseClient)
ds.summary('iris', datasources = opals)
ds.levels('iris$Species', datasources = opals)
# and some dss... ones:
dssShowFactors('iris')
dssCov('iris')
# where's my local data?
ls(envir = opals$fake1$envir)
ls(envir = opals$fake2$envir)
# or
opals[c('fake1', 'fake2')]
datashield.logout(opals)
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.