dssJoin | R Documentation |
Applies dplyr::xxx_join on the local nodes where xxx can be any of ('inner', 'full', 'left', 'right', 'semi', 'anti')
dssJoin(
what = NULL,
symbol = NULL,
by = NULL,
join.type = "full",
async = TRUE,
datasources = NULL
)
what |
a vector of names of dataframes |
symbol |
the name of the new dataframe |
by |
a character or a named vector, this goes straight into the 'by' parameter of dplyr::xxx_join. If nothing is supplied, 'SUBJID' is assumed. As per the dplyr documentation, to join by different variables on x and y use a named vector. For example, by = c("a" = "b") will match x.a to y.b. |
join.type |
a character, the type of the join, the possible values are above. Default is 'full' |
async |
same as in datashield.assign |
datasources |
same as in datashield.assign |
It doesn't return anything, it creates a dataframe, the result of the join
# open a local pseudo connection:
library(DSLite)
dslite.server1 <<- newDSLiteServer(config = defaultDSConfiguration(include=c('dsSwissKnife')))
builder <- newDSLoginBuilder()
builder$append(server="server1", url='dslite.server1',driver = "DSLiteDriver")
logindata <- builder$build()
opals <- datashield.login(logins = logindata)
# load the iris dataset
datashield.aggregate(opals[1], as.symbol('partialData("iris")'))
# join iris with itself just for fun:
dssJoin(c('iris', 'iris'), symbol = 'joined_iris', by = 'Sepal.Length', join.type = 'inner', datasources = opals)
session1 <- dslite.server1$getSession(dslite.server1$getSessionIds())
str(session1$joined_iris)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.