Skip to content

Commit fd1149e

Browse files
Merge pull request #402 from datashield/v6.3.3-dev
6.3.3 release
2 parents a2da1b4 + a1f9b2e commit fd1149e

290 files changed

Lines changed: 982 additions & 54299 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 & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,4 +9,5 @@
99
^pkgdown$
1010
^\.circleci$
1111
^\.circleci/config\.yml$
12-
^\.github$
12+
^\.github$
13+
^cran-comments\.md$

.github/.gitignore

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
*.html

.github/workflows/R-CMD-check.yaml

Lines changed: 51 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,51 @@
1+
# Workflow derived from https://github.com/r-lib/actions/tree/v2/examples
2+
# Need help debugging build failures? Start at https://github.com/r-lib/actions#where-to-find-help
3+
on:
4+
push:
5+
branches: [main, master]
6+
pull_request:
7+
8+
name: R-CMD-check.yaml
9+
10+
permissions: read-all
11+
12+
jobs:
13+
R-CMD-check:
14+
runs-on: ${{ matrix.config.os }}
15+
16+
name: ${{ matrix.config.os }} (${{ matrix.config.r }})
17+
18+
strategy:
19+
fail-fast: false
20+
matrix:
21+
config:
22+
- {os: macos-latest, r: 'release'}
23+
- {os: windows-latest, r: 'release'}
24+
- {os: ubuntu-latest, r: 'devel', http-user-agent: 'release'}
25+
- {os: ubuntu-latest, r: 'release'}
26+
- {os: ubuntu-latest, r: 'oldrel-1'}
27+
28+
env:
29+
GITHUB_PAT: ${{ secrets.GITHUB_TOKEN }}
30+
R_KEEP_PKG_SOURCE: yes
31+
32+
steps:
33+
- uses: actions/checkout@v4
34+
35+
- uses: r-lib/actions/setup-pandoc@v2
36+
37+
- uses: r-lib/actions/setup-r@v2
38+
with:
39+
r-version: ${{ matrix.config.r }}
40+
http-user-agent: ${{ matrix.config.http-user-agent }}
41+
use-public-rspm: true
42+
43+
- uses: r-lib/actions/setup-r-dependencies@v2
44+
with:
45+
extra-packages: any::rcmdcheck
46+
needs: check
47+
48+
- uses: r-lib/actions/check-r-package@v2
49+
with:
50+
upload-snapshots: true
51+
build_args: 'c("--no-manual", "--compact-vignettes=gs+qpdf")'

DESCRIPTION

