Skip to content

Commit 4516a08

Browse files
Merge branch 'v6.4.0-dev' into 6.4.0-6.3.6_update
2 parents 50a441b + 7c42073 commit 4516a08

188 files changed

Lines changed: 613 additions & 409 deletions

File tree

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

.Rbuildignore

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -17,8 +17,8 @@
1717
^R/secure.global.ranking.md$
1818
^_pkgdown\.yml$
1919
^docs$
20-
^dsBase_6.3.6.tar.gz$
21-
^dsBase_6.3.6-permissive.tar.gz$
20+
^dsBase_6.4.0.tar.gz$
21+
^dsBase_6.4.0-permissive.tar.gz$
2222
^dsDanger_6.3.4.tar.gz$
2323
^\.circleci$
2424
^\.circleci/config\.yml$

.circleci/config.yml

Lines changed: 14 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -49,7 +49,6 @@ jobs:
4949
sudo Rscript -e "install.packages('data.table', dependencies=TRUE)"
5050
sudo Rscript -e "install.packages('methods', dependencies=TRUE)"
5151
sudo Rscript -e "install.packages('dplyr', dependencies=TRUE)"
52-
5352
sudo Rscript -e "install.packages('DSI', dependencies=TRUE)"
5453
sudo Rscript -e "install.packages('DSOpal', dependencies=TRUE)"
5554
sudo Rscript -e "install.packages('DSLite', dependencies=TRUE)"
@@ -58,9 +57,22 @@ jobs:
5857
sudo Rscript -e "install.packages('DSMolgenisArmadillo', dependencies=TRUE)"
5958
sudo Rscript -e "install.packages('DescTools', dependencies=TRUE)"
6059
sudo Rscript -e "install.packages('e1071', dependencies=TRUE)"
60+
61+
sudo Rscript -e "install.packages('RANN', dependencies=TRUE)"
62+
sudo Rscript -e "install.packages('stringr', dependencies=TRUE)"
63+
sudo Rscript -e "install.packages('lme4', dependencies=TRUE)"
64+
sudo Rscript -e "install.packages('dplyr', dependencies=TRUE)"
65+
sudo Rscript -e "install.packages('reshape2', dependencies=TRUE)"
66+
sudo Rscript -e "install.packages('polycor', dependencies=TRUE)"
67+
sudo Rscript -e "install.packages('splines', dependencies=TRUE)"
68+
sudo Rscript -e "install.packages('gamlss', dependencies=TRUE)"
69+
sudo Rscript -e "install.packages('gamlss.dist', dependencies=TRUE)"
70+
sudo Rscript -e "install.packages('mice', dependencies=TRUE)"
71+
sudo Rscript -e "install.packages('childsds', dependencies=TRUE)"
72+
sudo Rscript -e "install.packages('xml2', dependencies=TRUE)"
6173
- run:
6274
command: |
63-
sudo Rscript -e 'library(covr); covr::codecov(token = "'$CODECOV_TOKEN'", quiet=FALSE)'
75+
sudo Rscript -e 'library(covr); options("default_driver"="DSLiteDriver"); covr::codecov(token="'$CODECOV_TOKEN'", quiet=FALSE)'
6476
workflows:
6577
build:
6678
jobs:

DESCRIPTION

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
Package: dsBaseClient
22
Title: 'DataSHIELD' Client Side Base Functions
3-
Version: 6.3.6.9000
3+
Version: 6.4.0.9000
44
Description: Base 'DataSHIELD' functions for the client side. 'DataSHIELD' is a software package which allows
55
you to do non-disclosive federated analysis on sensitive data. 'DataSHIELD' analytic functions have
66
been designed to only share non disclosive summary statistics, with built in automated output

NAMESPACE

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,7 @@
33
export(ds.Boole)
44
export(ds.abs)
55
export(ds.asCharacter)
6+
export(ds.asDataFrame)
67
export(ds.asDataMatrix)
78
export(ds.asFactor)
89
export(ds.asFactorSimple)
@@ -56,7 +57,6 @@ export(ds.lexis)
5657
export(ds.list)
5758
export(ds.listClientsideFunctions)
5859
export(ds.listDisclosureSettings)
59-
export(ds.listOpals)
6060
export(ds.listServersideFunctions)
6161
export(ds.lmerSLMA)
6262
export(ds.log)
@@ -101,7 +101,6 @@ export(ds.rowColCalc)
101101
export(ds.sample)
102102
export(ds.scatterPlot)
103103
export(ds.seq)
104-
export(ds.setDefaultOpals)
105104
export(ds.setSeed)
106105
export(ds.skewness)
107106
export(ds.sqrt)

R/.Rapp.history

Whitespace-only changes.

R/ds.Boole.R

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -172,13 +172,13 @@ ds.Boole<-function(V1=NULL, V2=NULL, Boolean.operator=NULL, numeric.output=TRUE,
172172
stop(paste0("An unrecognized Boolean operator, ", Boolean.operator, ", has provide"), call.=FALSE)
173173
}
174174

175-
# if no value spcified for output object, then specify a default
175+
# if no value specified for output object, then specify a default
176176
if(is.null(newobj)){
177177
newobj <- paste0(V1,"_Boole")
178178
}
179179

180180
# CALL THE MAIN SERVER SIDE FUNCTION
181-
calltext <- call("BooleDS", V1, V2, BO.n, na.assign,numeric.output)
181+
calltext <- call("BooleDS", V1, V2, BO.n, na.assign, numeric.output)
182182
DSI::datashield.assign(datasources, newobj, calltext)
183183

