Skip to content

Commit b74ee5d

Browse files
authored
Merge pull request #29 from datashield/v6.4.0-dev
V6.4.0 dev
2 parents d22ba51 + fe76d49 commit b74ee5d

650 files changed

Lines changed: 44340 additions & 26715 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: 10 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,11 +3,20 @@
33
^\.Rproj\.user$
44
^LICENSE.md$
55
^azure-pipelines\.yml$
6+
^opal_azure-pipelines\.yml$
7+
^armadillo_azure-pipelines\.yml$
68
^azure-pipelines_site\.pp$
79
^azure-pipelines_site-dsdanger\.pp$
810
^azure-pipelines_check\.Rout$
911
^azure-pipelines_test\.Rout$
12+
^tests/docker/armadillo/standard/log/.gitkeep$
1013
^checkDocumentationUpdated\.sh$
14+
^docker-compose_armadillo\.yml$
15+
^docker-compose_opal\.yml$
16+
^docker-compose\.yml$
17+
^R/secure.global.ranking.md$
1118
^_pkgdown\.yml$
1219
^docs$
13-
^pkgdown$
20+
^dsBase_6.3.1.tar.gz$
21+
^dsBase_6.3.1-permissive.tar.gz$
22+
^dsDanger_6.3.1.tar.gz$

.circleci/config.yml

Lines changed: 75 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,75 @@
1+
# Copyright (c) 2024 Arjuna Technologies, Newcastle upon Tyne. All rights reserved.
2+
3+
version: 2.1
4+
5+
jobs:
6+
dsbaseclient:
7+
docker:
8+
- image: cimg/base:current
9+
resource_class: small
10+
steps:
11+
- checkout
12+
- setup_remote_docker:
13+
docker_layout_caching: true
14+
- run: |
15+
echo "Building"
16+
echo " Repo Name: " $CIRCLE_PROJECT_REPONAME
17+
echo " Branch: " $CIRCLE_BRANCH
18+
echo " Tag: " $CIRCLE_TAG
19+
- run:
20+
command: |
21+
sudo apt-get update -y
22+
sudo apt-get install -y r-base-core cmake
23+
- run:
24+
command: |
25+
sudo apt-get install -y libxml2-dev
26+
sudo apt-get install -y libfontconfig1-dev
27+
sudo apt-get install -y libudunits2-dev
28+
sudo apt-get install -y libharfbuzz-dev
29+
sudo apt-get install -y libfribidi-dev
30+
sudo apt-get install -y libfreetype6-dev
31+
sudo apt-get install -y libpng-dev
32+
sudo apt-get install -y libtiff5-dev
33+
sudo apt-get install -y libjpeg-dev
34+
35+
- run:
36+
command: |
37+
sudo Rscript -e "install.packages('devtools', dependencies=TRUE)"
38+
sudo Rscript -e "install.packages('covr', dependencies=TRUE)"
39+
40+
sudo Rscript -e "install.packages('fields', dependencies=TRUE)"
41+
sudo Rscript -e "install.packages('meta', dependencies=TRUE)"
42+
sudo Rscript -e "install.packages('metafor', dependencies=TRUE)"
43+
sudo Rscript -e "install.packages('ggplot2', dependencies=TRUE)"
44+
sudo Rscript -e "install.packages('gridExtra', dependencies=TRUE)"
45+
sudo Rscript -e "install.packages('data.table', dependencies=TRUE)"
46+
sudo Rscript -e "install.packages('panelaggregation', dependencies=TRUE)"
47+
48+
sudo Rscript -e "install.packages('DSI', dependencies=TRUE)"
49+
sudo Rscript -e "install.packages('DSOpal', dependencies=TRUE)"
50+
sudo Rscript -e "install.packages('DSLite', dependencies=TRUE)"
51+
sudo Rscript -e "install.packages('MolgenisAuth', dependencies=TRUE)"
52+
sudo Rscript -e "install.packages('MolgenisArmadillo', dependencies=TRUE)"
53+
sudo Rscript -e "install.packages('DSMolgenisArmadillo', dependencies=TRUE)"
54+
sudo Rscript -e "install.packages('DescTools', dependencies=TRUE)"
55+
sudo Rscript -e "install.packages('e1071', dependencies=TRUE)"
56+
57+
sudo Rscript -e "install.packages('RANN', dependencies=TRUE)"
58+
sudo Rscript -e "install.packages('stringr', dependencies=TRUE)"
59+
sudo Rscript -e "install.packages('lme4', dependencies=TRUE)"
60+
sudo Rscript -e "install.packages('dplyr', dependencies=TRUE)"
61+
sudo Rscript -e "install.packages('reshape2', dependencies=TRUE)"
62+
sudo Rscript -e "install.packages('polycor', dependencies=TRUE)"
63+
sudo Rscript -e "install.packages('splines', dependencies=TRUE)"
64+
sudo Rscript -e "install.packages('gamlss', dependencies=TRUE)"
65+
sudo Rscript -e "install.packages('gamlss.dist', dependencies=TRUE)"
66+
sudo Rscript -e "install.packages('mice', dependencies=TRUE)"
67+
sudo Rscript -e "install.packages('childsds', dependencies=TRUE)"
68+
sudo Rscript -e "install.packages('xml2', dependencies=TRUE)"
69+
- run:
70+
command: |
71+
sudo Rscript -e 'library(covr); options("default_driver"="DSLiteDriver"); covr::codecov(token="'$CODECOV_TOKEN'", quiet=FALSE)'
72+
workflows:
73+
build:
74+
jobs:
75+
- dsbaseclient