Lines changed: 12 additions & 178 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,11 @@
11
Package: dsBase
2-
Title: DataSHIELD Server Site Base Functions
3-
Description: DataSHIELD Server Site Base Functions.
4-
Version: 6.3.2
2+
Title: 'DataSHIELD' Server Site Base Functions
3+
Description: Base 'DataSHIELD' functions for the server side. 'DataSHIELD' is a software package which allows
4+
you to do non-disclosive federated analysis on sensitive data. 'DataSHIELD' analytic functions have
5+
been designed to only share non disclosive summary statistics, with built in automated output
6+
checking based on statistical disclosure control. With data sites setting the threshold values for
7+
the automated output checks. For more details, see 'citation("dsBase")'.
8+
Version: 6.3.3
59
Authors@R: c(person(given = "Paul",
610
family = "Burton",
711
role = c("aut")),
@@ -28,6 +32,11 @@ Authors@R: c(person(given = "Paul",
2832
family = "Avraam",
2933
role = c("aut"),
3034
comment = c(ORCID = "0000-0001-8908-2441")),
35+
person(given = "Yannick",
36+
family = "Marcon",
37+
role = c("aut"),
38+
email = "yannick.marcon@obiba.org",
39+
comment = c(ORCID = "0000-0003-0138-2023")),
3140
person(given = "Stuart",
3241
family = "Wheater",
3342
role = c("aut", "cre"),
@@ -50,180 +59,5 @@ Imports:
5059
childsds
5160
Suggests:
5261
testthat
53-
AggregateMethods:
54-
asFactorDS1,
55-
asListDS,
56-
aucDS,
57-
boxPlotGGDS,
58-
checkNegValueDS,
59-
classDS,
60-
colnamesDS,
61-
corTestDS,
62-
corDS,
63-
covDS,
64-
dataFrameSubsetDS1,
65-
densityGridDS,
66-
extractQuantilesDS1,
67-
extractQuantilesDS2,
68-
dimDS,
69-
gamlssDS,
70-
glmDS1,
71-
glmDS2,
72-
glmerSLMADS2,
73-
glmPredictDS.ag,
74-
glmSLMADS1,
75-
glmSLMADS2,
76-
glmSummaryDS.ag,
77-
heatmapPlotDS,
78-
hetcorDS,
79-
histogramDS1,
80-
histogramDS2,
81-
isNaDS,
82-
isValidDS,
83-
kurtosisDS1,
84-
kurtosisDS2,
85-
lengthDS,
86-
levelsDS,
87-
lexisDS1,
88-
listDisclosureSettingsDS,
89-
lmerSLMADS2,
90-
lsDS,
91-
matrixDetDS1,
92-
meanDS,
93-
meanSdGpDS,
94-
messageDS,
95-
metadataDS,
96-
miceDS,
97-
minMaxRandDS,
98-
namesDS,
99-
numNaDS,
100-
quantileMeanDS,
101-
rangeDS,
102-
ranksSecureDS1,
103-
ranksSecureDS3,
104-
rmDS,
105-
scatterPlotDS,
106-
scoreVectDS,
107-
setSeedDS,
108-
skewnessDS1,
109-
skewnessDS2,
110-
table1DDS,
111-
table2DDS,
112-
tableDS,
113-
tableDS2,
114-
tapplyDS,
115-
testObjExistsDS,
116-
varDS,
117-
exists=base::exists,
118-
is.character=base::is.character,
119-
is.factor=base::is.factor,
120-
is.list=base::is.list,
121-
is.null=base::is.null,
122-
is.numeric=base::is.numeric,
123-
NROW=base::NROW,
124-
t.test=stats::t.test
125-
AssignMethods:
126-
absDS,
127-
asCharacterDS,
128-
asDataMatrixDS,
129-
asFactorDS2,
130-
asFactorSimpleDS,
131-
asIntegerDS,
132-
asListDS,
133-
asLogicalDS,
134-
asMatrixDS,
135-
asNumericDS,
136-
blackBoxDS,
137-
blackBoxRanksDS,
138-
BooleDS,
139-
boxPlotGG_data_TreatmentDS,
140-
boxPlotGG_data_Treatment_numericDS,
141-
bp_standardsDS,
142-
cbindDS,
143-
cDS,
144-
changeRefGroupDS,
145-
completeCasesDS,
146-
dataFrameDS,
147-
dataFrameFillDS,
148-
dataFrameSortDS,
149-
dataFrameSubsetDS2,
150-
dmtC2SDS,
151-
elsplineDS,
152-
glmerSLMADS.assign,
153-
glmPredictDS.as,
154-
glmSLMADS.assign,
155-
glmSummaryDS.as,
156-
getWGSRDS,
157-
igb_standardsDS,
158-
listDS,
159-
lexisDS2,
160-
lexisDS3,
161-
lmerSLMADS.assign,
162-
lsplineDS,
163-
matrixDetDS2,
164-
matrixDiagDS,
165-
matrixDimnamesDS,
166-
matrixDS,
167-
matrixInvertDS,
168-
matrixMultDS,
169-
matrixTransposeDS,
170-
mergeDS,
171-
nsDS,
172-
qlsplineDS,
173-
ranksSecureDS2,
174-
ranksSecureDS4,
175-
ranksSecureDS5,
176-
rbindDS,
177-
rBinomDS,
178-
recodeLevelsDS,
179-
recodeValuesDS,
180-
repDS,
181-
replaceNaDS,
182-
reShapeDS,
183-
rNormDS,
184-
rowColCalcDS,
185-
rPoisDS,
186-
rUnifDS,
187-
sampleDS,
188-
seqDS,
189-
sqrtDS,
190-
subsetByClassDS,
191-
subsetDS,
192-
tableDS.assign,
193-
tapplyDS.assign,
194-
uniqueDS,
195-
unListDS,
196-
vectorDS,
197-
as.character=base::as.character,
198-
as.null=base::as.null,
199-
as.numeric=base::as.numeric,
200-
attach=base::attach,
201-
c=dsBase::vectorDS,
202-
complete.cases=stats::complete.cases,
203-
list=base::list,
204-
exp=base::exp,
205-
log=base::log,
206-
sqrt=base::sqrt,
207-
abs=base::abs,
208-
sin=base::sin,
209-
cos=base::cos,
210-
tan=base::tan,
211-
asin=base::asin,
212-
acos=base::acos,
213-
atan=base::atan,
214-
sum=base::sum,
215-
unlist=base::unlist
216-
Options:
217-
datashield.privacyLevel=5,
218-
default.datashield.privacyControlLevel="banana",
219-
default.nfilter.glm=0.33,
220-
default.nfilter.kNN=3,
221-
default.nfilter.string=80,
222-
default.nfilter.subset=3,
223-
default.nfilter.stringShort=20,
224-
default.nfilter.tab=3,
225-
default.nfilter.noise=0.25,
226-
default.nfilter.levels.density=0.33,
227-
default.nfilter.levels.max=40
22862
RoxygenNote: 7.3.2
22963
Encoding: UTF-8

R/BooleDS.R

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -18,9 +18,11 @@
1818
#' @param na.assign.text A character string taking values 'NA', '1' or '0'. If 'NA'
1919
#' then any NA values in the
2020
#' input vector remain as NAs in the output vector. If '1' or '0' NA values in the
21-
#' input vector are
22-
#' all converted to 1 or 0 respectively.#' @return the levels of the input variable.
21+
#' input vector are all converted to 1 or 0 respectively.
22+
#'
2323
#' @author DataSHIELD Development Team
24+
#'
25+
#' @return the levels of the input variable.
2426
#' @export
2527
#'
2628
BooleDS <- function(V1.name=NULL, V2.name=NULL, Boolean.operator.n=NULL, na.assign.text, numeric.output=TRUE){

R/absDS.R

Lines changed: 4 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -6,21 +6,19 @@
66
#' @param x a string character, the name of a numeric or integer vector
77
#' @return the object specified by the \code{newobj} argument
88
#' of \code{ds.abs} (or default name \code{abs.newobj})
9-
#' which is written to the serverside. The output object is of class numeric
9+
#' which is written to the serverside. The output object is of class numeric
1010
#' or integer.
1111
#' @author Demetris Avraam for DataSHIELD Development Team
1212
#' @export
1313
#'
14-
absDS <- function(x){
15-
16-
x.var <- eval(parse(text=x), envir = parent.frame())
14+
absDS <- function(x) {
15+
x.var <- eval(parse(text = x), envir = parent.frame())
1716

1817
# compute the absolute values of x
1918
out <- abs(x.var)
20-
19+
2120
# assign the outcome to the data servers
2221
return(out)
23-
2422
}
2523
# ASSIGN FUNCTION
2624
# absDS

R/asCharacterDS.R

Lines changed: 4 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
#'
1+
#'
22
#' @title Coerces an R object into class character
33
#' @description this function is based on the native R function \code{as.character}
44
#' @details See help for function \code{as.character} in native R
@@ -11,14 +11,12 @@
1111
#' details see help on the clientside function \code{ds.asCharacter}
1212
#' @author Amadou Gaye, Paul Burton, Demetris Avraam for DataSHIELD Development Team
1313
#' @export
14-
#'
15-
asCharacterDS <- function (x.name){
16-
17-
x<-eval(parse(text=x.name), envir = parent.frame())
14+
#'
15+
asCharacterDS <- function(x.name) {
16+
x <- eval(parse(text = x.name), envir = parent.frame())
1817

1918
output <- as.character(x)
2019
return(output)
21-
2220
}
2321
# ASSIGN FUNCTION
2422
# asCharacterDS

R/asDataMatrixDS.R

Lines changed: 7 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -16,15 +16,13 @@
1616
#' details see help on the clientside function \code{ds.asDataMatrix}
1717
#' @author Paul Burton for DataSHIELD Development Team
1818
#' @export
19-
asDataMatrixDS <- function (x.name){
20-
21-
if(is.character(x.name)){
22-
x<-eval(parse(text=x.name), envir = parent.frame())
23-
24-
}else{
25-
studysideMessage<-"ERROR: x.name must be specified as a character string"
26-
stop(studysideMessage, call. = FALSE)
27-
}
19+
asDataMatrixDS <- function(x.name) {
20+
if (is.character(x.name)) {
21+
x <- eval(parse(text = x.name), envir = parent.frame())
22+
} else {
23+
studysideMessage <- "ERROR: x.name must be specified as a character string"
24+
stop(studysideMessage, call. = FALSE)
25+
}
2826

2927
output <- data.matrix(x)
3028

R/asFactorDS2.R

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@
99
#' @param all.unique.levels.transmit the levels that the variable will be transmitted to.
1010
#' @param fixed.dummy.vars a boolean that determines whether the new object will be represented as
1111
#' a vector or as a matrix of dummy variables indicating the factor level of each data point.
12-
#' If this argyment is set to FALSE (default) then the input variable is converted to a factor and
12+
#' If this argument is set to FALSE (default) then the input variable is converted to a factor and
1313
#' assigned as a vector. If is set to TRUE then the input variable is converted to a factor but
1414
#' assigned as a matrix of dummy variables.
1515
#' @param baseline.level a number indicating the baseline level to be used in the creation of the

R/blackBoxDS.R

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -65,7 +65,10 @@ blackBoxDS <- function(input.var.name=NULL,
6565
#nfilter.noise <- as.numeric(thr$nfilter.noise)
6666
#nfilter.levels <- as.numeric(thr$nfilter.levels)
6767
########################################################
68-
68+
69+
# back-up current .Random.seed and revert on.exit
70+
old_seed <- .Random.seed
71+
on.exit(.Random.seed <- old_seed, add = TRUE)
6972

7073
input.var <- eval(parse(text=input.var.name), envir = parent.frame())
7174

@@ -311,7 +314,7 @@ utils::head(rank.intermediate.value.matrix)
311314
utils::tail(rank.intermediate.value.matrix)
312315

313316

314-
cat("\nRANKS IN ALL COLUMNS ABOVE SHOULD BE THE SAME\n")
317+
message("\nRANKS IN ALL COLUMNS ABOVE SHOULD BE THE SAME\n")
315318

316319
control.vector
317320
control.value
@@ -365,7 +368,7 @@ if(sum(round(rank(blackbox.output.df[,3])-rank(blackbox.output.df[,4]),2)==0)!=n
365368
of memory")
366369
stop(error.message, call. = FALSE)
367370
}else{
368-
cat("\nPROCESSING SUCCESSFUL, ALL RANKS AGREE FOR ALL TRANSFORMATIONS\n\n")
371+
message("\nPROCESSING SUCCESSFUL, ALL RANKS AGREE FOR ALL TRANSFORMATIONS\n\n")
369372
}
370373

371374

0 commit comments

Comments
 (0)