184184
#############################################################################################################

R/ds.asCharacter.R

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,6 @@
1818
#' it is in a valid form.
1919
#' @examples
2020
#' \dontrun{
21-
#' ## Version 6, for version 5 see the Wiki
2221
#'
2322
#' # connecting to the Opal servers
2423
#'

R/ds.asDataFrame.R

Lines changed: 82 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,82 @@
1+
#' @title Converts a server-side R object into a data frame
2+
#' @description Coerces an R object into a data frame maintaining original
3+
#' class for all columns in data frames.
4+
#' @details This function is based on the native R function \code{data.frame}.
5+
#'
6+
#' Server function called: \code{asDataFrameDS}.
7+
#' @param x.name a character string providing the name of the input object to be coerced to
8+
#' a data frame
9+
#' @param newobj a character string that provides the name for the output object
10+
#' that is stored on the data servers. Default \code{asdataframe.newobj}.
11+
#' @param datasources a list of \code{\link[DSI]{DSConnection-class}}
12+
#' objects obtained after login. If the \code{datasources} argument is not specified
13+
#' the default set of connections will be used: see \code{\link[DSI]{datashield.connections_default}}.
14+
#' @return \code{ds.asDataFrame} returns the object converted into a data frame
15+
#' that is written to the server-side.
16+
#' @examples
17+
#' \dontrun{
18+
#' ## Version 6, for version 5 see the Wiki
19+
#'
20+
#' # connecting to the Opal servers
21+
#'
22+
#' require('DSI')
23+
#' require('DSOpal')
24+
#' require('dsBaseClient')
25+
#'
26+
#' builder <- DSI::newDSLoginBuilder()
27+
#' builder$append(server = "study1",
28+
#' url = "http://192.168.56.100:8080/",
29+
#' user = "administrator", password = "datashield_test&",
30+
#' table = "CNSIM.CNSIM1", driver = "OpalDriver")
31+
#' builder$append(server = "study2",
32+
#' url = "http://192.168.56.100:8080/",
33+
#' user = "administrator", password = "datashield_test&",
34+
#' table = "CNSIM.CNSIM2", driver = "OpalDriver")
35+
#' builder$append(server = "study3",
36+
#' url = "http://192.168.56.100:8080/",
37+
#' user = "administrator", password = "datashield_test&",
38+
#' table = "CNSIM.CNSIM3", driver = "OpalDriver")
39+
#' logindata <- builder$build()
40+
#'
41+
#' connections <- DSI::datashield.login(logins = logindata, assign = TRUE, symbol = "D")
42+
#'
43+
#' # Converting the R object into a data frame
44+
#' ds.asDataFrame(x.name = "D",
45+
#' newobj = "mat.obj",
46+
#' datasources = connections[1]) #only the first server is used ("study1")
47+
#'
48+
#' # Clear the Datashield R sessions and logout
49+
#' datashield.logout(connections)
50+
#'
51+
#' }
52+
#' @author Tim Cadman
53+
#' @export
54+
ds.asDataFrame <- function(x.name=NULL, newobj=NULL, datasources=NULL){
55+
56+
# look for DS connections
57+
if(is.null(datasources)){
58+
datasources <- datashield.connections_find()
59+
}
60+
61+
# ensure datasources is a list of DSConnection-class
62+
if(!(is.list(datasources) && all(unlist(lapply(datasources, function(d) {methods::is(d,"DSConnection")}))))){
63+
stop("The 'datasources' were expected to be a list of DSConnection-class objects", call.=FALSE)
64+
}
65+
66+
if(is.null(x.name)){
67+
stop("Please provide the name of the input vector!", call.=FALSE)
68+
}
69+
70+
# check if the input object is defined in all the studies
71+
isDefined(datasources, x.name)
72+
73+
# create a name by default if user did not provide a name for the new variable
74+
if(is.null(newobj)){
75+
newobj <- "asdataframe.newobj"
76+
}
77+
78+
# call the server side function that does the job
79+
calltext <- call("asDataFrameDS", x.name)
80+
DSI::datashield.assign(datasources, newobj, calltext)
81+
82+
}

R/ds.boxPlot.R

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -135,7 +135,7 @@ ds.boxPlot <- function(x, variables = NULL, group = NULL, group2 = NULL, xlabel
135135
}
136136
}
137137

138-
# Once all checks are passed, call the appropiate server functions
138+
# Once all checks are passed, call the appropriate server functions
139139
if("data.frame" %in% cls){
140140
ds.boxPlotGG_table(x, variables, group, group2, xlabel, ylabel, type, datasources)
141141
}

R/ds.glmSLMA.R

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -121,7 +121,7 @@
121121
#' \item{\code{"quasibinomial"}}{: a model with a binomial variance function - if P
122122
#' is the expected proportion of successes, and N is the number of "trials" (always
123123
#' 1 if analysing binary data which are formally described as having a Bernoulli
124-
#' distribution (binomial distribution with N=1) the variance function is N*(P)*(1-P).
124+
#' distribution (binomial distribution with N=1) the variance function is \code{N*(P)*(1-P)}.
125125
#' But the residual variance which is fixed to be 1.00 in
126126
#' a binomial model can take any value. This is achieved by a dispersion parameter
127127
#' which is estimated during the model fit (see quasipoisson information above).}}

0 commit comments

Comments
 (0)