.gitignore

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -10,3 +10,5 @@
1010
inst/tests/test-template.R
1111
azure-pipelines.Rout
1212
tests/testthat/connection_to_datasets/local_settings.csv
13+
tests/docker/armadillo/standard/logs/
14+
tests/docker/armadillo/standard/data/

DESCRIPTION

Lines changed: 10 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,20 +1,24 @@
11
Package: dsBaseClient
22
Title: DataSHIELD Client Functions
3-
Version: 6.1.1
4-
Author: DataSHIELD Developers <datashield@newcastle.ac.uk>
5-
Maintainer: DataSHIELD Developers <datashield@newcastle.ac.uk>
3+
Version: 6.3.1
4+
Author: DataSHIELD Developers <datashield@liverpool.ac.uk>
5+
Maintainer: DataSHIELD Developers <datashield@liverpool.ac.uk>
66
Description: DataSHIELD client functions for the client side.
77
License: GPL-3
88
Depends:
99
R (>= 3.5.0),
10-
DSI (>= 1.2.0)
10+
DSI (>= 1.3.0)
1111
Imports:
1212
fields,
1313
metafor,
14+
meta,
1415
ggplot2,
1516
gridExtra,
1617
data.table,
1718
panelaggregation,
18-
methods
19-
RoxygenNote: 7.1.1
19+
methods,
20+
dplyr
21+
Suggests:
22+
testthat
23+
RoxygenNote: 7.3.2
2024
Encoding: UTF-8

