Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
45 commits
Select commit Hold shift + click to select a range
baba9ae
Update version added Yannick
StuartWheater Jun 19, 2025
4ebc059
Merge pull request #387 from StuartWheater/v6.3.3-dev
StuartWheater Jun 19, 2025
f0da9b0
Minor changes for cran
StuartWheater Jun 23, 2025
a645441
Merge branch 'datashield:v6.3.3-dev' into v6.3.3-dev
StuartWheater Jun 23, 2025
f2419c2
Merge pull request #389 from StuartWheater/v6.3.3-dev
StuartWheater Jun 23, 2025
6f2da23
Removed unused test data to reduce size
StuartWheater Jun 29, 2025
17314f9
Merge branch 'v6.3.3-dev' of github.com:StuartWheater/dsBase into v6.…
StuartWheater Jun 29, 2025
2b1f0bc
Update documentation and test data
StuartWheater Jun 30, 2025
19bbea3
Switch to production format version
StuartWheater Jun 30, 2025
c13b443
Update Description
StuartWheater Jul 1, 2025
ea32e8d
Merge pull request #390 from StuartWheater/v6.3.3-dev
StuartWheater Jul 1, 2025
6cd03a6
Update documentation
StuartWheater Jul 1, 2025
411049b
Merge pull request #391 from StuartWheater/v6.3.3-dev
StuartWheater Jul 1, 2025
82175ec
Add Roxygen2 tag @return to indicate the returning object of the func…
villegar Jul 7, 2025
7e6b1de
Add missing Roxygen2 tag @noRd for internal functions
villegar Jul 7, 2025
1497d94
Relocate AggregateMethods, AssignMethods and Options section
villegar Jul 7, 2025
f77117a
New build
villegar Jul 7, 2025
d9d02c6
Update title and description to add single quotes to mentions of Data…
villegar Jul 7, 2025
f84300d
Correct minor typos
villegar Jul 7, 2025
7858508
Replace calls to the print function by message
villegar Jul 7, 2025
0d99285
Relocate options section to .onLoad function
villegar Jul 7, 2025
a217dbc
Replace instances of cat with message
villegar Jul 7, 2025
0b9299c
Correct typo
villegar Jul 7, 2025
bff026d
Reformat code with styler::stile_file
villegar Jul 7, 2025
a8429dc
New build
villegar Jul 7, 2025
efdbe89
Update name of local environment global variable, env >>> ENV
villegar Jul 7, 2025
51e8d55
Add section to back-up the current .Random.seed and revert on.exit
villegar Jul 7, 2025
fa8b54d
New build
villegar Jul 7, 2025
2ebc26d
Add GHA standard checks workflow
villegar Jul 8, 2025
03d3310
Add --as-cran arg
villegar Jul 8, 2025
89e1154
Merge pull request #392 from villegar/v6.3.3-dev
StuartWheater Jul 8, 2025
7c58fe2
Updated and extended perf profiles
StuartWheater Jul 8, 2025
2ca5482
Remove invalid --as-cran flag when building package
villegar Jul 8, 2025
c32e027
Add lines to ignore performance tests on CRAN and GitHub Actions
villegar Jul 8, 2025
51334b8
Update R-CMD-check.yaml
StuartWheater Jul 8, 2025
9b8d8d6
Merge pull request #393 from StuartWheater/v6.3.3-dev
StuartWheater Jul 8, 2025
ff70f7b
Merge pull request #394 from villegar/v6.3.3-dev
StuartWheater Jul 8, 2025
09466bb
Add file with key citations for DataSHIELD
villegar Jul 15, 2025
654e914
Update DESCRIPTION to include reference to the citations
villegar Jul 15, 2025
b9ef5ac
Update documents
StuartWheater Jul 16, 2025
4babeed
Added 'cran-comments'
StuartWheater Jul 16, 2025
89f9256
Add missing bibentry to auto-link the R package citation
villegar Jul 16, 2025
f9330a0
Merge pull request #398 from villegar/v6.3.3-dev
villegar Jul 16, 2025
0ab1039
Merge branch 'datashield:v6.3.3-dev' into v6.3.3-dev
StuartWheater Jul 16, 2025
a1f9b2e
Update documentation and .Rbuildignore: StuartWheater/v6.3.3-dev
StuartWheater Jul 16, 2025
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 2 additions & 1 deletion .Rbuildignore
Original file line number Diff line number Diff line change
Expand Up @@ -9,4 +9,5 @@
^pkgdown$
^\.circleci$
^\.circleci/config\.yml$
^\.github$
^\.github$
^cran-comments\.md$
1 change: 1 addition & 0 deletions .github/.gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
*.html
51 changes: 51 additions & 0 deletions .github/workflows/R-CMD-check.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,51 @@
# Workflow derived from https://github.com/r-lib/actions/tree/v2/examples
# Need help debugging build failures? Start at https://github.com/r-lib/actions#where-to-find-help
on:
push:
branches: [main, master]
pull_request:

name: R-CMD-check.yaml

permissions: read-all

jobs:
R-CMD-check:
runs-on: ${{ matrix.config.os }}

name: ${{ matrix.config.os }} (${{ matrix.config.r }})

strategy:
fail-fast: false
matrix:
config:
- {os: macos-latest, r: 'release'}
- {os: windows-latest, r: 'release'}
- {os: ubuntu-latest, r: 'devel', http-user-agent: 'release'}
- {os: ubuntu-latest, r: 'release'}
- {os: ubuntu-latest, r: 'oldrel-1'}

env:
GITHUB_PAT: ${{ secrets.GITHUB_TOKEN }}
R_KEEP_PKG_SOURCE: yes

steps:
- uses: actions/checkout@v4

- uses: r-lib/actions/setup-pandoc@v2

- uses: r-lib/actions/setup-r@v2
with:
r-version: ${{ matrix.config.r }}
http-user-agent: ${{ matrix.config.http-user-agent }}
use-public-rspm: true

- uses: r-lib/actions/setup-r-dependencies@v2
with:
extra-packages: any::rcmdcheck
needs: check

- uses: r-lib/actions/check-r-package@v2
with:
upload-snapshots: true
build_args: 'c("--no-manual", "--compact-vignettes=gs+qpdf")'
190 changes: 12 additions & 178 deletions DESCRIPTION
Original file line number Diff line number Diff line change
@@ -1,7 +1,11 @@
Package: dsBase
Title: DataSHIELD Server Site Base Functions
Description: DataSHIELD Server Site Base Functions.
Version: 6.3.2
Title: 'DataSHIELD' Server Site Base Functions
Description: Base 'DataSHIELD' functions for the server side. 'DataSHIELD' is a software package which allows
you to do non-disclosive federated analysis on sensitive data. 'DataSHIELD' analytic functions have
been designed to only share non disclosive summary statistics, with built in automated output
checking based on statistical disclosure control. With data sites setting the threshold values for
the automated output checks. For more details, see 'citation("dsBase")'.
Version: 6.3.3
Authors@R: c(person(given = "Paul",
family = "Burton",
role = c("aut")),
Expand All @@ -28,6 +32,11 @@ Authors@R: c(person(given = "Paul",
family = "Avraam",
role = c("aut"),
comment = c(ORCID = "0000-0001-8908-2441")),
person(given = "Yannick",
family = "Marcon",
role = c("aut"),
email = "yannick.marcon@obiba.org",
comment = c(ORCID = "0000-0003-0138-2023")),
person(given = "Stuart",
family = "Wheater",
role = c("aut", "cre"),
Expand All @@ -50,180 +59,5 @@ Imports:
childsds
Suggests:
testthat
AggregateMethods:
asFactorDS1,
asListDS,
aucDS,
boxPlotGGDS,
checkNegValueDS,
classDS,
colnamesDS,
corTestDS,
corDS,
covDS,
dataFrameSubsetDS1,
densityGridDS,
extractQuantilesDS1,
extractQuantilesDS2,
dimDS,
gamlssDS,
glmDS1,
glmDS2,
glmerSLMADS2,
glmPredictDS.ag,
glmSLMADS1,
glmSLMADS2,
glmSummaryDS.ag,
heatmapPlotDS,
hetcorDS,
histogramDS1,
histogramDS2,
isNaDS,
isValidDS,
kurtosisDS1,
kurtosisDS2,
lengthDS,
levelsDS,
lexisDS1,
listDisclosureSettingsDS,
lmerSLMADS2,
lsDS,
matrixDetDS1,
meanDS,
meanSdGpDS,
messageDS,
metadataDS,
miceDS,
minMaxRandDS,
namesDS,
numNaDS,
quantileMeanDS,
rangeDS,
ranksSecureDS1,
ranksSecureDS3,
rmDS,
scatterPlotDS,
scoreVectDS,
setSeedDS,
skewnessDS1,
skewnessDS2,
table1DDS,
table2DDS,
tableDS,
tableDS2,
tapplyDS,
testObjExistsDS,
varDS,
exists=base::exists,
is.character=base::is.character,
is.factor=base::is.factor,
is.list=base::is.list,
is.null=base::is.null,
is.numeric=base::is.numeric,
NROW=base::NROW,
t.test=stats::t.test
AssignMethods:
absDS,
asCharacterDS,
asDataMatrixDS,
asFactorDS2,
asFactorSimpleDS,
asIntegerDS,
asListDS,
asLogicalDS,
asMatrixDS,
asNumericDS,
blackBoxDS,
blackBoxRanksDS,
BooleDS,
boxPlotGG_data_TreatmentDS,
boxPlotGG_data_Treatment_numericDS,
bp_standardsDS,
cbindDS,
cDS,
changeRefGroupDS,
completeCasesDS,
dataFrameDS,
dataFrameFillDS,
dataFrameSortDS,
dataFrameSubsetDS2,
dmtC2SDS,
elsplineDS,
glmerSLMADS.assign,
glmPredictDS.as,
glmSLMADS.assign,
glmSummaryDS.as,
getWGSRDS,
igb_standardsDS,
listDS,
lexisDS2,
lexisDS3,
lmerSLMADS.assign,
lsplineDS,
matrixDetDS2,
matrixDiagDS,
matrixDimnamesDS,
matrixDS,
matrixInvertDS,
matrixMultDS,
matrixTransposeDS,
mergeDS,
nsDS,
qlsplineDS,
ranksSecureDS2,
ranksSecureDS4,
ranksSecureDS5,
rbindDS,
rBinomDS,
recodeLevelsDS,
recodeValuesDS,
repDS,
replaceNaDS,
reShapeDS,
rNormDS,
rowColCalcDS,
rPoisDS,
rUnifDS,
sampleDS,
seqDS,
sqrtDS,
subsetByClassDS,
subsetDS,
tableDS.assign,
tapplyDS.assign,
uniqueDS,
unListDS,
vectorDS,
as.character=base::as.character,
as.null=base::as.null,
as.numeric=base::as.numeric,
attach=base::attach,
c=dsBase::vectorDS,
complete.cases=stats::complete.cases,
list=base::list,
exp=base::exp,
log=base::log,
sqrt=base::sqrt,
abs=base::abs,
sin=base::sin,
cos=base::cos,
tan=base::tan,
asin=base::asin,
acos=base::acos,
atan=base::atan,
sum=base::sum,
unlist=base::unlist
Options:
datashield.privacyLevel=5,
default.datashield.privacyControlLevel="banana",
default.nfilter.glm=0.33,
default.nfilter.kNN=3,
default.nfilter.string=80,
default.nfilter.subset=3,
default.nfilter.stringShort=20,
default.nfilter.tab=3,
default.nfilter.noise=0.25,
default.nfilter.levels.density=0.33,
default.nfilter.levels.max=40
RoxygenNote: 7.3.2
Encoding: UTF-8
6 changes: 4 additions & 2 deletions R/BooleDS.R
Original file line number Diff line number Diff line change
Expand Up @@ -18,9 +18,11 @@
#' @param na.assign.text A character string taking values 'NA', '1' or '0'. If 'NA'
#' then any NA values in the
#' input vector remain as NAs in the output vector. If '1' or '0' NA values in the
#' input vector are
#' all converted to 1 or 0 respectively.#' @return the levels of the input variable.
#' input vector are all converted to 1 or 0 respectively.
#'
#' @author DataSHIELD Development Team
#'
#' @return the levels of the input variable.
#' @export
#'
BooleDS <- function(V1.name=NULL, V2.name=NULL, Boolean.operator.n=NULL, na.assign.text, numeric.output=TRUE){
Expand Down
10 changes: 4 additions & 6 deletions R/absDS.R
Original file line number Diff line number Diff line change
Expand Up @@ -6,21 +6,19 @@
#' @param x a string character, the name of a numeric or integer vector
#' @return the object specified by the \code{newobj} argument
#' of \code{ds.abs} (or default name \code{abs.newobj})
#' which is written to the serverside. The output object is of class numeric
#' which is written to the serverside. The output object is of class numeric
#' or integer.
#' @author Demetris Avraam for DataSHIELD Development Team
#' @export
#'
absDS <- function(x){

x.var <- eval(parse(text=x), envir = parent.frame())
absDS <- function(x) {
x.var <- eval(parse(text = x), envir = parent.frame())

# compute the absolute values of x
out <- abs(x.var)

# assign the outcome to the data servers
return(out)

}
# ASSIGN FUNCTION
# absDS
10 changes: 4 additions & 6 deletions R/asCharacterDS.R
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
#'
#'
#' @title Coerces an R object into class character
#' @description this function is based on the native R function \code{as.character}
#' @details See help for function \code{as.character} in native R
Expand All @@ -11,14 +11,12 @@
#' details see help on the clientside function \code{ds.asCharacter}
#' @author Amadou Gaye, Paul Burton, Demetris Avraam for DataSHIELD Development Team
#' @export
#'
asCharacterDS <- function (x.name){

x<-eval(parse(text=x.name), envir = parent.frame())
#'
asCharacterDS <- function(x.name) {
x <- eval(parse(text = x.name), envir = parent.frame())

output <- as.character(x)
return(output)

}
# ASSIGN FUNCTION
# asCharacterDS
16 changes: 7 additions & 9 deletions R/asDataMatrixDS.R
Original file line number Diff line number Diff line change
Expand Up @@ -16,15 +16,13 @@
#' details see help on the clientside function \code{ds.asDataMatrix}
#' @author Paul Burton for DataSHIELD Development Team
#' @export
asDataMatrixDS <- function (x.name){

if(is.character(x.name)){
x<-eval(parse(text=x.name), envir = parent.frame())

}else{
studysideMessage<-"ERROR: x.name must be specified as a character string"
stop(studysideMessage, call. = FALSE)
}
asDataMatrixDS <- function(x.name) {
if (is.character(x.name)) {
x <- eval(parse(text = x.name), envir = parent.frame())
} else {
studysideMessage <- "ERROR: x.name must be specified as a character string"
stop(studysideMessage, call. = FALSE)
}

output <- data.matrix(x)

Expand Down
2 changes: 1 addition & 1 deletion R/asFactorDS2.R
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@
#' @param all.unique.levels.transmit the levels that the variable will be transmitted to.
#' @param fixed.dummy.vars a boolean that determines whether the new object will be represented as
#' a vector or as a matrix of dummy variables indicating the factor level of each data point.
#' If this argyment is set to FALSE (default) then the input variable is converted to a factor and
#' If this argument is set to FALSE (default) then the input variable is converted to a factor and
#' assigned as a vector. If is set to TRUE then the input variable is converted to a factor but
#' assigned as a matrix of dummy variables.
#' @param baseline.level a number indicating the baseline level to be used in the creation of the
Expand Down
9 changes: 6 additions & 3 deletions R/blackBoxDS.R
Original file line number Diff line number Diff line change
Expand Up @@ -65,7 +65,10 @@ blackBoxDS <- function(input.var.name=NULL,
#nfilter.noise <- as.numeric(thr$nfilter.noise)
#nfilter.levels <- as.numeric(thr$nfilter.levels)
########################################################


# back-up current .Random.seed and revert on.exit
old_seed <- .Random.seed
on.exit(.Random.seed <- old_seed, add = TRUE)

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

Expand Down Expand Up @@ -311,7 +314,7 @@ utils::head(rank.intermediate.value.matrix)
utils::tail(rank.intermediate.value.matrix)


cat("\nRANKS IN ALL COLUMNS ABOVE SHOULD BE THE SAME\n")
message("\nRANKS IN ALL COLUMNS ABOVE SHOULD BE THE SAME\n")

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


Expand Down
Loading
Loading