datashield.login: Extends datashield.login from package opal

Description Usage Arguments Value See Also Examples

View source: R/pseudoNodes.R

Description

Allows mixing and matching of local pseudo-connections and normal opal remote connections in the same object

Usage

1

Arguments

...

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)

Value

an opal object containing 0 or more local pseudo-connections and 0 or more real opal connections

See Also

dssCreatePseudoServers

Examples

 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)

IulianD/dsSwissKnifeClient documentation built on June 23, 2020, 4:38 p.m.