NAMESPACE

Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,13 +5,16 @@ export(ds.abs)
55
export(ds.asCharacter)
66
export(ds.asDataMatrix)
77
export(ds.asFactor)
8+
export(ds.asFactorSimple)
89
export(ds.asInteger)
910
export(ds.asList)
1011
export(ds.asLogical)
1112
export(ds.asMatrix)
1213
export(ds.asNumeric)
1314
export(ds.assign)
15+
export(ds.auc)
1416
export(ds.boxPlot)
17+
export(ds.bp_standards)
1518
export(ds.c)
1619
export(ds.cbind)
1720
export(ds.changeRefGroup)
@@ -28,16 +31,22 @@ export(ds.dataFrameSort)
2831
export(ds.dataFrameSubset)
2932
export(ds.densityGrid)
3033
export(ds.dim)
34+
export(ds.dmtC2S)
35+
export(ds.elspline)
3136
export(ds.exists)
3237
export(ds.exp)
38+
export(ds.forestplot)
39+
export(ds.gamlss)
3340
export(ds.getWGSR)
3441
export(ds.glm)
3542
export(ds.glmPredict)
3643
export(ds.glmSLMA)
3744
export(ds.glmSummary)
3845
export(ds.glmerSLMA)
3946
export(ds.heatmapPlot)
47+
export(ds.hetcor)
4048
export(ds.histogram)
49+
export(ds.igb_standards)
4150
export(ds.isNA)
4251
export(ds.isValid)
4352
export(ds.kurtosis)
@@ -53,6 +62,7 @@ export(ds.lmerSLMA)
5362
export(ds.log)
5463
export(ds.look)
5564
export(ds.ls)
65+
export(ds.lspline)
5666
export(ds.make)
5767
export(ds.matrix)
5868
export(ds.matrixDet)
@@ -67,13 +77,18 @@ export(ds.meanByClass)
6777
export(ds.meanSdGp)
6878
export(ds.merge)
6979
export(ds.message)
80+
export(ds.metadata)
81+
export(ds.mice)
7082
export(ds.names)
83+
export(ds.ns)
7184
export(ds.numNA)
85+
export(ds.qlspline)
7286
export(ds.quantileMean)
7387
export(ds.rBinom)
7488
export(ds.rNorm)
7589
export(ds.rPois)
7690
export(ds.rUnif)
91+
export(ds.ranksSecure)
7792
export(ds.rbind)
7893
export(ds.reShape)
7994
export(ds.recodeLevels)
@@ -99,6 +114,8 @@ export(ds.tapply)
99114
export(ds.tapply.assign)
100115
export(ds.testObjExists)
101116
export(ds.unList)
117+
export(ds.unique)
102118
export(ds.var)
103119
export(ds.vectorCalc)
104120
import(DSI)
121+
import(data.table)

R/ds.Boole.R

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,7 @@
2424
#'
2525
#' @param V1 A character string specifying the name of the vector to which the Boolean operator
2626
#' is to be applied.
27-
#' @param V2 A character string specifying the name of the vector to compare with \code{V1}.
27+
#' @param V2 A character string specifying the name of the vector to compare with \code{V1}.
2828
#' @param Boolean.operator A character string specifying one of six possible Boolean operators:
2929
#' \code{'==', '!=', '>', '>=', '<'} and \code{'<='}.
3030
#' @param numeric.output logical. If TRUE the output variable should be of class numeric (\code{1/0}).
@@ -177,7 +177,7 @@ ds.Boole<-function(V1=NULL, V2=NULL, Boolean.operator=NULL, numeric.output=TRUE,
177177
newobj <- paste0(V1,"_Boole")
178178
}
179179

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

@@ -209,7 +209,7 @@ for(j in 1:num.datasources){ #
209209
if(!object.info[[j]]$test.obj.exists){ #
210210
obj.name.exists.in.all.sources<-FALSE #
211211
} #
212-
if(is.null(object.info[[j]]$test.obj.class) || object.info[[j]]$test.obj.class=="ABSENT"){ #
212+
if(is.null(object.info[[j]]$test.obj.class) || ("ABSENT" %in% object.info[[j]]$test.obj.class)){ #
213213
obj.non.null.in.all.sources<-FALSE #
214214
} #
215215
} #

R/ds.abs.R

Lines changed: 3 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -86,26 +86,15 @@ ds.abs <- function(x=NULL, newobj=NULL, datasources=NULL){
8686
stop("Please provide the name of the input object!", call.=FALSE)
8787
}
8888

89-
# the input variable might be given as column table (i.e. D$x)
90-
# or just as a vector not attached to a table (i.e. x)
91-
# we have to make sure the function deals with each case
92-
xnames <- extract(x)
93-
varname <- xnames$elements
94-
obj2lookfor <- xnames$holders
95-
96-
# check if the input object(s) is(are) defined in all the studies
97-
if(is.na(obj2lookfor)){
98-
defined <- isDefined(datasources, varname)
99-
}else{
100-
defined <- isDefined(datasources, obj2lookfor)
101-
}
89+
# check if the input object is defined in all the studies
90+
isDefined(datasources, x)
10291

10392
# call the internal function that checks the input object is of the same class in all studies.
10493
typ <- checkClass(datasources, x)
10594

10695
# call the internal function that checks the input object(s) is(are) of the same class in all studies.
10796
if(!('numeric' %in% typ) && !('integer' %in% typ)){
108-
stop("Only objects of type 'numeric' or 'integer' are allowed.", call.=FALSE)
97+
stop("Only objects of type 'numeric' or 'integer' are allowed.", call.=FALSE)
10998
}
11099

111100
# create a name by default if the user did not provide a name for the new variable

R/ds.asCharacter.R

Lines changed: 7 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,4 @@
1+
#'
12
#' @title Converts a server-side R object into a character class
23
#' @description Converts the input object into a character class.
34
#' This function is based on the native R function \code{as.character}.
@@ -13,8 +14,7 @@
1314
#' the default set of connections will be used: see \code{\link{datashield.connections_default}}.
1415
#' @return \code{ds.asCharacter} returns the object converted into a class character
1516
#' that is written to the server-side. Also, two validity messages are returned to the client-side
16-
#' indicating the name of the \code{newobj} which
17-
#' has been created in each data source and if
17+
#' indicating the name of the \code{newobj} which has been created in each data source and if
1818
#' it is in a valid form.
1919
#' @examples
2020
#' \dontrun{
@@ -54,6 +54,7 @@
5454
#' }
5555
#' @author DataSHIELD Development Team
5656
#' @export
57+
#'
5758
ds.asCharacter <- function(x.name=NULL, newobj=NULL, datasources=NULL){
5859

5960
# look for DS connections
@@ -69,7 +70,9 @@ ds.asCharacter <- function(x.name=NULL, newobj=NULL, datasources=NULL){
6970
if(is.null(x.name)){
7071
stop("Please provide the name of the input vector!", call.=FALSE)
7172
}
72-
73+
74+
# check if the input object is defined in all the studies
75+
isDefined(datasources, x.name)
7376

7477
# create a name by default if user did not provide a name for the new variable
7578
if(is.null(newobj)){
@@ -107,7 +110,7 @@ for(j in 1:num.datasources){ #
107110
if(!object.info[[j]]$test.obj.exists){ #
108111
obj.name.exists.in.all.sources<-FALSE #
109112
} #
110-
if(is.null(object.info[[j]]$test.obj.class) || object.info[[j]]$test.obj.class=="ABSENT"){ #
113+
if(is.null(object.info[[j]]$test.obj.class) || ("ABSENT" %in% object.info[[j]]$test.obj.class)){ #
111114
obj.non.null.in.all.sources<-FALSE #
112115
} #
113116
} #

R/ds.asDataMatrix.R

Lines changed: 7 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -55,6 +55,7 @@
5555
#' }
5656
#' @author DataSHIELD Development Team
5757
#' @export
58+
#'
5859
ds.asDataMatrix <- function(x.name=NULL, newobj=NULL, datasources=NULL){
5960

6061
# look for DS connections
@@ -70,17 +71,17 @@ ds.asDataMatrix <- function(x.name=NULL, newobj=NULL, datasources=NULL){
7071
if(is.null(x.name)){
7172
stop("Please provide the name of the input vector!", call.=FALSE)
7273
}
73-
74-
74+
75+
# check if the input object is defined in all the studies
76+
isDefined(datasources, x.name)
77+
7578
# create a name by default if user did not provide a name for the new variable
7679
if(is.null(newobj)){
7780
newobj <- "asdatamatrix.newobj"
7881
}
7982

80-
# call the server side function that does the job
81-
83+
# call the server side function that does the job
8284
calltext <- call("asDataMatrixDS", x.name)
83-
8485
DSI::datashield.assign(datasources, newobj, calltext)
8586

8687

@@ -108,7 +109,7 @@ for(j in 1:num.datasources){ #
108109
if(!object.info[[j]]$test.obj.exists){ #
109110
obj.name.exists.in.all.sources<-FALSE #
110111
} #
111-
if(is.null(object.info[[j]]$test.obj.class) || object.info[[j]]$test.obj.class=="ABSENT"){ #
112+
if(is.null(object.info[[j]]$test.obj.class) || ("ABSENT" %in% object.info[[j]]$test.obj.class)){ #
112113
obj.non.null.in.all.sources<-FALSE #
113114
} #
114115
} #

0 commit comments

Comments
 (0)