diff --git a/.Rbuildignore b/.Rbuildignore index 819b13428..f0d597f85 100644 --- a/.Rbuildignore +++ b/.Rbuildignore @@ -19,6 +19,7 @@ ^docs$ ^dsBase_6.4.0.tar.gz$ ^dsBase_6.4.0-permissive.tar.gz$ -^dsDanger_6.3.1.tar.gz$ +^dsDanger_6.3.4.tar.gz$ ^\.circleci$ ^\.circleci/config\.yml$ +^\.github$ diff --git a/.github/.gitignore b/.github/.gitignore new file mode 100644 index 000000000..2d19fc766 --- /dev/null +++ b/.github/.gitignore @@ -0,0 +1 @@ +*.html diff --git a/.github/workflows/dsBaseClient_test_suite.yaml b/.github/workflows/dsBaseClient_test_suite.yaml new file mode 100644 index 000000000..17e13f1dc --- /dev/null +++ b/.github/workflows/dsBaseClient_test_suite.yaml @@ -0,0 +1,247 @@ +################################################################################ +# DataSHIELD GHA test suite - dsBaseClient +# Adapted from `armadillo_azure-pipelines.yml` by Roberto Villegas-Diaz +# +# Inside the root directory $(Pipeline.Workspace) will be a file tree like: +# /dsBaseClient <- Checked out version of datashield/dsBaseClient +# /dsBaseClient/logs <- Where results of tests and logs are collated +# /testStatus <- Checked out version of datashield/testStatus +# +# As of Sept. 2025 this takes ~ 95 mins to run. +################################################################################ +name: dsBaseClient tests' suite + +on: + push: + schedule: + - cron: '0 0 * * 6' # Weekly (on Saturdays @ 0.00) + +jobs: + dsBaseClient_test_suite: + runs-on: ubuntu-latest + timeout-minutes: 180 + permissions: + contents: read + + # These should all be constant, except TEST_FILTER. This can be used to test + # subsets of test files in the testthat directory. Options are like: + # '*' <- Run all tests. + # 'asNumericDS*' <- Run all asNumericDS tests, i.e. all the arg, etc. tests. + # '*_smk_*' <- Run all the smoke tests for all functions. + env: + TEST_FILTER: '_-|datachk-|smk-|arg-|disc-|perf-|smk_expt-|expt-|math-' + _r_check_system_clock_: 0 + WORKFLOW_ID: ${{ github.run_id }}-${{ github.run_attempt }} + PROJECT_NAME: dsBaseClient + BRANCH_NAME: ${{ github.head_ref || github.ref_name }} + REPO_OWNER: ${{ github.repository_owner }} + R_KEEP_PKG_SOURCE: yes + GITHUB_TOKEN: ${{ github.token || 'placeholder-token' }} + + steps: + - name: Checkout dsBaseClient + uses: actions/checkout@v4 + with: + path: dsBaseClient + + - name: Checkout testStatus + if: ${{ github.actor != 'nektos/act' }} # for local deployment only + uses: actions/checkout@v4 + with: + repository: ${{ env.REPO_OWNER }}/testStatus + ref: master + path: testStatus + persist-credentials: false + token: ${{ env.GITHUB_TOKEN }} + + - name: Uninstall default MySQL + run: | + curl https://bazel.build/bazel-release.pub.gpg | sudo apt-key add - + sudo service mysql stop || true + sudo apt-get update + sudo apt-get remove --purge mysql-client mysql-server mysql-common -y + sudo apt-get autoremove -y + sudo apt-get autoclean -y + sudo rm -rf /var/lib/mysql/ + + - uses: r-lib/actions/setup-pandoc@v2 + + - uses: r-lib/actions/setup-r@v2 + with: + r-version: release + http-user-agent: release + use-public-rspm: true + + - name: Install R and dependencies + run: | + sudo apt-get install --no-install-recommends software-properties-common dirmngr -y + wget -qO- https://cloud.r-project.org/bin/linux/ubuntu/marutter_pubkey.asc | sudo tee -a /etc/apt/trusted.gpg.d/cran_ubuntu_key.asc + sudo add-apt-repository "deb https://cloud.r-project.org/bin/linux/ubuntu $(lsb_release -cs)-cran40/" + sudo apt-get update -qq + sudo apt-get upgrade -y + sudo apt-get install -qq libxml2-dev libcurl4-openssl-dev libssl-dev libgsl-dev libgit2-dev r-base -y + sudo apt-get install -qq libharfbuzz-dev libfribidi-dev libmagick++-dev xml-twig-tools -y + sudo R -q -e "install.packages(c('devtools','covr','fields','meta','metafor','ggplot2','gridExtra','data.table','DSI','DSOpal','DSLite','MolgenisAuth','MolgenisArmadillo','DSMolgenisArmadillo','DescTools','e1071'), repos='https://cloud.r-project.org')" + sudo R -q -e "devtools::install_github(repo='datashield/dsDangerClient', ref=Sys.getenv('BRANCH_NAME'))" + + - uses: r-lib/actions/setup-r-dependencies@v2 + with: + dependencies: 'c("Imports")' + extra-packages: | + any::rcmdcheck + cran::devtools + cran::git2r + cran::RCurl + cran::readr + cran::magrittr + cran::xml2 + cran::purrr + cran::dplyr + cran::stringr + cran::tidyr + cran::quarto + cran::knitr + cran::kableExtra + cran::rmarkdown + cran::downlit + needs: check + + - name: Check manual updated + run: | + orig_sum=$(find man -type f | sort -u | xargs cat | md5sum) + R -q -e "devtools::document()" + new_sum=$(find man -type f | sort -u | xargs cat | md5sum) + if [ "$orig_sum" != "$new_sum" ]; then + echo "Your committed man/*.Rd files are out of sync with the R headers." + exit 1 + fi + working-directory: dsBaseClient + continue-on-error: true + + - name: Devtools checks + run: | + R -q -e "devtools::check(args = c('--no-examples', '--no-tests'))" | tee azure-pipelines_check.Rout + grep --quiet "^0 errors" azure-pipelines_check.Rout && grep --quiet " 0 warnings" azure-pipelines_check.Rout && grep --quiet " 0 notes" azure-pipelines_check.Rout + working-directory: dsBaseClient + continue-on-error: true + + - name: Start Armadillo docker-compose + run: docker compose -f docker-compose_armadillo.yml up -d --build + working-directory: dsBaseClient + + - name: Install test datasets + run: | + sleep 60 + R -q -f "molgenis_armadillo-upload_testing_datasets.R" + working-directory: dsBaseClient/tests/testthat/data_files + + - name: Install dsBase to Armadillo + run: | + curl -u admin:admin -X GET http://localhost:8080/packages + curl -u admin:admin -H 'Content-Type: multipart/form-data' -F "file=@dsBase_6.3.5-permissive.tar.gz" -X POST http://localhost:8080/install-package + sleep 60 + docker restart dsbaseclient-armadillo-1 + sleep 30 + curl -u admin:admin -X POST http://localhost:8080/whitelist/dsBase + working-directory: dsBaseClient + + - name: Run tests with coverage & JUnit report + run: | + mkdir -p logs + R -q -e "devtools::reload();" + R -q -e ' + write.csv( + covr::coverage_to_list( + covr::package_coverage( + type = c("none"), + code = c('"'"' + output_file <- file("test_console_output.txt"); + sink(output_file); + sink(output_file, type = "message"); + junit_rep <- testthat::JunitReporter$new(file = file.path(getwd(), "test_results.xml")); + progress_rep <- testthat::ProgressReporter$new(max_failures = 999999); + multi_rep <- testthat::MultiReporter$new(reporters = list(progress_rep, junit_rep)); + options("datashield.return_errors" = FALSE, "default_driver" = "ArmadilloDriver"); + testthat::test_package("${{ env.PROJECT_NAME }}", filter = "${{ env.TEST_FILTER }}", reporter = multi_rep, stop_on_failure = FALSE)'"'"' + ) + ) + ), + "coveragelist.csv" + )' + + mv coveragelist.csv logs/ + mv test_* logs/ + working-directory: dsBaseClient + + - name: Check for JUnit errors + run: | + issue_count=$(sed 's/failures="0" errors="0"//' test_results.xml | grep -c errors= || true) + echo "Number of testsuites with issues: $issue_count" + sed 's/failures="0" errors="0"//' test_results.xml | grep errors= > issues.log || true + cat issues.log || true + # continue with workflow even when some tests fail + exit 0 + working-directory: dsBaseClient/logs + + - name: Write versions to file + run: | + echo "branch:${{ env.BRANCH_NAME }}" > ${{ env.WORKFLOW_ID }}.txt + echo "os:$(lsb_release -ds)" >> ${{ env.WORKFLOW_ID }}.txt + echo "R:$(R --version | head -n1)" >> ${{ env.WORKFLOW_ID }}.txt + Rscript --vanilla -e 'sessionInfo()' >> session_info_${{ env.WORKFLOW_ID }}.txt + working-directory: dsBaseClient/logs + + - name: Parse results from testthat and covr + run: | + Rscript --verbose --vanilla ../testStatus/source/parse_test_report.R logs/ logs/ https://github.com/datashield/${{ env.PROJECT_NAME }}/blob/${{ env.BRANCH_NAME }} '([^:]+)' '(?<=::)[^:]+(?=::)' + working-directory: dsBaseClient + env: + PROJECT_NAME: ${{ env.PROJECT_NAME }} + BRANCH_NAME: ${{ env.BRANCH_NAME }} + + - name: Render report + run: | + cd testStatus + + mkdir -p new/logs/${{ env.PROJECT_NAME }}/${{ env.BRANCH_NAME }}/${{ env.WORKFLOW_ID }}/ + mkdir -p new/docs/${{ env.PROJECT_NAME }}/${{ env.BRANCH_NAME }}/${{ env.WORKFLOW_ID }}/ + mkdir -p new/docs/${{ env.PROJECT_NAME }}/${{ env.BRANCH_NAME }}/latest/ + + # Copy logs to new logs directory location + cp -rv ../dsBaseClient/logs/* new/logs/${{ env.PROJECT_NAME }}/${{ env.BRANCH_NAME }}/${{ env.WORKFLOW_ID }}/ + cp -rv ../dsBaseClient/logs/${{ env.WORKFLOW_ID }}.txt new/logs/${{ env.PROJECT_NAME }}/${{ env.BRANCH_NAME }}/${{ env.WORKFLOW_ID }}/ + + R -e 'input_dir <- file.path("../new/logs", Sys.getenv("PROJECT_NAME"), Sys.getenv("BRANCH_NAME"), Sys.getenv("WORKFLOW_ID")); quarto::quarto_render("source/test_report.qmd", execute_params = list(input_dir = input_dir))' + mv source/test_report.html new/docs/${{ env.PROJECT_NAME }}/${{ env.BRANCH_NAME }}/${{ env.WORKFLOW_ID }}/index.html + cp -r new/docs/${{ env.PROJECT_NAME }}/${{ env.BRANCH_NAME }}/${{ env.WORKFLOW_ID }}/* new/docs/${{ env.PROJECT_NAME }}/${{ env.BRANCH_NAME }}/latest + + env: + PROJECT_NAME: ${{ env.PROJECT_NAME }} + BRANCH_NAME: ${{ env.BRANCH_NAME }} + WORKFLOW_ID: ${{ env.WORKFLOW_ID }} + + - name: Upload test logs + uses: actions/upload-artifact@v4 + with: + name: dsbaseclient-logs + path: testStatus/new + + - name: Dump environment info + run: | + echo -e "\n#############################" + echo -e "ls /: ######################" + ls -al . + echo -e "\n#############################" + echo -e "lscpu: ######################" + lscpu + echo -e "\n#############################" + echo -e "memory: #####################" + free -m + echo -e "\n#############################" + echo -e "env: ########################" + env + echo -e "\n#############################" + echo -e "R sessionInfo(): ############" + R -e 'sessionInfo()' + sudo apt install tree -y + tree . diff --git a/.github/workflows/pkgdown.yaml b/.github/workflows/pkgdown.yaml new file mode 100644 index 000000000..bfc9f4db3 --- /dev/null +++ b/.github/workflows/pkgdown.yaml @@ -0,0 +1,49 @@ +# 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: + release: + types: [published] + workflow_dispatch: + +name: pkgdown.yaml + +permissions: read-all + +jobs: + pkgdown: + runs-on: ubuntu-latest + # Only restrict concurrency for non-PR jobs + concurrency: + group: pkgdown-${{ github.event_name != 'pull_request' || github.run_id }} + env: + GITHUB_PAT: ${{ secrets.GITHUB_TOKEN }} + permissions: + contents: write + steps: + - uses: actions/checkout@v4 + + - uses: r-lib/actions/setup-pandoc@v2 + + - uses: r-lib/actions/setup-r@v2 + with: + use-public-rspm: true + + - uses: r-lib/actions/setup-r-dependencies@v2 + with: + extra-packages: any::pkgdown, local::. + needs: website + + - name: Build site + run: pkgdown::build_site_github_pages(new_process = FALSE, install = FALSE) + shell: Rscript {0} + + - name: Deploy to GitHub pages 🚀 + if: github.event_name != 'pull_request' + uses: JamesIves/github-pages-deploy-action@v4.5.0 + with: + clean: false + branch: gh-pages + folder: docs diff --git a/DESCRIPTION b/DESCRIPTION index 882df32ca..0a3e7fbb5 100644 --- a/DESCRIPTION +++ b/DESCRIPTION @@ -1,23 +1,27 @@ Package: dsBaseClient -Title: DataSHIELD Client Functions +Title: 'DataSHIELD' Client Side Base Functions Version: 6.4.0.9000 -Description: Base DataSHIELD functions for the client side. DataSHIELD is a software package which allows - you to do non-disclosive federated analysis on sensitive data. DataSHIELD analytic functions have +Description: Base 'DataSHIELD' functions for the client 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. + the automated output checks. For more details, see citation("dsBaseClient"). Authors@R: c(person(given = "Paul", family = "Burton", - role = c("aut")), + role = c("aut"), + comment = c(ORCID = "0000-0001-5799-9634")), person(given = "Rebecca", family = "Wilson", - role = c("aut")), + role = c("aut"), + comment = c(ORCID = "0000-0003-2294-593X")), person(given = "Olly", family = "Butters", - role = c("aut")), + role = c("aut"), + comment = c(ORCID = "0000-0003-0354-8461")), person(given = "Patricia", family = "Ryser-Welch", - role = c("aut")), + role = c("aut"), + comment = c(ORCID = "0000-0002-0070-0264")), person(given = "Alex", family = "Westerberg", role = c("aut")), @@ -37,6 +41,17 @@ Authors@R: c(person(given = "Paul", role = c("aut"), email = "yannick.marcon@obiba.org", comment = c(ORCID = "0000-0003-0138-2023")), + person(given = "Tom", + family = "Bishop", + role = c("aut")), + person(given = "Amadou", + family = "Gaye", + role = c("aut"), + comment = c(ORCID = "0000-0002-1180-2792")), + person(given = "Xavier", + family = "EscribĂ -Montagut", + role = c("aut"), + comment = c(ORCID = "0000-0003-2888-8948")), person(given = "Stuart", family = "Wheater", role = c("aut", "cre"), @@ -58,6 +73,7 @@ Imports: Suggests: lme4, httr, + spelling, tibble, testthat, e1071, @@ -65,5 +81,6 @@ Suggests: DSOpal, DSMolgenisArmadillo, DSLite -RoxygenNote: 7.3.2 +RoxygenNote: 7.3.3 Encoding: UTF-8 +Language: en-GB diff --git a/NAMESPACE b/NAMESPACE index d737d5e6a..3bfe6e6e5 100644 --- a/NAMESPACE +++ b/NAMESPACE @@ -1,6 +1,5 @@ # Generated by roxygen2: do not edit by hand -export(computeWeightedMeans) export(ds.Boole) export(ds.abs) export(ds.asCharacter) @@ -73,6 +72,7 @@ export(ds.matrixDimnames) export(ds.matrixInvert) export(ds.matrixMult) export(ds.matrixTranspose) +export(ds.mdPattern) export(ds.mean) export(ds.meanByClass) export(ds.meanSdGp) @@ -104,6 +104,8 @@ export(ds.seq) export(ds.setSeed) export(ds.skewness) export(ds.sqrt) +export(ds.subset) +export(ds.subsetByClass) export(ds.summary) export(ds.table) export(ds.table1D) diff --git a/R/computeWeightedMeans.R b/R/computeWeightedMeans.R index 0f04fc915..1284ffc08 100644 --- a/R/computeWeightedMeans.R +++ b/R/computeWeightedMeans.R @@ -9,9 +9,11 @@ #' @param variables character name of the variable(s) to focus on. The variables must be in the data.table #' @param weight character name of the data.table column that contains a weight. #' @param by character vector of the columns to group by +#' @return Returns a data table object with computed weighted means. +#' #' @import data.table #' @importFrom stats as.formula na.omit ts weighted.mean -#' @export +#' @keywords internal computeWeightedMeans <- function(data_table, variables, weight, by) { if (is.null(weight)) { diff --git a/R/ds.asFactor.R b/R/ds.asFactor.R index 476f00f85..8e5fbd090 100644 --- a/R/ds.asFactor.R +++ b/R/ds.asFactor.R @@ -48,7 +48,7 @@ #' \code{baseline.level = 1} and \code{forced.factor.levels = c(1,2,3,4,5)}. #' The input vector is converted to the following matrix of dummy variables: #' -#' \tabular{rrrrr}{ +#' \tabular{rrrr}{ #' \strong{DV2} \tab \strong{DV3} \tab \strong{DV4} \tab \strong{DV5} \cr #' 0 \tab 0 \tab 0 \tab 0\cr #' 1 \tab 0 \tab 0 \tab 0\cr diff --git a/R/ds.asNumeric.R b/R/ds.asNumeric.R index 7b4da435e..3e2b445fa 100644 --- a/R/ds.asNumeric.R +++ b/R/ds.asNumeric.R @@ -5,7 +5,7 @@ #' @details This function is based on the native R function \code{as.numeric}. #' However, it behaves differently with some specific classes of variables. For example, if the input #' object is of class factor, it first converts its values into characters and then convert those to -#' numerics. This behavior is important for the case where the input object is of class factor having +#' numerics. This behaviour is important for the case where the input object is of class factor having #' numbers as levels. In that case, the native R #' \code{as.numeric} function returns the underlying level codes and not the values as numbers. #' For example \code{as.numeric} in R converts the factor vector: \cr diff --git a/R/ds.cbind.R b/R/ds.cbind.R index d943e0175..e21cb961c 100644 --- a/R/ds.cbind.R +++ b/R/ds.cbind.R @@ -157,7 +157,7 @@ ds.cbind <- function(x=NULL, DataSHIELD.checks=FALSE, force.colnames=NULL, newob } colNames <- unlist(colNames) if(anyDuplicated(colNames) != 0){ - cat("\n Warning: Some column names in study", j, "are duplicated and a suffix '.k' will be added to the kth replicate \n") + message("\n Warning: Some column names in study", j, "are duplicated and a suffix '.k' will be added to the kth replicate \n") } } } @@ -198,7 +198,7 @@ ds.cbind <- function(x=NULL, DataSHIELD.checks=FALSE, force.colnames=NULL, newob next.class <- DSI::datashield.aggregate(datasources[std], calltext1) class.vector <- c(class.vector, next.class[[1]]) if (notify.of.progress){ - cat("\n",j," of ", length(x), " elements to combine in step 1 of 2 in study ", std, "\n") + message("\n",j," of ", length(x), " elements to combine in step 1 of 2 in study ", std, "\n") } } for(j in 1:length(x)){ @@ -206,14 +206,14 @@ ds.cbind <- function(x=NULL, DataSHIELD.checks=FALSE, force.colnames=NULL, newob if(class.vector[j]!="data.frame" && class.vector[j]!="matrix"){ colname.vector <- c(colname.vector, test.df) if (notify.of.progress){ - cat("\n",j," of ", length(x), " elements to combine in step 2 of 2 in study ", std, "\n") + message("\n",j," of ", length(x), " elements to combine in step 2 of 2 in study ", std, "\n") } }else{ calltext2 <- call('colnamesDS', test.df) df.names <- DSI::datashield.aggregate(datasources[std], calltext2) colname.vector <- c(colname.vector, df.names[[1]]) if (notify.of.progress){ - cat("\n", j," of ", length(x), " elements to combine in step 2 of 2 in study ", std, "\n") + message("\n", j," of ", length(x), " elements to combine in step 2 of 2 in study ", std, "\n") } } } @@ -221,7 +221,7 @@ ds.cbind <- function(x=NULL, DataSHIELD.checks=FALSE, force.colnames=NULL, newob } if (notify.of.progress){ - cat("\nBoth steps in all studies completed\n") + message("\nBoth steps in all studies completed\n") } # prepare name vectors for transmission diff --git a/R/ds.colnames.R b/R/ds.colnames.R index a4b98b1ad..a9e802523 100644 --- a/R/ds.colnames.R +++ b/R/ds.colnames.R @@ -1,51 +1,51 @@ #' #' @title Produces column names of the R object in the server-side -#' @description Retrieves column names of an R object on the server-side. +#' @description Retrieves column names of an R object on the server-side. #' This function is similar to R function \code{colnames}. -#' @details The input is restricted to the object of type \code{data.frame} or \code{matrix}. -#' +#' @details The input is restricted to the object of type \code{data.frame} or \code{matrix}. +#' #' Server function called: \code{colnamesDS} #' @param x a character string providing the name of the input data frame or matrix. -#' @param datasources a list of \code{\link[DSI]{DSConnection-class}} objects obtained after login. +#' @param datasources a list of \code{\link[DSI]{DSConnection-class}} objects obtained after login. #' If the \code{datasources} argument is not specified #' the default set of connections will be used: see \code{\link[DSI]{datashield.connections_default}}. -#' @return \code{ds.colnames} returns the column names of -#' the specified server-side data frame or matrix. +#' @return \code{ds.colnames} returns the column names of +#' the specified server-side data frame or matrix. #' @author DataSHIELD Development Team #' @seealso \code{\link{ds.dim}} to obtain the dimensions of a matrix or a data frame. -#' @examples +#' @examples #' \dontrun{ -#' +#' #' ## Version 6, for version 5 see the Wiki #' # Connecting to the Opal servers -#' +#' #' require('DSI') #' require('DSOpal') #' require('dsBaseClient') -#' +#' #' builder <- DSI::newDSLoginBuilder() -#' builder$append(server = "study1", -#' url = "http://192.168.56.100:8080/", -#' user = "administrator", password = "datashield_test&", +#' builder$append(server = "study1", +#' url = "http://192.168.56.100:8080/", +#' user = "administrator", password = "datashield_test&", #' table = "CNSIM.CNSIM1", driver = "OpalDriver") -#' builder$append(server = "study2", -#' url = "http://192.168.56.100:8080/", -#' user = "administrator", password = "datashield_test&", +#' builder$append(server = "study2", +#' url = "http://192.168.56.100:8080/", +#' user = "administrator", password = "datashield_test&", #' table = "CNSIM.CNSIM2", driver = "OpalDriver") #' builder$append(server = "study3", -#' url = "http://192.168.56.100:8080/", -#' user = "administrator", password = "datashield_test&", +#' url = "http://192.168.56.100:8080/", +#' user = "administrator", password = "datashield_test&", #' table = "CNSIM.CNSIM3", driver = "OpalDriver") #' logindata <- builder$build() -#' +#' #' # Log onto the remote Opal training servers -#' connections <- DSI::datashield.login(logins = logindata, assign = TRUE, symbol = "D") -#' +#' connections <- DSI::datashield.login(logins = logindata, assign = TRUE, symbol = "D") +#' #' # Getting column names of the R objects stored in the server-side #' ds.colnames(x = "D", #' datasources = connections[1]) #only the first server ("study1") is used #' # Clear the Datashield R sessions and logout -#' datashield.logout(connections) +#' datashield.logout(connections) #' } #' @export #' @@ -65,17 +65,6 @@ ds.colnames <- function(x=NULL, datasources=NULL) { stop("Please provide the name of a data.frame or matrix!", call.=FALSE) } - # check if the input object(s) is(are) defined in all the studies - defined <- isDefined(datasources, x) - - # call the internal function that checks the input object is of the same class in all studies. - typ <- checkClass(datasources, x) - - # if the input object is not a matrix or a dataframe stop - if(!('data.frame' %in% typ) & !('matrix' %in% typ)){ - stop("The input vector must be of type 'data.frame' or a 'matrix'!", call.=FALSE) - } - cally <- call("colnamesDS", x) column_names <- DSI::datashield.aggregate(datasources, cally) diff --git a/R/ds.contourPlot.R b/R/ds.contourPlot.R index 4e195e48b..f1fbb3bd8 100644 --- a/R/ds.contourPlot.R +++ b/R/ds.contourPlot.R @@ -120,6 +120,10 @@ ds.contourPlot <- function(x=NULL, y=NULL, type='combine', show='all', numints=2 stop("y=NULL. Please provide the names of two numeric vectors!", call.=FALSE) } + # Save par and setup reseting of par values + old_par <- graphics::par(no.readonly = TRUE) + on.exit(graphics::par(old_par), add = TRUE) + # check if the input objects are defined in all the studies isDefined(datasources, x) isDefined(datasources, y) diff --git a/R/ds.corTest.R b/R/ds.corTest.R index 38fffceb9..3c9e42a81 100644 --- a/R/ds.corTest.R +++ b/R/ds.corTest.R @@ -10,7 +10,7 @@ #' used for the test. One of "pearson", "kendall", or "spearman", can be abbreviated. #' Default is set to "pearson". #' @param exact a logical indicating whether an exact p-value should be computed. Used for -#' Kendall's tau and Spearman's rho. See ‘Details’ of R stats function \code{cor.test} for +#' Kendall's tau and Spearman's rho. See \emph{Details} of R stats function \code{cor.test} for #' the meaning of NULL (the default). #' @param conf.level confidence level for the returned confidence interval. Currently #' only used for the Pearson product moment correlation coefficient if there are at least diff --git a/R/ds.dataFrame.R b/R/ds.dataFrame.R index 5837747c6..eeddcdd90 100644 --- a/R/ds.dataFrame.R +++ b/R/ds.dataFrame.R @@ -137,7 +137,7 @@ ds.dataFrame <- function(x=NULL, row.names=NULL, check.rows=FALSE, check.names=T } colNames <- unlist(colNames) if(anyDuplicated(colNames) != 0){ - cat("\n Warning: Some column names in study", j, "are duplicated and a suffix '.k' will be added to the kth replicate \n") + message("\n Warning: Some column names in study", j, "are duplicated and a suffix '.k' will be added to the kth replicate \n") } } } @@ -178,7 +178,7 @@ ds.dataFrame <- function(x=NULL, row.names=NULL, check.rows=FALSE, check.names=T next.class <- DSI::datashield.aggregate(datasources[std], calltext1) class.vector <- c(class.vector, next.class[[1]]) if (notify.of.progress){ - cat("\n",j," of ", length(x), " elements to combine in step 1 of 2 in study ", std, "\n") + message("\n",j," of ", length(x), " elements to combine in step 1 of 2 in study ", std, "\n") } } for(j in 1:length(x)){ @@ -186,14 +186,14 @@ ds.dataFrame <- function(x=NULL, row.names=NULL, check.rows=FALSE, check.names=T if(class.vector[j]!="data.frame" && class.vector[j]!="matrix"){ colname.vector <- c(colname.vector, test.df) if (notify.of.progress){ - cat("\n",j," of ", length(x), " elements to combine in step 2 of 2 in study ", std, "\n") + message("\n",j," of ", length(x), " elements to combine in step 2 of 2 in study ", std, "\n") } }else{ calltext2 <- call('colnamesDS', test.df) df.names <- DSI::datashield.aggregate(datasources[std], calltext2) colname.vector <- c(colname.vector, df.names[[1]]) if (notify.of.progress){ - cat("\n", j," of ", length(x), " elements to combine in step 2 of 2 in study ", std, "\n") + message("\n", j," of ", length(x), " elements to combine in step 2 of 2 in study ", std, "\n") } } } @@ -201,7 +201,7 @@ ds.dataFrame <- function(x=NULL, row.names=NULL, check.rows=FALSE, check.names=T } if (notify.of.progress){ - cat("\nBoth steps in all studies completed\n") + message("\nBoth steps in all studies completed\n") } # prepare vectors for transmission diff --git a/R/ds.dataFrameSubset.R b/R/ds.dataFrameSubset.R index 46878520b..1ae6278db 100644 --- a/R/ds.dataFrameSubset.R +++ b/R/ds.dataFrameSubset.R @@ -12,7 +12,7 @@ #' #' Server functions called: \code{dataFrameSubsetDS1} and \code{dataFrameSubsetDS2} #' -#' @param df.name a character string providing the name of the data frame to be subseted. +#' @param df.name a character string providing the name of the data frame to be subset. #' @param V1.name A character string specifying the name of the vector #' to which the Boolean operator is to be applied to define the subset. #' For more information see details. @@ -231,13 +231,13 @@ if(!is.null(rm.cols)){ if (notify.of.progress) { if(num.messages==1){ - cat("\nSource",s,"\n",return.warning.message[[s]][[1]],"\n") + message("\nSource",s,"\n",return.warning.message[[s]][[1]],"\n") }else{ - cat("\nSource",s,"\n") + message("\nSource",s,"\n") for(m in 1:(num.messages-1)){ - cat(return.warning.message[[s]][[m]],"\n") + message(return.warning.message[[s]][[m]],"\n") } - cat(return.warning.message[[s]][[num.messages]],"\n") + message(return.warning.message[[s]][[num.messages]],"\n") } } } diff --git a/R/ds.dmtC2S.R b/R/ds.dmtC2S.R index 1f91efbfe..085d198fb 100644 --- a/R/ds.dmtC2S.R +++ b/R/ds.dmtC2S.R @@ -29,7 +29,7 @@ #' wish to change the connections you wish to use by default the call #' datashield.connections_default('opals.a') will set 'default.connections' #' to be 'opals.a' and so in the absence of specific instructions to the contrary -#' (e.g. by specifiying a particular dataset to be used via the +#' (e.g. by specifying a particular dataset to be used via the #' argument) all subsequent function calls will be to the datasets held in opals.a. #' If the argument is specified, it should be set without #' inverted commas: e.g. datasources=opals.a or datasources=default.connections. @@ -93,7 +93,7 @@ if(dplyr::is.tbl(dfdata)) if(!is.matrix(dfdata) && !is.data.frame(dfdata) && !dplyr::is.tbl(dfdata)) { - cat("\n FAILED: must either be a data.frame, matrix or tibble") + message("\n FAILED: must either be a data.frame, matrix or tibble") return('Please respecify') } diff --git a/R/ds.elspline.R b/R/ds.elspline.R index c4a2bbdd8..01ddca05b 100644 --- a/R/ds.elspline.R +++ b/R/ds.elspline.R @@ -13,7 +13,7 @@ #' @param x the name of the input numeric variable #' @param n integer greater than 2, knots are computed such that they cut n equally-spaced #' intervals along the range of x -#' @param marginal logical, how to parametrize the spline, see Details +#' @param marginal logical, how to parametrise the spline, see Details #' @param names character, vector of names for constructed variables #' @param newobj a character string that provides the name for the output #' variable that is stored on the data servers. Default \code{elspline.newobj}. diff --git a/R/ds.extractQuantiles.R b/R/ds.extractQuantiles.R index ba39dd51c..4068f8f3b 100644 --- a/R/ds.extractQuantiles.R +++ b/R/ds.extractQuantiles.R @@ -224,7 +224,7 @@ datasources.in.current.function<-datasources #CALL CLIENTSIDE FUNCTION ds.dmtC2S TO RETURN final.quantile.df TO SERVERSIDE dsBaseClient::ds.dmtC2S(dfdata=final.quantile.df,newobj="final.quantile.df",datasources = datasources.in.current.function) - cat("\n\n\n"," FINAL RANKING PROCEDURES COMPLETE: + message("\n\n\n"," FINAL RANKING PROCEDURES COMPLETE: PRIMARY RANKING OUTPUT IS IN DATA FRAME",extract.summary.output.ranks.df, " WHICH IS SORTED BY",extract.ranks.sort.by," AND HAS BEEN diff --git a/R/ds.forestplot.R b/R/ds.forestplot.R index 3b4873875..e1bc21c13 100644 --- a/R/ds.forestplot.R +++ b/R/ds.forestplot.R @@ -1,15 +1,16 @@ #' @title Forestplot for SLMA models -#' @description Draws a foresplot of the coefficients for Study-Level Meta-Analysis performed with +#' @description Draws a forestplot of the coefficients for Study-Level Meta-Analysis performed with #' DataSHIELD #' -#' @param mod \code{list} List outputed by any of the SLMA models of DataSHIELD (\code{ds.glmerSLMA}, +#' @param mod \code{list} List outputted by any of the SLMA models of DataSHIELD (\code{ds.glmerSLMA}, #' \code{ds.glmSLMA}, \code{ds.lmerSLMA}) -#' @param variable \code{character} (default \code{NULL}) Variable to meta-analyze and visualize, by setting this +#' @param variable \code{character} (default \code{NULL}) Variable to meta-analyse and visualise, by setting this #' argument to \code{NULL} (default) the first independent variable will be used. #' @param method \code{character} (Default \code{"ML"}) Method to estimate the between study variance. #' See details from \code{?meta::metagen} for the different options. #' @param layout \code{character} (default \code{"JAMA"}) Layout of the plot. #' See details from \code{?meta::metagen} for the different options. +#' @return Results a foresplot object created with `meta::forest`. #' #' @export #' diff --git a/R/ds.glm.R b/R/ds.glm.R index 13cba2d96..8b1dbceb7 100644 --- a/R/ds.glm.R +++ b/R/ds.glm.R @@ -343,10 +343,10 @@ ds.glm <- function(formula=NULL, data=NULL, family=NULL, offset=NULL, weights=NU # to provide name of offset or weights variable if(sum(as.numeric(grepl('offset', formula, ignore.case=TRUE)))>0 || sum(as.numeric(grepl('weights', formula, ignore.case=TRUE)))>0){ - cat("\n\n WARNING: you may have specified an offset or regression weights") - cat("\n as part of the model formula. In ds.glm (unlike the usual glm in R)") - cat("\n you must specify an offset or weights separately from the formula") - cat("\n using the offset or weights argument.\n\n") + message("\n\n WARNING: you may have specified an offset or regression weights") + message("\n as part of the model formula. In ds.glm (unlike the usual glm in R)") + message("\n you must specify an offset or weights separately from the formula") + message("\n using the offset or weights argument.\n\n") } formula <- stats::as.formula(formula) @@ -451,12 +451,12 @@ ds.glm <- function(formula=NULL, data=NULL, family=NULL, offset=NULL, weights=NU "Any values of 1 in the following tables denote potential disclosure risks\n", "please use the argument to include only valid studies.\n", "Errors by study are as follows:\n") - print(as.matrix(y.invalid)) - print(as.matrix(Xpar.invalid)) - print(as.matrix(w.invalid)) - print(as.matrix(o.invalid)) - print(as.matrix(glm.saturation.invalid)) - print(as.matrix(errorMessage)) + message(as.matrix(y.invalid)) + message(as.matrix(Xpar.invalid)) + message(as.matrix(w.invalid)) + message(as.matrix(o.invalid)) + message(as.matrix(glm.saturation.invalid)) + message(as.matrix(errorMessage)) return(list( output.blocked.information.1, diff --git a/R/ds.glmPredict.R b/R/ds.glmPredict.R index ff0d7647e..96dfc792c 100644 --- a/R/ds.glmPredict.R +++ b/R/ds.glmPredict.R @@ -91,7 +91,7 @@ #' wish to change the connections you wish to use by default the call #' datashield.connections_default('opals.a') will set 'default.connections' #' to be 'opals.a' and so in the absence of specific instructions to the contrary -#' (e.g. by specifiying a particular dataset to be used via the +#' (e.g. by specifying a particular dataset to be used via the #' argument) all subsequent function calls will be to the datasets held in opals.a. #' If the argument is specified, it should be set without #' inverted commas: e.g. datasources=opals.a or datasources=default.connections. @@ -116,7 +116,7 @@ #' the name - if one was specified - of the dataframe being used as the basis for predictions, #' the output.type specified ('link', 'response' or 'terms'), the value of the #' dispersion parameter if one had been specified and the residual scale parameter (which is -#' multipled by sqrt(dispersion parameter) if one has been set). If output.type = 'terms', +#' multiplied by sqrt(dispersion parameter) if one has been set). If output.type = 'terms', #' the summary statistics for the fit and se.fit vectors are replaced by equivalent #' summary statistics for each column in fit and se.fit matrices which each have k columns #' if k terms are being summarised. diff --git a/R/ds.glmSLMA.R b/R/ds.glmSLMA.R index 1645b1548..c83eb629b 100644 --- a/R/ds.glmSLMA.R +++ b/R/ds.glmSLMA.R @@ -263,7 +263,7 @@ #' them into their meta-analysis package of choice. #' @return \code{is.object.created} and \code{validity.check} are standard #' items returned by an assign function when the designated newobj appears to have -#' been successfuly created on the serverside at each study. This output is +#' been successfully created on the serverside at each study. This output is #' produced specifically by the assign function \code{glmSLMADS.assign} that writes #' out the glm object on the serverside #' @author Paul Burton, for DataSHIELD Development Team 07/07/20 @@ -398,10 +398,10 @@ ds.glmSLMA<-function(formula=NULL, family=NULL, offset=NULL, weights=NULL, combi if(sum(as.numeric(grepl('offset', formula, ignore.case=TRUE)))>0 || sum(as.numeric(grepl('weights', formula, ignore.case=TRUE)))>0) { - cat("\n\n WARNING: you may have specified an offset or regression weights") - cat("\n as part of the model formula. In ds.glm (unlike the usual glm in R)") - cat("\n you must specify an offset or weights separately from the formula") - cat("\n using the offset or weights argument.\n\n") + message("\n\n WARNING: you may have specified an offset or regression weights") + message("\n as part of the model formula. In ds.glm (unlike the usual glm in R)") + message("\n you must specify an offset or weights separately from the formula") + message("\n using the offset or weights argument.\n\n") } formula <- stats::as.formula(formula) @@ -617,7 +617,7 @@ if(at.least.one.study.data.error) } if (notify.of.progress) { - cat("\n\nSAVING SERVERSIDE glm OBJECT AS: <",newobj,">\n\n") + message("\n\nSAVING SERVERSIDE glm OBJECT AS: <",newobj,">\n\n") } calltext.2 <- call('glmSLMADS.assign', formula, family, offset, weights, dataName) @@ -664,17 +664,17 @@ if(!all.studies.valid) { for(sse in study.with.errors) { - cat("\n","Error report from second serverside function for study",sse,"\n") - cat("############################################################","\n") - cat(unlist(study.summary[[sse]][[1]]),"\n") - cat(unlist(study.summary[[sse]][[2]]),"\n\n") + message("\n","Error report from second serverside function for study",sse,"\n") + message("############################################################","\n") + message(unlist(study.summary[[sse]][[1]]),"\n") + message(unlist(study.summary[[sse]][[2]]),"\n\n") num.messages<-length(study.summary[[sse]])-2 for(m in 1:num.messages) { if(!is.null(unlist(study.summary[[sse]][[2+m]]))) { - cat(unlist(study.summary[[sse]][[2+m]]),"\n\n") + message(unlist(study.summary[[sse]][[2+m]]),"\n\n") } } } @@ -806,8 +806,8 @@ if(num.valid.studies>1){ if(!coefficient.vectors.match){ - cat("\n\nModels in different sources vary in structure\nplease match coefficients for meta-analysis individually\n") - cat("nYou can use the DataSHIELD generated estimates and standard errors as the basis for a meta-analysis\nbut carry out the final pooling step independently of DataSHIELD using whatever meta-analysis package you wish\n\n") + message("\n\nModels in different sources vary in structure\nplease match coefficients for meta-analysis individually\n") + message("nYou can use the DataSHIELD generated estimates and standard errors as the basis for a meta-analysis\nbut carry out the final pooling step independently of DataSHIELD using whatever meta-analysis package you wish\n\n") return(list(output.summary=output.summary)) } diff --git a/R/ds.glmSummary.R b/R/ds.glmSummary.R index 38df81637..9fc259c5b 100644 --- a/R/ds.glmSummary.R +++ b/R/ds.glmSummary.R @@ -48,7 +48,7 @@ #' wish to change the connections you wish to use by default the call #' datashield.connections_default('opals.a') will set 'default.connections' #' to be 'opals.a' and so in the absence of specific instructions to the contrary -#' (e.g. by specifiying a particular dataset to be used via the +#' (e.g. by specifying a particular dataset to be used via the #' argument) all subsequent function calls will be to the datasets held in opals.a. #' If the argument is specified, it should be set without #' inverted commas: e.g. datasources=opals.a or datasources=default.connections. @@ -172,17 +172,17 @@ if(obj.name.exists.in.all.sources && obj.non.null.in.all.sources){ # # # # if(no.errors){ # -# cat("\n\nCREATE ASSIGN OBJECT\n") # +# message("\n\nCREATE ASSIGN OBJECT\n") # # # # validity.check<-paste0("<",test.obj.name, "> appears valid in all sources") # # print(list(is.object.created=return.message,validity.check=validity.check)) # # } # # if(!no.errors){ # - validity.check<-paste0("<",test.obj.name,"> invalid in at least one source. See studyside.messages:") # - print(list(is.object.created=return.message,validity.check=validity.check, # - studyside.messages=studyside.message)) # - } # + validity.check<-paste0("<",test.obj.name,"> invalid in at least one source. See studyside.messages:") # + message(list(is.object.created=return.message,validity.check=validity.check, # + studyside.messages=studyside.message)) # + } # # #END OF CHECK OBJECT CREATED CORECTLY MODULE # ############################################################################################################# diff --git a/R/ds.glmerSLMA.R b/R/ds.glmerSLMA.R index 612eada82..f6a7a4171 100644 --- a/R/ds.glmerSLMA.R +++ b/R/ds.glmerSLMA.R @@ -269,10 +269,10 @@ ds.glmerSLMA <- function(formula=NULL, offset=NULL, weights=NULL, combine.with.m if(sum(as.numeric(grepl('offset', formula, ignore.case=TRUE)))>0 || sum(as.numeric(grepl('weights', formula, ignore.case=TRUE)))>0) { - cat("\n\n WARNING: you may have specified an offset or regression weights") - cat("\n as part of the model formula. In ds.glm (unlike the usual glm in R)") - cat("\n you must specify an offset or weights separately from the formula") - cat("\n using the offset or weights argument.\n\n") + message("\n\n WARNING: you may have specified an offset or regression weights") + message("\n as part of the model formula. In ds.glm (unlike the usual glm in R)") + message("\n you must specify an offset or weights separately from the formula") + message("\n using the offset or weights argument.\n\n") } formula <- stats::as.formula(formula) @@ -363,7 +363,7 @@ ds.glmerSLMA <- function(formula=NULL, offset=NULL, weights=NULL, combine.with.m if (notify.of.progress) { - cat("\n\nSAVING SERVERSIDE glmerMod OBJECT AS: <",newobj,">\n\n") + message("\n\nSAVING SERVERSIDE glmerMod OBJECT AS: <",newobj,">\n\n") } calltext.2 <- call('glmerSLMADS.assign', formula, offset, weights, dataName, family, @@ -407,17 +407,17 @@ ds.glmerSLMA <- function(formula=NULL, offset=NULL, weights=NULL, combine.with.m { for(sse in study.with.errors) { - cat("\n","Error report from second serverside function for study",sse,"\n") - cat("############################################################","\n") - cat(unlist(study.summary[[sse]][[1]]),"\n") - cat(unlist(study.summary[[sse]][[2]]),"\n\n") + message("\n","Error report from second serverside function for study",sse,"\n") + message("############################################################","\n") + message(unlist(study.summary[[sse]][[1]]),"\n") + message(unlist(study.summary[[sse]][[2]]),"\n\n") num.messages<-length(study.summary[[sse]])-2 for(m in 1:num.messages) { if(!is.null(unlist(study.summary[[sse]][[2+m]]))) { - cat(unlist(study.summary[[sse]][[2+m]]),"\n\n") + message(unlist(study.summary[[sse]][[2+m]]),"\n\n") } } } @@ -425,8 +425,8 @@ ds.glmerSLMA <- function(formula=NULL, offset=NULL, weights=NULL, combine.with.m if(all.studies.valid) { - cat("\nAll studies passed disclosure tests\n") - cat("Please check for convergence warnings in the study summaries\n\n\n") + message("\nAll studies passed disclosure tests\n") + message("Please check for convergence warnings in the study summaries\n\n\n") } } @@ -551,8 +551,8 @@ ds.glmerSLMA <- function(formula=NULL, offset=NULL, weights=NULL, combine.with.m if(!coefficient.vectors.match){ - cat("\n\nModels in different sources vary in structure\nplease match coefficients for meta-analysis individually\n") - cat("nYou can use the DataSHIELD generated estimates and standard errors as the basis for a meta-analysis\nbut carry out the final pooling step independently of DataSHIELD using whatever meta-analysis package you wish\n\n") + message("\n\nModels in different sources vary in structure\nplease match coefficients for meta-analysis individually\n") + message("nYou can use the DataSHIELD generated estimates and standard errors as the basis for a meta-analysis\nbut carry out the final pooling step independently of DataSHIELD using whatever meta-analysis package you wish\n\n") return(list(output.summary=output.summary)) } @@ -615,10 +615,10 @@ ds.glmerSLMA <- function(formula=NULL, offset=NULL, weights=NULL, combine.with.m if (notify.of.progress) { - cat("Convergence information\n") + message("Convergence information\n") for(r in 1:numstudies) { - cat(full.error.message[r],"\n") + message(full.error.message[r],"\n") } } diff --git a/R/ds.heatmapPlot.R b/R/ds.heatmapPlot.R index 262b1d700..024224aa5 100644 --- a/R/ds.heatmapPlot.R +++ b/R/ds.heatmapPlot.R @@ -169,6 +169,10 @@ ds.heatmapPlot <- function(x=NULL, y=NULL, type="combine", show="all", numints=2 stop("y=NULL. Please provide the names of the 2nd numeric vector!", call.=FALSE) } + # Save par and setup reseting of par values + old_par <- graphics::par(no.readonly = TRUE) + on.exit(graphics::par(old_par), add = TRUE) + # check if the input objects are defined in all the studies isDefined(datasources, x) isDefined(datasources, y) diff --git a/R/ds.histogram.R b/R/ds.histogram.R index 0f5357b77..0fbe2e209 100644 --- a/R/ds.histogram.R +++ b/R/ds.histogram.R @@ -167,6 +167,10 @@ ds.histogram <- function(x=NULL, type="split", num.breaks=10, method="smallCells stop("Please provide the name of the input vector!", call.=FALSE) } + # Save par and setup reseting of par values + old_par <- graphics::par(no.readonly = TRUE) + on.exit(graphics::par(old_par), add = TRUE) + # check if the input object is defined in all the studies isDefined(datasources, x) diff --git a/R/ds.igb_standards.R b/R/ds.igb_standards.R index fb7953f1e..89498a0ca 100644 --- a/R/ds.igb_standards.R +++ b/R/ds.igb_standards.R @@ -20,11 +20,20 @@ #' used: see \code{\link[DSI]{datashield.connections_default}}. #' @note For gestational ages between 24 and 33 weeks, the INTERGROWTH very early preterm #' standard is used. -#' @references International standards for newborn weight, length, and head circumference by -#' gestational age and sex: the Newborn Cross-Sectional Study of the INTERGROWTH-21st Project -#' Villar, JosĂ© et al. The Lancet, Volume 384, Issue 9946, 857-868 -#' INTERGROWTH-21st very preterm size at birth reference charts. Lancet 2016 -#' doi.org/10.1016/S0140-6736(16) 00384-6. Villar, JosĂ© et al. +#' @references +#' \itemize{ +#' \item Villar, J., Ismail, L.C., Victora, C.G., Ohuma, E.O., Bertino, E., +#' Altman, D.G., Lambert, A., Papageorghiou, A.T., Carvalho, M., Jaffer, Y.A., +#' Gravett, M.G., Purwar, M., Frederick, I.O., Noble, A.J., Pang, R., Barros, +#' F.C., Chumlea, C., Bhutta, Z.A., Kennedy, S.H., 2014. International +#' standards for newborn weight, length, and head circumference by gestational +#' age and sex: the Newborn Cross-Sectional Study of the INTERGROWTH-21st +#' Project. The Lancet 384, 857--868. https://doi.org/10.1016/S0140-6736(14)60932-6 +#' \item Villar, J., Giuliani, F., Fenton, T.R., Ohuma, E.O., Ismail, L.C., +#' Kennedy, S.H., 2016. INTERGROWTH-21st very preterm size at birth reference +#' charts. The Lancet 387, 844--845. https://doi.org/10.1016/S0140-6736(16)00384-6 +#' +#' } #' @return assigns the converted measurement as a new object on the server-side #' @author Demetris Avraam for DataSHIELD Development Team #' @export diff --git a/R/ds.listClientsideFunctions.R b/R/ds.listClientsideFunctions.R index ba7c57a89..752401471 100644 --- a/R/ds.listClientsideFunctions.R +++ b/R/ds.listClientsideFunctions.R @@ -57,48 +57,30 @@ for(j in 1:length(search.path)) } - cat("\n### Full search path \n") print.search.list<-search() - print(print.search.list) if(test.userDefinedClient==TRUE) { - cat("\n### userDefinedClient functions \n") print.text<-ls(pos=".GlobalEnv",pattern="ds.*") if(identical(print.text,character(0)))print.text<-"No clientside functions in this repository" - print(print.text) print.text.full<-c(print.text.full,print.text) } if(test.dsBetaTestClient==TRUE) { - cat("\n### dsBetaTestClient functions \n") print.text<-ls(pos="package:dsBetaTestClient") if(identical(print.text,character(0)))print.text<-"No clientside functions in this repository" - print(print.text) print.text.full<-c(print.text.full,print.text) } if(test.dsBaseClient==TRUE) { - cat("\n### dsBaseClient functions \n") print.text<-ls(pos="package:dsBaseClient") if(identical(print.text,character(0)))print.text<-"No clientside functions in this repository" - print(print.text) print.text.full<-c(print.text.full,print.text) } - if(test.no.functions==TRUE) - { - cat("\n### No standard clientside functions identified \n") - } - - cat("\nIf you cannot see one or more of the clientside functions you expected to find", - "please see above for the full search path. If one of the paths is a possible clientside repository", - "issue the R command ls(pos='package:dsPackageName')", - "where 'package:dsPackageName' is the full name stated in the search path\n\n") - return(print.text.full) } # ds.listClientsideFunctions() diff --git a/R/ds.lmerSLMA.R b/R/ds.lmerSLMA.R index b6d05c9bf..8b7c69b2c 100644 --- a/R/ds.lmerSLMA.R +++ b/R/ds.lmerSLMA.R @@ -225,10 +225,10 @@ ds.lmerSLMA <- function(formula=NULL, offset=NULL, weights=NULL, combine.with.me if(sum(as.numeric(grepl('offset', formula, ignore.case=TRUE)))>0 || sum(as.numeric(grepl('weights', formula, ignore.case=TRUE)))>0) { - cat("\n\n WARNING: you may have specified an offset or regression weights") - cat("\n as part of the model formula. In ds.glm (unlike the usual glm in R)") - cat("\n you must specify an offset or weights separately from the formula") - cat("\n using the offset or weights argument.\n\n") + message("\n\n WARNING: you may have specified an offset or regression weights") + message("\n as part of the model formula. In ds.glm (unlike the usual glm in R)") + message("\n you must specify an offset or weights separately from the formula") + message("\n using the offset or weights argument.\n\n") } formula <- stats::as.formula(formula) @@ -286,7 +286,7 @@ ds.lmerSLMA <- function(formula=NULL, offset=NULL, weights=NULL, combine.with.me if(!is.null(optimizer)&&optimizer!="nloptwrap") { errorMessage.opt<-"ERROR: the only optimizer currently available for lmer is 'nloptwrap', please respecify" - cat("\n",errorMessage.opt,"\n") + message("\n",errorMessage.opt,"\n") return(list(errorMessage=errorMessage.opt)) } @@ -303,7 +303,7 @@ ds.lmerSLMA <- function(formula=NULL, offset=NULL, weights=NULL, combine.with.me } if (notify.of.progress) { - cat("\n\nSAVING SERVERSIDE lmerMod OBJECT AS: <",newobj,">\n\n") + message("\n\nSAVING SERVERSIDE lmerMod OBJECT AS: <",newobj,">\n\n") } calltext.2 <- call('lmerSLMADS.assign', formula, offset, weights, dataName, REML, @@ -343,17 +343,17 @@ ds.lmerSLMA <- function(formula=NULL, offset=NULL, weights=NULL, combine.with.me { for(sse in study.with.errors) { - cat("\n","Error report from second serverside function for study",sse,"\n") - cat("############################################################","\n") - cat(unlist(study.summary[[sse]][[1]]),"\n") - cat(unlist(study.summary[[sse]][[2]]),"\n\n") + message("\n","Error report from second serverside function for study",sse,"\n") + message("############################################################","\n") + message(unlist(study.summary[[sse]][[1]]),"\n") + message(unlist(study.summary[[sse]][[2]]),"\n\n") num.messages<-length(study.summary[[sse]])-2 for(m in 1:num.messages) { if(!is.null(unlist(study.summary[[sse]][[2+m]]))) { - cat(unlist(study.summary[[sse]][[2+m]]),"\n\n") + message(unlist(study.summary[[sse]][[2+m]]),"\n\n") } } } @@ -361,8 +361,8 @@ ds.lmerSLMA <- function(formula=NULL, offset=NULL, weights=NULL, combine.with.me if(all.studies.valid) { - cat("\nAll studies passed disclosure tests\n") - cat("Please check for convergence warnings in the study summaries\n\n\n") + message("\nAll studies passed disclosure tests\n") + message("Please check for convergence warnings in the study summaries\n\n\n") } } @@ -488,8 +488,8 @@ ds.lmerSLMA <- function(formula=NULL, offset=NULL, weights=NULL, combine.with.me if(!coefficient.vectors.match){ - cat("\n\nModels in different sources vary in structure\nplease match coefficients for meta-analysis individually\n") - cat("nYou can use the DataSHIELD generated estimates and standard errors as the basis for a meta-analysis\nbut carry out the final pooling step independently of DataSHIELD using whatever meta-analysis package you wish\n\n") + message("\n\nModels in different sources vary in structure\nplease match coefficients for meta-analysis individually\n") + message("nYou can use the DataSHIELD generated estimates and standard errors as the basis for a meta-analysis\nbut carry out the final pooling step independently of DataSHIELD using whatever meta-analysis package you wish\n\n") return(list(output.summary=output.summary)) } @@ -552,10 +552,10 @@ for(q in 1:numstudies) if (notify.of.progress) { - cat("Convergence information\n") + message("Convergence information\n") for(r in 1:numstudies) { - cat(full.error.message[r],"\n") + message(full.error.message[r],"\n") } } diff --git a/R/ds.ls.R b/R/ds.ls.R index 415c93f4d..2f65a3c8f 100644 --- a/R/ds.ls.R +++ b/R/ds.ls.R @@ -41,7 +41,7 @@ #' Server function called: \code{lsDS}. #' #' @param search.filter character string (potentially including \code{*} symbol) specifying the filter -#' for the object name that you want to find in the enviroment. For more information see \strong{Details}. +#' for the object name that you want to find in the environment. For more information see \strong{Details}. #' @param env.to.search an integer (e.g. in \code{2} or \code{2L} format) specifying the position #' in the search path of the environment to be explored. \code{1L} is the current active analytic #' environment on the server-side and is the default value of \code{env.to.search}. diff --git a/R/ds.lspline.R b/R/ds.lspline.R index 9aca23974..e044005cb 100644 --- a/R/ds.lspline.R +++ b/R/ds.lspline.R @@ -10,7 +10,7 @@ #' in slope as compared to the previous segment. #' @param x the name of the input numeric variable #' @param knots numeric vector of knot positions -#' @param marginal logical, how to parametrize the spline, see Details +#' @param marginal logical, how to parametrise the spline, see Details #' @param names character, vector of names for constructed variables #' @param newobj a character string that provides the name for the output #' variable that is stored on the data servers. Default \code{lspline.newobj}. diff --git a/R/ds.matrix.R b/R/ds.matrix.R index 6ee9bdfd5..69ad3a728 100644 --- a/R/ds.matrix.R +++ b/R/ds.matrix.R @@ -27,7 +27,7 @@ #' #' @param mdata a character string specifying #' the name of a server-side scalar or vector. Also, a numeric value representing a -#' scalar specified from the client-side can be speficied. +#' scalar specified from the client-side can be specified #' Zeros, negative values and NAs are all allowed. #' For more information see \strong{Details}. #' @param from a character string specifying the source and nature of \code{mdata}. @@ -171,7 +171,7 @@ ds.matrix <- function(mdata = NA, from="clientside.scalar", nrows.scalar=NULL, n #Check that valid from has been specified if(from!="serverside.vector"&&from!="serverside.scalar"&&from!="clientside.scalar") { - cat(" FAILED: must be specified as one of the following - 'serverside.vector', + message(" FAILED: must be specified as one of the following - 'serverside.vector', 'serverside.scalar', 'clientside.scalar'\n\n") return('Please respecify') } diff --git a/R/ds.matrixDiag.R b/R/ds.matrixDiag.R index f6edcbcd5..1ea1341a4 100644 --- a/R/ds.matrixDiag.R +++ b/R/ds.matrixDiag.R @@ -37,7 +37,7 @@ #' Server function called: \code{matrixDiagDS} #' @param x1 a character string specifying #' the name of a server-side scalar or vector. Also, a numeric value or vector -#' specified from the client-side can be speficied. This argument depends +#' specified from the client-side can be specified. This argument depends #' on the value specified in \code{aim}. #' For more information see \strong{Details}. #' @param aim a character string specifying the behaviour of the function. @@ -203,7 +203,7 @@ ds.matrixDiag<-function(x1=NULL, aim=NULL, nrows.scalar=NULL, newobj=NULL, datas if(aim!="serverside.vector.2.matrix"&&aim!="serverside.scalar.2.matrix"&&aim!="serverside.matrix.2.vector"&& aim!="clientside.vector.2.matrix"&&aim!="clientside.scalar.2.matrix") { - cat(" FAILED: aim must be specified as one of the following - 'serverside.vector.2.matrix', + message(" FAILED: aim must be specified as one of the following - 'serverside.vector.2.matrix', 'serverside.scalar.2.matrix', 'serverside.matrix.2.vector', 'clientside.vector.2.matrix', 'clientside.scalar.2.matrix'\n\n") return('Please respecify') diff --git a/R/ds.mdPattern.R b/R/ds.mdPattern.R new file mode 100644 index 000000000..af59498e2 --- /dev/null +++ b/R/ds.mdPattern.R @@ -0,0 +1,305 @@ +#' +#' @title Display missing data patterns with disclosure control +#' @description This function is a client-side wrapper for the server-side mdPatternDS +#' function. It generates a missing data pattern matrix similar to mice::md.pattern but +#' with disclosure control applied to prevent revealing small cell counts. +#' @details The function calls the server-side mdPatternDS function which uses +#' mice::md.pattern to analyze missing data patterns. Patterns with counts below the +#' disclosure threshold (default: nfilter.tab = 3) are suppressed to maintain privacy. +#' +#' \strong{Output Format:} +#' - Each row represents a missing data pattern +#' - Pattern counts are shown in row names (e.g., "150", "25") +#' - Columns show 1 if the variable is observed, 0 if missing +#' - Last column shows the total number of missing values per pattern +#' - Last row shows the total number of missing values per variable +#' +#' \strong{Disclosure Control:} +#' +#' Suppressed patterns (count below threshold) are indicated by: +#' - Row name: "suppressed()" where N is the threshold +#' - All pattern values set to NA +#' - Summary row also suppressed to prevent back-calculation +#' +#' \strong{Pooling Behavior (type='combine'):} +#' +#' When pooling across studies, the function uses a \emph{conservative approach} +#' for disclosure control: +#' +#' 1. Identifies identical missing patterns across studies +#' 2. \strong{EXCLUDES suppressed patterns from pooling} - patterns suppressed in +#' ANY study are not included in the pooled count +#' 3. Sums counts only for non-suppressed identical patterns +#' 4. Re-validates pooled counts against disclosure threshold +#' +#' \strong{Important:} This conservative approach means: +#' - Pooled counts may be \emph{underestimates} if some studies had suppressed patterns +#' - This prevents disclosure through subtraction (e.g., if study A shows count=5 +#' and pool shows count=7, one could deduce study B has count=2, violating disclosure) +#' - Different patterns across studies are preserved separately in the pooled result +#' +#' @param x a character string specifying the name of a data frame or matrix on the +#' server-side containing the data to analyze. +#' @param type a character string specifying the output type. If 'split' (default), +#' returns separate patterns for each study. If 'combine', attempts to pool patterns +#' across studies. +#' @param datasources a list of \code{\link[DSI]{DSConnection-class}} objects obtained +#' after login. If the \code{datasources} argument is not specified, the default set of +#' connections will be used: see \code{\link[DSI]{datashield.connections_default}}. +#' @return For type='split': A list with one element per study, each containing: +#' \describe{ +#' \item{pattern}{The missing data pattern matrix for that study} +#' \item{valid}{Logical indicating if all patterns meet disclosure requirements} +#' \item{message}{A message describing the validity status} +#' } +#' +#' For type='combine': A list containing: +#' \describe{ +#' \item{pattern}{The pooled missing data pattern matrix across all studies} +#' \item{valid}{Logical indicating if all pooled patterns meet disclosure requirements} +#' \item{message}{A message describing the validity status} +#' } +#' @author Xavier EscribĂ  montagut for DataSHIELD Development Team +#' @export +#' @examples +#' \dontrun{ +#' ## Version 6, for version 5 see the Wiki +#' +#' # Connecting to the Opal servers +#' +#' require('DSI') +#' require('DSOpal') +#' require('dsBaseClient') +#' +#' builder <- DSI::newDSLoginBuilder() +#' builder$append(server = "study1", +#' url = "http://192.168.56.100:8080/", +#' user = "administrator", password = "datashield_test&", +#' table = "CNSIM.CNSIM1", driver = "OpalDriver") +#' builder$append(server = "study2", +#' url = "http://192.168.56.100:8080/", +#' user = "administrator", password = "datashield_test&", +#' table = "CNSIM.CNSIM2", driver = "OpalDriver") +#' logindata <- builder$build() +#' +#' connections <- DSI::datashield.login(logins = logindata, assign = TRUE, symbol = "D") +#' +#' # Get missing data patterns for each study separately +#' patterns_split <- ds.mdPattern(x = "D", type = "split", datasources = connections) +#' +#' # View results for study1 +#' print(patterns_split$study1$pattern) +#' # var1 var2 var3 +#' # 150 1 1 1 0 <- 150 obs complete +#' # 25 0 1 1 1 <- 25 obs missing var1 +#' # 25 0 0 25 <- Summary: 25 missing per variable +#' +#' # Get pooled missing data patterns across studies +#' patterns_pooled <- ds.mdPattern(x = "D", type = "combine", datasources = connections) +#' print(patterns_pooled$pattern) +#' +#' # Example with suppressed patterns: +#' # If study1 has a pattern with count=2 (suppressed) and study2 has same pattern +#' # with count=5 (valid), the pooled result will show count=5 (conservative approach) +#' # A warning will indicate: "Pooled counts may underestimate the true total" +#' +#' # Clear the Datashield R sessions and logout +#' datashield.logout(connections) +#' } +#' +ds.mdPattern <- function(x = NULL, type = 'split', datasources = NULL){ + + # Look for DS connections + if(is.null(datasources)){ + datasources <- datashield.connections_find() + } + + # Ensure datasources is a list of DSConnection-class + if(!(is.list(datasources) && all(unlist(lapply(datasources, function(d) {methods::is(d,"DSConnection")}))))){ + stop("The 'datasources' were expected to be a list of DSConnection-class objects", call.=FALSE) + } + + if(is.null(x)){ + stop("Please provide the name of a data frame or matrix!", call.=FALSE) + } + + # Get study names + study_names <- names(datasources) + + # Call the server side function + cally <- call("mdPatternDS", x) + results <- DSI::datashield.aggregate(datasources, cally) + + # Process results based on type + if(type == "split"){ + # Return individual study results + return(results) + + } else if(type == "combine"){ + # Pool results across studies + + # First check if any study has invalid patterns + any_invalid <- any(sapply(results, function(r) !r$valid)) + invalid_studies <- names(results)[sapply(results, function(r) !r$valid)] + + if(any_invalid){ + warning( + "Disclosure control: Some studies have suppressed patterns (below threshold).\n", + " Studies with suppressed patterns: ", paste(invalid_studies, collapse=", "), "\n", + " These patterns are EXCLUDED from pooling to prevent disclosure.\n", + " Pooled counts may underestimate the true total.", + call. = FALSE + ) + } + + # Extract patterns from each study + patterns_list <- lapply(results, function(r) r$pattern) + + # Check if all patterns have the same variables (columns) + n_vars <- sapply(patterns_list, ncol) + if(length(unique(n_vars)) > 1){ + stop("Cannot pool patterns: studies have different numbers of variables", call.=FALSE) + } + + var_names <- colnames(patterns_list[[1]]) + if(length(patterns_list) > 1){ + for(i in 2:length(patterns_list)){ + if(!identical(colnames(patterns_list[[i]]), var_names)){ + warning("Variable names differ across studies. Pooling by position.") + break + } + } + } + + # Pool the patterns + pooled_pattern <- .pool_md_patterns(patterns_list, study_names) + + # Check validity of pooled results + # Get threshold from first study's results or use a default check + nfilter.tab <- getOption("default.nfilter.tab") + if(is.null(nfilter.tab)) nfilter.tab <- 3 + + n_patterns <- nrow(pooled_pattern) - 1 + pooled_valid <- TRUE + + if(n_patterns > 0){ + # Pattern counts are in row names + pattern_counts <- as.numeric(rownames(pooled_pattern)[1:n_patterns]) + pattern_counts <- pattern_counts[!is.na(pattern_counts) & pattern_counts > 0] + + if(any(pattern_counts < nfilter.tab)){ + pooled_valid <- FALSE + } + } + + pooled_message <- ifelse(pooled_valid, + "Valid: all pooled pattern counts meet disclosure requirements", + "Some pooled pattern counts may be below threshold") + + return(list( + pattern = pooled_pattern, + valid = pooled_valid, + message = pooled_message, + studies = study_names + )) + + } else { + stop("Argument 'type' must be either 'split' or 'combine'", call.=FALSE) + } +} + +#' @title Pool missing data patterns across studies +#' @description Internal function to pool md.pattern results from multiple studies +#' @param patterns_list List of pattern matrices from each study +#' @param study_names Names of the studies +#' @return Pooled pattern matrix +#' @keywords internal +.pool_md_patterns <- function(patterns_list, study_names){ + + # Initialize with first study's pattern structure + pooled <- patterns_list[[1]] + n_vars <- ncol(pooled) + n_rows <- nrow(pooled) - 1 # Exclude summary row + + # Create a list to store unique patterns + unique_patterns <- list() + pattern_counts <- list() + + # Process each study + for(i in seq_along(patterns_list)){ + pattern <- patterns_list[[i]] + study_n_patterns <- nrow(pattern) - 1 + + if(study_n_patterns > 0){ + for(j in 1:study_n_patterns){ + # Get pattern (columns show 1/0 for observed/missing) + pat_vector <- pattern[j, 1:(n_vars-1)] + # Pattern count is in row name + pat_count_str <- rownames(pattern)[j] + pat_count <- suppressWarnings(as.numeric(pat_count_str)) + + # Skip if suppressed (non-numeric row name like "suppressed(<3)") + if(is.na(pat_count)){ + next + } + + # Convert pattern to string for comparison + pat_string <- paste(pat_vector, collapse="_") + + # Check if this pattern already exists + if(pat_string %in% names(unique_patterns)){ + # Add to existing count + pattern_counts[[pat_string]] <- pattern_counts[[pat_string]] + pat_count + } else { + # New pattern + unique_patterns[[pat_string]] <- pat_vector + pattern_counts[[pat_string]] <- pat_count + } + } + } + } + + # Build pooled pattern matrix + if(length(unique_patterns) == 0){ + # No valid patterns + pooled[1:n_rows, ] <- NA + } else { + # Sort patterns by count (descending) + sorted_idx <- order(unlist(pattern_counts), decreasing = TRUE) + sorted_patterns <- unique_patterns[sorted_idx] + sorted_counts <- pattern_counts[sorted_idx] + + # Create new pooled matrix + n_pooled_patterns <- length(sorted_patterns) + pooled <- matrix(NA, nrow = n_pooled_patterns + 1, ncol = n_vars) + colnames(pooled) <- colnames(patterns_list[[1]]) + + # Set row names (counts for patterns, empty for summary) + row_names <- c(as.character(unlist(sorted_counts)), "") + rownames(pooled) <- row_names + + # Fill in patterns + for(i in 1:n_pooled_patterns){ + pooled[i, 1:(n_vars-1)] <- sorted_patterns[[i]] + # Calculate number of missing for this pattern + pooled[i, n_vars] <- sum(sorted_patterns[[i]] == 0) + } + } + + # Calculate summary row (total missing per variable) + # Sum across studies + summary_row <- rep(0, n_vars) + for(i in seq_along(patterns_list)){ + study_summary <- patterns_list[[i]][nrow(patterns_list[[i]]), ] + # Only add if not suppressed + if(!all(is.na(study_summary))){ + summary_row <- summary_row + ifelse(is.na(study_summary), 0, study_summary) + } + } + + # Add summary row + pooled[nrow(pooled), ] <- summary_row + + return(pooled) +} + diff --git a/R/ds.ns.R b/R/ds.ns.R index 9c961fcf1..e98643d4d 100644 --- a/R/ds.ns.R +++ b/R/ds.ns.R @@ -8,7 +8,7 @@ #' sequence of interior knots, and the natural boundary conditions. These enforce the constraint #' that the function is linear beyond the boundary knots, which can either be supplied or default #' to the extremes of the data. -#' A primary use is in modeling formula to directly specify a natural spline term in a model. +#' A primary use is in modelling formula to directly specify a natural spline term in a model. #' @param x the predictor variable. Missing values are allowed. #' @param df degrees of freedom. One can supply df rather than knots; ns() then chooses #' df - 1 - intercept knots at suitably chosen quantiles of x (which will ignore missing values). diff --git a/R/ds.qlspline.R b/R/ds.qlspline.R index 45a3e2d33..9839d9843 100644 --- a/R/ds.qlspline.R +++ b/R/ds.qlspline.R @@ -18,7 +18,7 @@ #' intervals along x or a vector of numbers in (0; 1) specifying the quantiles explicitly. #' @param na.rm logical, whether NA should be removed when calculating quantiles, passed #' to na.rm of quantile. Default set to TRUE -#' @param marginal logical, how to parametrize the spline, see Details +#' @param marginal logical, how to parametrise the spline, see Details #' @param names character, vector of names for constructed variables #' @param newobj a character string that provides the name for the output #' variable that is stored on the data servers. Default \code{qlspline.newobj}. diff --git a/R/ds.rBinom.R b/R/ds.rBinom.R index 2f39f8b10..ec8b4f880 100644 --- a/R/ds.rBinom.R +++ b/R/ds.rBinom.R @@ -214,14 +214,14 @@ single.integer.seed<-c(single.integer.seed,seed.as.integer.study.specific) if(seed.as.text=="NULL"){ -cat("NO SEED SET IN STUDY",study.id,"\n\n") +message("NO SEED SET IN STUDY",study.id,"\n\n") } else { calltext <- paste0("setSeedDS(", seed.as.text, ")") ssDS.obj[[study.id]] <- DSI::datashield.aggregate(datasources[study.id], as.symbol(calltext)) } } -cat("\n\n") +message("\n\n") diff --git a/R/ds.rNorm.R b/R/ds.rNorm.R index 6100c8505..76d885f11 100644 --- a/R/ds.rNorm.R +++ b/R/ds.rNorm.R @@ -217,13 +217,13 @@ single.integer.seed<-c(single.integer.seed,seed.as.integer.study.specific) if(seed.as.text=="NULL"){ -cat("NO SEED SET IN STUDY",study.id,"\n\n") +message("NO SEED SET IN STUDY",study.id,"\n\n") } calltext <- paste0("setSeedDS(", seed.as.text, ")") ssDS.obj[[study.id]] <- DSI::datashield.aggregate(datasources[study.id], as.symbol(calltext)) } -cat("\n\n") +message("\n\n") diff --git a/R/ds.rPois.R b/R/ds.rPois.R index 2d2c7f019..74be7fdf7 100644 --- a/R/ds.rPois.R +++ b/R/ds.rPois.R @@ -190,13 +190,13 @@ single.integer.seed<-c(single.integer.seed,seed.as.integer.study.specific) if(seed.as.text=="NULL"){ -cat("NO SEED SET IN STUDY",study.id,"\n\n") +message("NO SEED SET IN STUDY",study.id,"\n\n") } calltext <- paste0("setSeedDS(", seed.as.text, ")") ssDS.obj[[study.id]] <- DSI::datashield.aggregate(datasources[study.id], as.symbol(calltext)) } -cat("\n\n") +message("\n\n") diff --git a/R/ds.rUnif.R b/R/ds.rUnif.R index d98fa28f0..ea74766b5 100644 --- a/R/ds.rUnif.R +++ b/R/ds.rUnif.R @@ -232,7 +232,7 @@ single.integer.seed<-c(single.integer.seed,seed.as.integer.study.specific) if(seed.as.text=="NULL"){ -cat("NO SEED SET IN STUDY",study.id,"\n") +message("NO SEED SET IN STUDY",study.id,"\n") } else { calltext <- paste0("setSeedDS(", seed.as.text, ")") diff --git a/R/ds.ranksSecure.R b/R/ds.ranksSecure.R index 5a3affcaf..8ffa6a971 100644 --- a/R/ds.ranksSecure.R +++ b/R/ds.ranksSecure.R @@ -1,7 +1,7 @@ # ds.ranksSecure #' @title Secure ranking of a vector across all sources #' @description Securely generate the ranks of a numeric vector and estimate -#' true qlobal quantiles across all data sources simultaneously +#' true global quantiles across all data sources simultaneously #' @details ds.ranksSecure is a clientside function which calls a series of #' other clientside and serverside functions to securely generate the global #' ranks of a numeric vector "V2BR" (vector to be ranked) @@ -43,7 +43,7 @@ #' of the clusters of values that are being ranked such that some values are #' treated as being missing and the processing stops, then setting #' generate.quantiles to FALSE allows the generation of ranks to complete so -#' they can then be used for non-parameteric analysis, even if the key values +#' they can then be used for non-parametric analysis, even if the key values #' cannot be estimated. A real example of an unusual configuration was in a #' reasonably large dataset of survival times, where a substantial proportion #' of survival profiles were censored at precisely 10 years. This meant that @@ -228,7 +228,7 @@ ds.ranksSecure <- function(input.var.name=NULL, quantiles.for.estimation="0.05-0 } if(monitor.progress){ -cat("\n\nStep 1 of 8 complete: +message("\n\nStep 1 of 8 complete: Cleaned up residual output from previous runs of ds.ranksSecure @@ -272,7 +272,7 @@ cat("\n\nStep 1 of 8 complete: dsBaseClient::ds.dmtC2S(dfdata=input.mean.sd.df,newobj="input.mean.sd.df") if(monitor.progress){ -cat("\n\nStep 2 of 8 complete: +message("\n\nStep 2 of 8 complete: Estimated mean and sd of v2br to standardise initial values @@ -308,7 +308,7 @@ cat("\n\nStep 2 of 8 complete: dsBaseClient::ds.dmtC2S(dfdata=min.max.df,newobj="min.max.df") if(monitor.progress){ -cat("\n\nStep 3 of 8 complete: +message("\n\nStep 3 of 8 complete: Generated ultra max and ultra min values to allocate to missing values if is NA.hi or NA.low @@ -316,9 +316,6 @@ cat("\n\nStep 3 of 8 complete: ") } -print(input.mean.sd.df) - - #CALL THE FIRST SERVER SIDE FUNCTION (ASSIGN) #WRITES ENCRYPTED DATA TO SERVERSIDE OBJECT "blackbox.output.df" calltext1 <- call("blackBoxDS", input.var.name=input.var.name, @@ -328,7 +325,7 @@ print(input.mean.sd.df) DSI::datashield.assign(datasources, "blackbox.output.df", calltext1) if(monitor.progress){ -cat("\n\nStep 4 of 8 complete: +message("\n\nStep 4 of 8 complete: Pseudo data synthesised,first set of rank-consistent transformations complete and blackbox.output.df created @@ -390,7 +387,7 @@ cat("\n\nStep 4 of 8 complete: ds.make("sR5.df$global.rank","testvar.ranks") if(monitor.progress){ -cat("\n\nStep 5 of 8 complete: + message("\n\nStep 5 of 8 complete: Global ranks generated and pseudodata stripped out. Now ready to proceed to transformation of global ranks @@ -445,7 +442,7 @@ cat("\n\nStep 5 of 8 complete: DSI::datashield.assign(datasources, "blackbox.ranks.df", calltext4) if(monitor.progress){ -cat("\n\nStep 6 of 8 complete: + message("\n\nStep 6 of 8 complete: Rank-consistent transformations of global ranks complete and blackbox.ranks.df created @@ -510,7 +507,7 @@ cat("\n\nStep 6 of 8 complete: DSI::datashield.assign(datasources,summary.output.ranks.df, calltext7) if(monitor.progress){ -cat("\n\nStep 7 of 8 complete: + message("\n\nStep 7 of 8 complete: Final global ranking of values in v2br complete and written to each serverside as appropriate @@ -544,7 +541,7 @@ cat("\n\nStep 7 of 8 complete: } if(monitor.progress && rm.residual.objects){ -cat("\n\nStep 8 of 8 complete: + message("\n\nStep 8 of 8 complete: Cleaned up residual output from running ds.ranksSecure @@ -552,7 +549,7 @@ cat("\n\nStep 8 of 8 complete: } if(monitor.progress && !rm.residual.objects){ - cat("\n\nStep 8 of 8 complete: + message("\n\nStep 8 of 8 complete: Residual output from running ds.ranksSecure NOT deleted @@ -562,14 +559,14 @@ cat("\n\nStep 8 of 8 complete: if(!generate.quantiles){ - cat("\n\n\n"," FINAL RANKING PROCEDURES COMPLETE: + message("\n\n\n"," FINAL RANKING PROCEDURES COMPLETE: PRIMARY RANKING OUTPUT IS IN DATA FRAME",summary.output.ranks.df, " WHICH IS SORTED BY",ranks.sort.by," AND HAS BEEN WRITTEN TO THE SERVERSIDE\n\n\n\n") info.message<-"As the argument was set to FALSE no quantiles have been estimated.Please set argument to TRUE if you want to estimate quantiles such as median, quartiles and 90th percentile" - cat("\n\n",info.message,"\n\n") + message("\n\n",info.message,"\n\n") return(info.message) } diff --git a/R/ds.rbind.R b/R/ds.rbind.R index 47e9165c2..d0aca96a8 100644 --- a/R/ds.rbind.R +++ b/R/ds.rbind.R @@ -133,7 +133,7 @@ calltext1<-call('classDS', testclass.var) next.class <- DSI::datashield.aggregate(datasources, calltext1) class.vector<-c(class.vector,next.class[[1]]) if (notify.of.progress) - cat("\n",j," of ", length(x), " elements to combine in step 1 of 2\n") + message("\n",j," of ", length(x), " elements to combine in step 1 of 2\n") } for(j in 1:length(x)) @@ -144,7 +144,7 @@ if(class.vector[j]!="data.frame" && class.vector[j]!="matrix") { colname.vector<-c(colname.vector,test.df) if (notify.of.progress) - cat("\n",j," of ", length(x), " elements to combine in step 2 of 2\n") + message("\n",j," of ", length(x), " elements to combine in step 2 of 2\n") } else { @@ -152,11 +152,11 @@ else df.names <- DSI::datashield.aggregate(datasources, calltext2) colname.vector<-c(colname.vector,df.names[[1]]) if (notify.of.progress) - cat("\n",j," of ", length(x), " elements to combine in step 2 of 2\n") + message("\n",j," of ", length(x), " elements to combine in step 2 of 2\n") } } if (notify.of.progress) - cat("\nBoth steps completed\n") + message("\nBoth steps completed\n") #CHECK FOR DUPLICATE NAMES IN COLUMN NAME VECTOR AND ADD ".k" TO THE kth REPLICATE num.duplicates<-rep(0,length(colname.vector)) diff --git a/R/ds.recodeValues.R b/R/ds.recodeValues.R index d44cc8570..184ccea2b 100644 --- a/R/ds.recodeValues.R +++ b/R/ds.recodeValues.R @@ -4,7 +4,7 @@ #' @details This function recodes individual values with new individual values. This can #' apply to numeric and character values, factor levels and NAs. One particular use of #' \code{ds.recodeValues} is to convert NAs to an explicit value. This value is specified -#' in the argument \code{missing}. If tthe user want to recode only missing values, then it +#' in the argument \code{missing}. If the user want to recode only missing values, then it #' should also specify an identical vector of values in both arguments \code{values2replace.vector} #' and \code{new.values.vector} (see Example 2 below). #' Server function called: \code{recodeValuesDS} diff --git a/R/ds.rep.R b/R/ds.rep.R index 2d2ce9515..2f3e03010 100644 --- a/R/ds.rep.R +++ b/R/ds.rep.R @@ -151,7 +151,7 @@ if(source.each=='s')source.each<-'serverside' #Check that source has been specified if(source.x1!="serverside"&&source.x1!="clientside") { - cat(" FAILED: if source.x1 is non-null it must be specified as + message(" FAILED: if source.x1 is non-null it must be specified as one of the following: 'clientside','serverside','c', or 's'\n\n") return('Please respecify') } @@ -174,7 +174,7 @@ if(source.each=='s')source.each<-'serverside' #Check that source has been specified if(source.times!="serverside"&&source.times!="clientside"&&!is.null(source.times)) { - cat(" FAILED: if source.times is non-null it must be specified as + message(" FAILED: if source.times is non-null it must be specified as one of the following: 'clientside','serverside','c', or 's'\n\n") return('Please respecify') } @@ -208,7 +208,7 @@ if(source.each=='s')source.each<-'serverside' #Check that source has been specified if(source.length.out!="serverside"&&source.length.out!="clientside"&&!is.null(source.length.out)) { - cat(" FAILED: if source.length.out is non-null it must be specified as + message(" FAILED: if source.length.out is non-null it must be specified as one of the following: 'clientside','serverside','c', or 's'\n\n") return('Please respecify') } @@ -243,7 +243,7 @@ if(source.each=='s')source.each<-'serverside' #Check that source has been specified if(source.each!="serverside"&&source.each!="clientside"&&!is.null(source.each)) { - cat(" FAILED: if source.each is non-null it must be specified as + message(" FAILED: if source.each is non-null it must be specified as one of the following: 'clientside','serverside','c', or 's'\n\n") return('Please respecify') } diff --git a/R/ds.sample.R b/R/ds.sample.R index d3b5e0b95..a5c37498b 100644 --- a/R/ds.sample.R +++ b/R/ds.sample.R @@ -45,7 +45,7 @@ #' case with the default name 'newobj.sample) using ds.dataFrameSort with the #' 'sampling.order' vector as the sort key, the output object is rendered #' equivalent to PRWa but with the rows randomly permuted (so the column reflecting -#' the vector 'sample.order' now runs from 1:length of obejct, while the +#' the vector 'sample.order' now runs from 1:length of object, while the #' column reflecting 'ID.seq' denoting the original order is now randomly ordered. #' If you need to return to the original order you can simply us ds.dataFrameSort #' again using the column reflecting 'ID.seq' as the sort key: @@ -201,18 +201,18 @@ single.integer.seed<-c(single.integer.seed,seed.as.integer.study.specific) if(seed.as.text=="NULL"){ if (notify.of.progress) - cat("NO SEED SET IN STUDY",study.id,"\n\n") + message("NO SEED SET IN STUDY",study.id,"\n\n") } calltext <- paste0("setSeedDS(", seed.as.text, ")") if (notify.of.progress) - print(calltext) + message(calltext) ssDS.obj[[study.id]] <- DSI::datashield.aggregate(datasources[study.id], as.symbol(calltext)) } if (notify.of.progress) - cat("\n\n") + message("\n\n") diff --git a/R/ds.scatterPlot.R b/R/ds.scatterPlot.R index 827b32722..55804b3b0 100644 --- a/R/ds.scatterPlot.R +++ b/R/ds.scatterPlot.R @@ -6,7 +6,7 @@ #' permitted in DataSHIELD, this function allows the user to plot non-disclosive scatter plots. #' #' If the argument \code{method} is set to \code{'deterministic'}, the server-side function searches -#' for the \code{k-1} nearest neighbors of each single data point and calculates the centroid +#' for the \code{k-1} nearest neighbours of each single data point and calculates the centroid #' of such \code{k} points. #' The proximity is defined by the minimum Euclidean distances of z-score transformed data. #' @@ -52,7 +52,7 @@ #' This argument can be set as \code{'deteministic'} or \code{'probabilistic'}. #' Default \code{'deteministic'}. #' For more information see \strong{Details}. -#' @param k the number of the nearest neighbors for which their centroid is calculated. +#' @param k the number of the nearest neighbours for which their centroid is calculated. #' Default 3. #' For more information see \strong{Details}. #' @param noise the percentage of the initial variance that is used as the variance of the embedded @@ -147,6 +147,10 @@ ds.scatterPlot <- function(x=NULL, y=NULL, method='deterministic', k=3, noise=0. stop("The 'datasources' were expected to be a list of DSConnection-class objects", call.=FALSE) } + # Save par and setup reseting of par values + old_par <- graphics::par(no.readonly = TRUE) + on.exit(graphics::par(old_par), add = TRUE) + # check if the input objects are defined in all the studies isDefined(datasources, x) isDefined(datasources, y) diff --git a/R/ds.sqrt.R b/R/ds.sqrt.R index 9193dbbc7..e78011def 100644 --- a/R/ds.sqrt.R +++ b/R/ds.sqrt.R @@ -59,7 +59,7 @@ #' # and get their square roots #' ds.make(toAssign='rep((1:10)^2, times=10)', newobj='squares.vector', datasources=connections) #' ds.sqrt(x='squares.vector', newobj='sqrt.vector', datasources=connections) -#' # check the behavior of that operation by comparing the tables of squares.vector and sqrt.vector + # check the behaviour of that operation by comparing the tables of squares.vector and sqrt.vector #' ds.table(rvar='squares.vector')$output.list$TABLE_rvar.by.study_counts #' ds.table(rvar='sqrt.vector')$output.list$TABLE_rvar.by.study_counts #' diff --git a/R/ds.subset.R b/R/ds.subset.R new file mode 100644 index 000000000..03b2e7344 --- /dev/null +++ b/R/ds.subset.R @@ -0,0 +1,171 @@ +#' +#' @title Generates a valid subset of a table or a vector +#' @description The function uses the R classical subsetting with squared brackets '[]' and allows also to +#' subset using a logical operator and a threshold. The object to subset from must be a vector (factor, numeric +#' or character) or a table (data.frame or matrix). +#' @details (1) If the input data is a table the user specifies the rows and/or columns to include in the subset; the columns can be +#' referred to by their names. Table subsetting can also be done using the name of a variable and a threshold (see example 3). +#' (2) If the input data is a vector and the parameters 'rows', 'logical' and 'threshold' are all provided the last two are ignored +#' (i.e. 'rows' has precedence over the other two parameters then). +#' IMPORTANT NOTE: If the requested subset is not valid (i.e. contains less than the allowed number of observations) all the values are +#' turned into missing values (NA). Hence an invalid subset is indicated by the fact that all values within it are set to NA. +#' @param subset the name of the output object, a list that holds the subset object. If set to NULL +#' the default name of this list is 'subsetObject' +#' @param x a character, the name of the dataframe or the factor vector and the range of the subset. +#' @param completeCases a character that tells if only complete cases should be included or not. +#' @param rows a vector of integers, the indices of the rows to extract. +#' @param cols a vector of integers or a vector of characters; the indices of the columns to extract or their names. +#' @param logicalOperator a boolean, the logical parameter to use if the user wishes to subset a vector using a logical +#' operator. This parameter is ignored if the input data is not a vector. +#' @param threshold a numeric, the threshold to use in conjunction with the logical parameter. This parameter is ignored +#' if the input data is not a vector. +#' @param datasources a list of \code{\link[DSI]{DSConnection-class}} objects obtained after login. If the +#' the default set of connections will be used: see \link[DSI]{datashield.connections_default}. +#' @return no data are return to the user, the generated subset dataframe is stored on the server side. +#' @author Gaye, A. +#' @seealso \link{ds.subsetByClass} to subset by the classes of factor vector(s). +#' @seealso \link{ds.meanByClass} to compute mean and standard deviation across categories of a factor vectors. +#' @export +#' @examples +#' \dontrun{ +#' +#' # load the login data +#' data(logindata) +#' +#' # login and assign some variables to R +#' myvar <- list("DIS_DIAB","PM_BMI_CONTINUOUS","LAB_HDL", "GENDER") +#' conns <- datashield.login(logins=logindata,assign=TRUE,variables=myvar) +#' +#' # Example 1: generate a subset of the assigned dataframe (by default the table is named 'D') +#' # with complete cases only +#' ds.subset(x='D', subset='subD1', completeCases=TRUE) +#' # display the dimensions of the initial table ('D') and those of the subset table ('subD1') +#' ds.dim('D') +#' ds.dim('subD1') +#' +#' # Example 2: generate a subset of the assigned table (by default the table is named 'D') +#' # with only the variables +#' # DIS_DIAB' and'PM_BMI_CONTINUOUS' specified by their name. +#' ds.subset(x='D', subset='subD2', cols=c('DIS_DIAB','PM_BMI_CONTINUOUS')) +#' +#' # Example 3: generate a subset of the table D with bmi values greater than or equal to 25. +#' ds.subset(x='D', subset='subD3', logicalOperator='PM_BMI_CONTINUOUS>=', threshold=25) +#' +#' # Example 4: get the variable 'PM_BMI_CONTINUOUS' from the dataframe 'D' and generate a +#' # subset bmi +#' # vector with bmi values greater than or equal to 25 +#' ds.assign(toAssign='D$PM_BMI_CONTINUOUS', newobj='BMI') +#' ds.subset(x='BMI', subset='BMI25plus', logicalOperator='>=', threshold=25) +#' +#' # Example 5: subsetting by rows: +#' # get the logarithmic values of the variable 'lab_hdl' and generate a subset with +#' # the first 50 observations of that new vector. If the specified number of row is +#' # greater than the total +#' # number of rows in any of the studies the process will stop. +#' ds.assign(toAssign='log(D$LAB_HDL)', newobj='logHDL') +#' ds.subset(x='logHDL', subset='subLAB_HDL', rows=c(1:50)) +#' # now get a subset of the table 'D' with just the 100 first observations +#' ds.subset(x='D', subset='subD5', rows=c(1:100)) +#' +#' # clear the Datashield R sessions and logout +#' datashield.logout(conns) +#' +#' } +#' +ds.subset <- function(x=NULL, subset="subsetObject", completeCases=FALSE, rows=NULL, cols=NULL, logicalOperator=NULL, threshold=NULL, datasources=NULL){ + .Deprecated("ds.dataFrameSubset") + + # look for DS connections + if(is.null(datasources)){ + datasources <- datashield.connections_find() + } + + # ensure datasources is a list of DSConnection-class + if(!(is.list(datasources) && all(unlist(lapply(datasources, function(d) {methods::is(d,"DSConnection")}))))){ + stop("The 'datasources' were expected to be a list of DSConnection-class objects", call.=FALSE) + } + + if(is.null(x)){ + stop("Please provide the name of the object to subset from!", call.=FALSE) + } + + # check if the input x is defined in all the studies + defined <- isDefined(datasources, x) + + # call the internal function that checks the input object is of the same class in all studies. + typ <- checkClass(datasources, x) + + # the input object must be a dataframe or a vector + if(!('data.frame' %in% typ) & !('character' %in% typ) & !('factor' %in% typ) & !('integer' %in% typ) & !('logical' %in% typ) & !('numeric' %in% typ)){ + stop("The object to subset from must be a 'data.frame', a 'character', factor', a 'logical' or a 'numeric' vector.", call.=FALSE) + } + + # the argument 'rows' and 'cols' have precedence over 'logicalOperator' and 'threshold' + if(is.null(rows) & is.null(cols)){ + if(is.null(logicalOperator) | is.null(threshold)){ + if(!completeCases){ + stop("No subset parameters provided, the sought subset is the same as the original object!", call.=FALSE) + }else{ + cally <- call('subsetDS', x, completeCases) + DSI::datashield.assign(datasources, subset, cally) + } + }else{ + # allow this only for numeric vectors + if(("factor" %in% typ) | ("character" %in% typ)){ + stop(" Subsetting on a threshold criteria is allowed only for numeric vectors!", call.=FALSE) + } + # get the logicalOperator operator and any variable provided with it + lg <- unlist(strsplit(logicalOperator, split="")) + var2sub <- NULL + if(lg[length(lg)] == "=" & lg[(length(lg)-1)] == ">" | lg[(length(lg)-1)] == "<" | lg[(length(lg)-1)] == "=" | lg[(length(lg)-1)] == "!"){ + logicalOperator <- paste0(lg[(length(lg)-1)], lg[length(lg)]) + if(length(lg) > 2){ var2sub <- paste(lg[1:(length(lg)-2)], collapse="") } + }else{ + logicalOperator <- lg[length(lg)] + if(length(lg) > 1) { var2sub <- paste0(lg[1:(length(lg)-1)], collapse="") } + } + + # turn the logicalOperator operator into the corresponding integer that will be evaluated on the server side. + logicalOperator <- logical2int(logicalOperator) + cally <- call('subsetDS', x, completeCases, rows, cols, logicalOperator, threshold, var2sub) + DSI::datashield.assign(datasources, subset, cally) + } + }else{ + + # check if the sought subset is not larger than the vector or the table size + # if not call the server side function and carry out the subsetting + if(("factor" %in% typ) | ("numeric" %in% typ) | ("character" %in% typ)){ + # if the size of the requested subset is greater than that of original set the rows or cols to NULL + # these will then be set to the maximum size in the server side + if(!(is.null(rows))){ + ll <- DSI::datashield.aggregate(datasources, call("lengthDS", x)) + for(i in 1:length(datasources)){ + if(length(rows) > ll[[i]]){ + rows <- NULL + } + } + } + # turn the vector of row indices into a character to pass the parser + for(i in 1:length(datasources)){ + cally <- call('subsetDS', x, completeCases, rows) + DSI::datashield.assign(datasources[i], subset, cally) + } + }else{ + if(("data.frame" %in% typ) | ("matrix" %in% typ)){ + # call the internal function that ensure wrong size subset is not requested (i.e. subset size > original table) + for(i in 1:length(datasources)){ + check00 <- subsetHelper(datasources[i], x, rows, cols) + if(check00[1] == 1){ rows <- NULL } + if(check00[2] == 1){ cols <- NULL } + } + for(i in 1:length(datasources)){ + cally <- call('subsetDS', x, completeCases, rows, cols) + DSI::datashield.assign(datasources[i], subset, cally) + } + }else{ + stop("The object to subset from must be a numeric, character or factor vector or a table structure (matrix or data.frame).", call.=FALSE) + } + } + } + +} diff --git a/R/ds.subsetByClass.R b/R/ds.subsetByClass.R new file mode 100644 index 000000000..b3b14ec27 --- /dev/null +++ b/R/ds.subsetByClass.R @@ -0,0 +1,121 @@ +#' +#' @title Generates valid subset(s) of a data frame or a factor +#' @description The function takes a categorical variable or a data frame as input and generates +#' subset(s) variables or data frames for each category. +#' @details If the input data object is a data frame it is possible to specify the variables +#' to subset on. If a subset is not 'valid' all its the values are reported as missing (i.e. NA), +#' the name of the subsets is labelled with the suffix '_INVALID'. Subsets are considered invalid if +#' the number of observations it holds are between 1 and the threshold allowed by the data owner. if +#' a subset is empty (i.e. no entries) the name of the subset is labelled with the suffix '_EMPTY'. +#' @param x a character, the name of the dataframe or the vector to generate subsets from. +#' @param variables a vector of string characters, the name(s) of the variables to subset by. +#' @param subsets the name of the output object, a list that holds the subset objects. If set to NULL +#' the default name of this list is 'subClasses'. +#' @param datasources a list of \code{\link[DSI]{DSConnection-class}} objects obtained after login. If the +#' the default set of connections will be used: see \link[DSI]{datashield.connections_default}. +#' @return a no data are return to the user but messages are printed out. +#' @author Gaye, A. +#' @seealso \link{ds.meanByClass} to compute mean and standard deviation across categories of a factor vectors. +#' @seealso \link{ds.subset} to subset by complete cases (i.e. removing missing values), threshold, columns and rows. +#' @export +#' @examples +#' \dontrun{ +#' +#' # load the login data +#' data(logindata) +#' +#' # login and assign some variables to R +#' myvar <- list('DIS_DIAB','PM_BMI_CONTINUOUS','LAB_HDL', 'GENDER') +#' conns <- datashield.login(logins=logindata,assign=TRUE,variables=myvar) +#' +#' # Example 1: generate all possible subsets from the table assigned above (one subset table +#' # for each class in each factor) +#' ds.subsetByClass(x='D', subsets='subclasses') +#' # display the names of the subset tables that were generated in each study +#' ds.names('subclasses') +#' +#' # Example 2: subset the table initially assigned by the variable 'GENDER' +#' ds.subsetByClass(x='D', subsets='subtables', variables='GENDER') +#' # display the names of the subset tables that were generated in each study +#' ds.names('subtables') +#' +#' # Example 3: generate a new variable 'gender' and split it into two vectors: males +#' # and females +#' ds.assign(toAssign='D$GENDER', newobj='gender') +#' ds.subsetByClass(x='gender', subsets='subvectors') +#' # display the names of the subset vectors that were generated in each study +#' ds.names('subvectors') +#' +#' # clear the Datashield R sessions and logout +#' datashield.logout(conns) +#' +#' } +#' +ds.subsetByClass <- function(x=NULL, subsets="subClasses", variables=NULL, datasources=NULL){ + .Deprecated("ds.dataFrameSubset") + + # look for DS connections + if(is.null(datasources)){ + datasources <- datashield.connections_find() + } + + # ensure datasources is a list of DSConnection-class + if(!(is.list(datasources) && all(unlist(lapply(datasources, function(d) {methods::is(d,"DSConnection")}))))){ + stop("The 'datasources' were expected to be a list of DSConnection-class objects", call.=FALSE) + } + + if(is.null(x)){ + stop("Please provide the name of the input data frame or factor!", call.=FALSE) + } + + # check if the input x is defined in all the studies + defined <- isDefined(datasources, x) + + # call the internal function that checks the input object is of the same class in all studies. + typ <- checkClass(datasources, x) + + # the input object must be a dataframe or a factor + if(!('data.frame' %in% typ) & !('factor' %in% typ)){ + message(paste0(x, " is of type ", typ, "!")) + stop("The object to subset from must be a 'data.frame' or a 'factor'.", call.=FALSE) + } + + # number of studies and their names + numsources <- length(datasources) + stdnames <- names(datasources) + + # check that, for each study, all the columns of the input table are of 'numeric' type + if(typ == 'data.frame'){ + dtname <- x + for(i in 1:numsources){ + cols <- DSI::datashield.aggregate(datasources[i], call("colnamesDS", x)) + dims <- DSI::datashield.aggregate(datasources[i], call("dimDS", x)) + tracker <-c() + for(j in 1:dims[[1]][2]){ + cally <- call("classDS", paste0(dtname, "$", cols[[1]][j])) + res <- DSI::datashield.aggregate(datasources[i], cally) + if(res[[1]] != 'factor'){ + tracker <- append(tracker, 0) + }else{ + tracker <- append(tracker, 1) + } + } + if(sum(tracker) == 0){ + stop("No factor variable found in data frame ", dtname, " in ", stdnames[i], ".", call.=FALSE) + } + } + } + + # call the server side function that does the job + # get the indices of the columns referred to by their names in the arguments + if(is.null(variables)){ + cally <- paste0("subsetByClassDS('", x, "')") + }else{ + cally <- paste0("subsetByClassDS('", x, "', c('",paste(variables,collapse="','"),"'))") + } + DSI::datashield.assign(datasources, subsets, as.symbol(cally)) + + # check that the new object has been created and display a message accordingly + finalcheck <- isAssigned(datasources, subsets) + +} diff --git a/R/ds.table.R b/R/ds.table.R index 780f9f862..e1238e2a5 100644 --- a/R/ds.table.R +++ b/R/ds.table.R @@ -424,10 +424,10 @@ if(num.valid.studies==0) if ((! table.assign) || report.chisq.tests) { validity.message<-"All studies failed for reasons identified below" - cat("\n",validity.message,"\n\n") + message("\n",validity.message,"\n\n") for(ns in 1:numsources.orig) { - cat("\nStudy",ns,": ",error.messages[[ns]],"\n") + message("\nStudy",ns,": ",error.messages[[ns]],"\n") } return(list(validity.message=validity.message,error.messages=error.messages)) @@ -476,12 +476,12 @@ for(ns in 1:numsources.orig) validity.message<-c(validity.message,message.add) } -# cat("\n",validity.message,"\n") +# message("\n",validity.message,"\n") # for(ns in 1:numsources.orig) # { -# cat("\nStudy",ns,": ",error.messages[[ns]]) +# message("\nStudy",ns,": ",error.messages[[ns]]) # } -# cat("\n\n") +# message("\n\n") #table.out<-table.out.valid #numsources<-length(table.out) @@ -492,12 +492,12 @@ if(num.valid.studies==numsources.orig) validity.message<-"Data in all studies were valid" if (! table.assign) { - cat("\n",validity.message,"\n") + message("\n",validity.message,"\n") for(ns in 1:numsources.orig) { - cat("\nStudy",ns,": ",error.messages[[ns]]) + message("\nStudy",ns,": ",error.messages[[ns]]) } - cat("\n\n") + message("\n\n") } } @@ -520,7 +520,6 @@ if(numsources>1) { all.dims.same<-FALSE return.message<-"Warning: tables in different sources have different numbers of dimensions. Please analyse and combine yourself from study.specific tables above" - print(return.message) return(return.message) } } @@ -649,7 +648,7 @@ cells.so.far<-0 table.current.study<-cbind(rvar.mark,cvar.mark,stvar.mark,count.in.cell) table.current.study[is.na(table.current.study)]<-"NA" -#cat("current study =",ns) +#message("current study =",ns) #print(table.current.study) @@ -738,7 +737,7 @@ for(oo in 1:length(table.current.study[,1])) if(d1.a!=d1||d2.a!=d2||d3.a!=d3) { return.message= "Dimensions of tables not behaving sensibly across studies.Please check the data in each study and calculate counts and percentages, yourself, using the counts from the individual studies" - cat(return.message) + message(return.message) return(return.message) } @@ -875,7 +874,7 @@ cells.so.far<-0 table.current.study<-cbind(rvar.mark,cvar.mark,count.in.cell) table.current.study[is.na(table.current.study)]<-"NA" -#cat("current study =",ns) +#message("current study =",ns) #print(table.current.study) @@ -959,7 +958,7 @@ for(oo in 1:length(table.current.study[,1])) if(d1.a!=d1||d2.a!=d2) { return.message= "Dimensions of tables not behaving sensibly across studies.Please check the data in each study and calculate counts and percentages, yourself, using the counts from the individual studies" - cat(return.message) + message(return.message) return(return.message) } @@ -1082,7 +1081,7 @@ cells.so.far<-0 table.current.study<-cbind(rvar.mark,count.in.cell) table.current.study[is.na(table.current.study)]<-"NA" -#cat("current study =",ns) +#message("current study =",ns) #print(table.current.study) @@ -1153,7 +1152,7 @@ for(oo in 1:length(table.current.study[,1])) if(d1.a!=d1) { return.message= "Dimensions of tables not behaving sensibly across studies.Please check the data in each study and calculate counts and percentages, yourself, using the counts from the individual studies" - cat(return.message) + message(return.message) return(return.message) } diff --git a/R/ds.table1D.R b/R/ds.table1D.R index 07df60eb3..8a13afdc7 100644 --- a/R/ds.table1D.R +++ b/R/ds.table1D.R @@ -10,10 +10,10 @@ #' count. This way it is possible the know the total count and combine total counts across data sources but it #' is not possible to identify the cell(s) that had the small counts which render the table invalid. #' @param x a character, the name of a numerical vector with discrete values - usually a factor. -#' @param type a character which represent the type of table to ouput: pooled table or one table for each +#' @param type a character which represent the type of table to output: pooled table or one table for each #' data source. If \code{type} is set to 'combine', a pooled 1-dimensional table is returned; if If \code{type} #' is set to 'split' a 1-dimensional table is returned for each data source. -#' @param warningMessage a boolean, if set to TRUE (deafult) a warning is displayed if any returned table is invalid. Warning +#' @param warningMessage a boolean, if set to TRUE (default) a warning is displayed if any returned table is invalid. Warning #' messages are suppressed if this parameter is set to FALSE. However the analyst can still view 'validity' information #' which are stored in the output object 'validity' - see the list of output objects. #' @param datasources a list of \code{\link[DSI]{DSConnection-class}} objects obtained after login. If the diff --git a/R/ds.table2D.R b/R/ds.table2D.R index 301a89936..0dee00abd 100644 --- a/R/ds.table2D.R +++ b/R/ds.table2D.R @@ -10,11 +10,11 @@ #' identify the cell(s) that had the small counts which render the table invalid. #' @param x a character, the name of a numerical vector with discrete values - usually a factor. #' @param y a character, the name of a numerical vector with discrete values - usually a factor. -#' @param type a character which represent the type of table to ouput: pooled table or one table for each +#' @param type a character which represent the type of table to output: pooled table or one table for each #' data source or both. If \code{type} is set to 'combine', a pooled 2-dimensional table is returned; If \code{type} #' is set to 'split' a 2-dimensional table is returned for each data source. If \code{type} is set to 'both' (default) #' a pooled 2-dimensional table plus a 2-dimensional table for each data source are returned. -#' @param warningMessage a boolean, if set to TRUE (deafult) a warning is displayed if any returned table is invalid. Warning +#' @param warningMessage a boolean, if set to TRUE (default) a warning is displayed if any returned table is invalid. Warning #' messages are suppressed if this parameter is set to FALSE. However the analyst can still view 'validity' information #' which are stored in the output object 'validity' - see the list of output objects. #' @param datasources a list of \code{\link[DSI]{DSConnection-class}} objects obtained after login. If the diff --git a/R/ds.unique.R b/R/ds.unique.R index 327585bd2..8f2717054 100644 --- a/R/ds.unique.R +++ b/R/ds.unique.R @@ -4,7 +4,7 @@ #' @details Will create a vector or list which has no duplicate values. #' #' Server function called: \code{uniqueDS} -#' @param x.name a character string providing the name of the varable, in the server, to perform \code{unique} upon +#' @param x.name a character string providing the name of the variable, in the server, to perform \code{unique} upon #' @param newobj a character string that provides the name for the output object #' that is stored on the data servers. Default \code{unique.newobj}. #' @param datasources a list of \code{\link[DSI]{DSConnection-class}} diff --git a/R/ds.vectorCalc.R b/R/ds.vectorCalc.R index f019c7bca..f8918aab4 100644 --- a/R/ds.vectorCalc.R +++ b/R/ds.vectorCalc.R @@ -3,10 +3,10 @@ #' @description Carries out a row-wise operation on two or more vector. The function calls no #' server side function; it uses the R operation symbols built in DataSHIELD. #' @details In DataSHIELD it is possible to perform an operation on vectors by just using the relevant -#' R symbols (e.g. '+' for addtion, '*' for multiplication, '-' for substraction and '/' for division). +#' R symbols (e.g. '+' for addition, '*' for multiplication, '-' for subtraction and '/' for division). #' This might however be inconvenient if the number of vectors to include in the operation is large. #' This function takes the names of two or more vectors and performs the desired operation which could be -#' an addition, a multiplication, a substraction or a division. If one or more vectors have a missing value +#' an addition, a multiplication, a subtraction or a division. If one or more vectors have a missing value #' at any one entry (i.e. observation), the operation returns a missing value ('NA') for that entry; the output #' vectors has, hence the same length as the input vectors. #' @param x a vector of characters, the names of the vectors to include in the operation. diff --git a/R/glmChecks.R b/R/glmChecks.R index c720fa45f..6dcfe2ee7 100644 --- a/R/glmChecks.R +++ b/R/glmChecks.R @@ -1,14 +1,14 @@ #' #' @title Checks if the elements in the glm model have the right characteristics #' @description This is an internal function required by the client function \code{ds.glm} -#' to verify all the variables and ensure the process does not halt inadvertanly. +#' to verify all the variables and ensure the process does not halt inadvertently #' @details the variables are checked to ensure they are defined, not empty (i.e. are not missing -#' at complete) and evantually (if 'offset' or 'weights') are of 'numeric' with non negative value +#' at complete) and eventually (if 'offset' or 'weights') are of 'numeric' with non negative value #' (if 'weights'). #' @param formula a character, a regression formula given as a string character #' @param data a character, the name of an optional data frame containing the variables in #' in the \code{formula}. -#' @param offset null or a numreric vector that can be used to specify an a priori known component to be +#' @param offset null or a numeric vector that can be used to specify an a priori known component to be #' included in the linear predictor during fitting. #' @param weights a character, the name of an optional vector of 'prior weights' to be used in the fitting #' process. Should be NULL or a numeric vector. diff --git a/R/logical2int.R b/R/logical2int.R new file mode 100644 index 000000000..575960c41 --- /dev/null +++ b/R/logical2int.R @@ -0,0 +1,19 @@ +#' +#' @title Turns a logical operator into an integer +#' @description This is an internal function. +#' @details This function is called to turn a logical operator given as a +#' character into an integer: '>' is turned into 1, '>=' into 2, '<' into 3, +#' '<=' into 4, '==' into 5 and '!=' into 6. +#' @param obj a character, the logical parameter to turn into an integer +#' @keywords internal +#' @return an integer +#' +logical2int <- function(obj=NULL){ + if(obj == ">"){ objout <- 1} + if(obj == ">="){ objout <- 2} + if(obj == "<"){ objout <- 3} + if(obj == "<="){ objout <- 4} + if(obj == "=="){ objout <- 5} + if(obj == "!="){ objout <- 6} + return (objout) +} \ No newline at end of file diff --git a/R/meanByClassHelper0a.R b/R/meanByClassHelper0a.R index 21c6e90ca..c1c51c9b6 100644 --- a/R/meanByClassHelper0a.R +++ b/R/meanByClassHelper0a.R @@ -7,7 +7,7 @@ #' @param b a character, the name of a factor vector. #' @param type a character which represents the type of analysis to carry out. If \code{type} is set to #' 'combine', a pooled table of results is generated. If \code{type} is set to 'split', a table of results -#' is genrated for each study. +#' is generated for each study. #' @param datasources a list of \code{\link[DSI]{DSConnection-class}} objects obtained after login. If the #' the default set of connections will be used: see \link[DSI]{datashield.connections_default}. #' @return a table or a list of tables that hold the length of the numeric variable and its mean diff --git a/R/meanByClassHelper0b.R b/R/meanByClassHelper0b.R index 1419d53f2..89c1c17d6 100644 --- a/R/meanByClassHelper0b.R +++ b/R/meanByClassHelper0b.R @@ -2,13 +2,13 @@ #' @title Runs the computation if variables are within a table structure #' @description This is an internal function. #' @details This function is called by the function 'ds.meanByClass' to produce the final tables -#' if the user soecify a table structure. +#' if the user specify a table structure. #' @param x a character, the name of the dataset to get the subsets from. #' @param outvar a character vector, the names of the continuous variables #' @param covar a character vector, the names of up to 3 categorical variables #' @param type a character which represents the type of analysis to carry out. If \code{type} is set to #' 'combine', a pooled table of results is generated. If \code{type} is set to 'split', a table of results -#' is genrated for each study. +#' is generated for each study. #' @param datasources a list of \code{\link[DSI]{DSConnection-class}} objects obtained after login. If the #' the default set of connections will be used: see \link[DSI]{datashield.connections_default}. #' @return a table or a list of tables that hold the length of the numeric variable(s) and their mean diff --git a/R/meanByClassHelper2.R b/R/meanByClassHelper2.R index 9fac9125a..55dca1c33 100644 --- a/R/meanByClassHelper2.R +++ b/R/meanByClassHelper2.R @@ -2,12 +2,12 @@ #' @title Generates a table for pooled results #' @description This is an internal function. #' @details This function is called by the function 'ds.meanByClass' to produce the final table -#' if the user sets the parmater 'type' to combine (the default behaviour of 'ds.meanByClass'). +#' if the user sets the parameter 'type' to combine (the default behaviour of 'ds.meanByClass'). #' @param dtsources a list of \code{\link[DSI]{DSConnection-class}} objects obtained after login. If the #' the default set of connections will be used: see \link[DSI]{datashield.connections_default}. #' @param tablenames a character vector, the name of the subset tables #' @param variables a character vector, the names of the continuous variables to computes a mean for. -#' @param invalidrecorder a list, holds informations about invalid subsets in each study. +#' @param invalidrecorder a list, holds information about invalid subsets in each study. #' @keywords internal #' @return a matrix, a table which contains the length, mean and standard deviation of each of the #' specified 'variables' in each subset table. diff --git a/R/meanByClassHelper3.R b/R/meanByClassHelper3.R index 61e61d1f8..4c834b78a 100644 --- a/R/meanByClassHelper3.R +++ b/R/meanByClassHelper3.R @@ -2,12 +2,12 @@ #' @title Generates results tables for each study separately #' @description This is an internal function. #' @details This function is called by the function 'ds.meanByClass' to produce the final tables -#' if the user sets the parmater 'type' to 'split'. +#' if the user sets the parameter 'type' to 'split'. #' @param dtsources a list of \code{\link[DSI]{DSConnection-class}} objects obtained after login. If the #' the default set of connections will be used: see \link[DSI]{datashield.connections_default}. #' @param tablenames a character vector, the name of the subset tables #' @param variables a character vector, the names of the continuous variables to computes a mean for. -#' @param invalidrecorder a list, holds informations about invalid subsets in each study +#' @param invalidrecorder a list, holds information about invalid subsets in each study #' @keywords internal #' @return a list which one results table for each study. #' @author Gaye, A. @@ -19,7 +19,7 @@ meanByClassHelper3 <- function(dtsources, tablenames, variables, invalidrecorder finalist <- vector('list', length(dtsources)) for(s in 1:length(dtsources)){ - # now get the mean and SD for the continuous variables in each of tthe subset tables + # now get the mean and SD for the continuous variables in each of the subset tables finaltable <- matrix(numeric(0), ncol=numtables) finalrows <- c() for(z in 1:length(variables)){ diff --git a/R/subsetHelper.R b/R/subsetHelper.R new file mode 100644 index 000000000..025a06803 --- /dev/null +++ b/R/subsetHelper.R @@ -0,0 +1,76 @@ +#' +#' @title Ensures that the requested subset is not larger than the original object +#' @description Compares subset and original object sizes and eventually carries out subsetting. +#' @details This function is called by the function \code{ds.subset} to ensure that the requested subset +#' is not larger than the original object. +#' +#' This function is internal. +#' +#' Server function called: \code{dimDS} +#' @param dts a list of \code{\link[DSI]{DSConnection-class}} +#' objects obtained after login. If the \code{datasources} argument is not specified +#' the default set of connections will be used: see \code{\link[DSI]{datashield.connections_default}}. +#' @param data a character string specifying the name of the data frame or +#' the factor vector and the range of the subset. +#' @param rs a vector of two integers specifying the indices of the rows de extract. +#' @param cs a vector of two integers or one or more characters. +#' @keywords internal +#' @return \code{subsetHelper} returns a message or the class of the object if the +#' object has the same class in all studies. +#' @examples +#' \dontrun{ +#' +#' ## Version 6, for version 5 see the Wiki +#' +#' # connecting to the Opal servers +#' +#' require('DSI') +#' require('DSOpal') +#' require('dsBaseClient') +#' +#' builder <- DSI::newDSLoginBuilder() +#' builder$append(server = "study1", +#' url = "http://192.168.56.100:8080/", +#' user = "administrator", password = "datashield_test&", +#' table = "CNSIM.CNSIM1", driver = "OpalDriver") +#' builder$append(server = "study2", +#' url = "http://192.168.56.100:8080/", +#' user = "administrator", password = "datashield_test&", +#' table = "CNSIM.CNSIM2", driver = "OpalDriver") +#' builder$append(server = "study3", +#' url = "http://192.168.56.100:8080/", +#' user = "administrator", password = "datashield_test&", +#' table = "CNSIM.CNSIM3", driver = "OpalDriver") +#' logindata <- builder$build() +#' +#' connections <- DSI::datashield.login(logins = logindata, assign = TRUE, symbol = "D") +#' +#' subsetHelper(dts = connections, +#' data = "D", +#' rs = 1:10, +#' cs = c("D$LAB_TSC","D$LAB_TRIG")) +#' +#' # clear the Datashield R sessions and logout +#' datashield.logout(connections) +#' } +#' +subsetHelper <- function(dts, data, rs=NULL, cs=NULL){ + + # if the size of the requested subset is greater than that of original inform the user and stop the process + dims <- DSI::datashield.aggregate(dts, call("dimDS", data)) + fail <- c(0,0) + + if(!(is.null(rs))){ + if(length(rs) > dims[[1]][1] ){ + fail[1] <- 1 + } + } + + if(!(is.null(cs))){ + if(length(cs) > dims[[1]][2]){ + fail[2] <- 1 + } + } + return(fail) + +} diff --git a/README.md b/README.md index 173f08245..616c30dcd 100644 --- a/README.md +++ b/README.md @@ -1,14 +1,38 @@ -dsBaseClient -============ +## dsBaseClient: 'DataSHIELD' Client Side Base Functions -DataSHIELD client side base R library. +[![License](https://img.shields.io/badge/License-GPLv3-blue.svg)](https://www.gnu.org/licenses/gpl-3.0.html) +[![](https://www.r-pkg.org/badges/version/dsBaseClient?color=black)](https://cran.r-project.org/package=dsBaseClient) +[![R build +status](https://github.com/datashield/dsBaseClient/workflows/R-CMD-check/badge.svg)](https://github.com/datashield/dsBaseClient/actions) +[![Codecov test coverage](https://codecov.io/gh/datashield/dsBaseClient/graph/badge.svg)](https://app.codecov.io/gh/datashield/dsBaseClient) -[![License](https://img.shields.io/badge/license-GPLv3-blue.svg)](https://www.gnu.org/licenses/gpl-3.0.html) +## Installation -About -===== +You can install the released version of dsBaseClient from +[CRAN](https://cran.r-project.org/package=dsBaseClient) with: -DataSHIELD is a software package which allows you to do non-disclosive federated analysis on sensitive data. Our website (https://www.datashield.org) has in depth descriptions of what it is, how it works and how to install it. A key point to highlight is that DataSHIELD has a client-server infrastructure, so the dsBase package (https://github.com/datashield/dsBase) needs to be used in conjuction with the dsBaseClient package (https://github.com/datashield/dsBaseClient) - trying to use one without the other makes no sense. +``` r +install.packages("dsBaseClient") +``` + +And the development version from +[GitHub](https://github.com/datashield/dsBaseClient/) with: + + +``` r +install.packages("remotes") +remotes::install_github("datashield/dsBaseClient", "") + +# Install v6.3.5 with the following +remotes::install_github("datashield/dsBaseClient", "6.3.5") +``` + +For a full list of development branches, checkout https://github.com/datashield/dsBaseClient/branches + + +## About + +DataSHIELD is a software package which allows you to do non-disclosive federated analysis on sensitive data. Our website (https://www.datashield.org) has in depth descriptions of what it is, how it works and how to install it. A key point to highlight is that DataSHIELD has a client-server infrastructure, so the dsBase package (https://github.com/datashield/dsBase) needs to be used in conjunction with the dsBaseClient package (https://github.com/datashield/dsBaseClient) - trying to use one without the other makes no sense. Detailed instructions on how to install DataSHIELD are at https://www.datashield.org/wiki. @@ -21,3 +45,40 @@ The code here is organised as: | obiba CRAN | Where you probably should install DataSHIELD from. | | releases | Stable releases. | | master branch | Mostly in sync with the latest release, changes rarely. | + +## References + +[1] Burton P, Wilson R, Butters O, Ryser-Welch P, Westerberg A, Abarrategui L, Villegas-Diaz R, + Avraam D, Marcon Y, Bishop T, Gaye A, EscribĂ  Montagut X, Wheater S (2025). + _dsBaseClient: 'DataSHIELD' Client Side Base Functions_. R package version 6.3.5. + +[2] Gaye A, Marcon Y, Isaeva J, LaFlamme P, Turner A, Jones E, Minion J, Boyd A, Newby C, Nuotio + M, Wilson R, Butters O, Murtagh B, Demir I, Doiron D, Giepmans L, Wallace S, Budin-LjĂžsne I, + Oliver Schmidt C, Boffetta P, Boniol M, Bota M, Carter K, deKlerk N, Dibben C, Francis R, + Hiekkalinna T, Hveem K, KvalĂžy K, Millar S, Perry I, Peters A, Phillips C, Popham F, Raab G, + Reischl E, Sheehan N, Waldenberger M, Perola M, van den Heuvel E, Macleod J, Knoppers B, + Stolk R, Fortier I, Harris J, Woffenbuttel B, Murtagh M, Ferretti V, Burton P (2014). + “DataSHIELD: taking the analysis to the data, not the data to the analysis.” _International + Journal of Epidemiology_, *43*(6), 1929-1944. . + +[3] Wilson R, W. Butters O, Avraam D, Baker J, Tedds J, Turner A, Murtagh M, R. Burton P (2017). + “DataSHIELD – New Directions and Dimensions.” _Data Science Journal_, *16*(21), 1-21. + . + +[4] Avraam D, Wilson R, Aguirre Chan N, Banerjee S, Bishop T, Butters O, Cadman T, Cederkvist L, + Duijts L, EscribĂ  Montagut X, Garner H, Gonçalves G, GonzĂĄlez J, Haakma S, Hartlev M, + Hasenauer J, Huth M, Hyde E, Jaddoe V, Marcon Y, Mayrhofer M, Molnar-Gabor F, Morgan A, + Murtagh M, Nestor M, Nybo Andersen A, Parker S, Pinot de Moira A, Schwarz F, + Strandberg-Larsen K, Swertz M, Welten M, Wheater S, Burton P (2024). “DataSHIELD: + mitigating disclosure risk in a multi-site federated analysis platform.” _Bioinformatics + Advances_, *5*(1), 1-21. . + +> **_Note:_** Apple Mx architecture users, please be aware that there are some numerical limitations on this platform, which leads to unexpected results when using base R packages, like stats​. +> +> x <- c(0, 3, 7) +> +> 1 - cor(x, x)​ +> +> The above should result in a value of zero. +> +> _Also See:_ For more details see https://cran.r-project.org/doc/FAQ/R-FAQ.html#Why-doesn_0027t-R-think-these-numbers-are-equal_003f and the bug report: https://bugs.r-project.org/show_bug.cgi?id=18941 diff --git a/_pkgdown.yml b/_pkgdown.yml index 4c98f6e56..f46c2ebc7 100644 --- a/_pkgdown.yml +++ b/_pkgdown.yml @@ -1,3 +1,4 @@ template: + lang: en-GB params: bootswatch: simplex diff --git a/armadillo_azure-pipelines.yml b/armadillo_azure-pipelines.yml index bd38158ba..92a753a7f 100644 --- a/armadillo_azure-pipelines.yml +++ b/armadillo_azure-pipelines.yml @@ -132,14 +132,14 @@ jobs: sudo apt-get upgrade -y sudo apt-get install -qq libxml2-dev libcurl4-openssl-dev libssl-dev libgsl-dev libgit2-dev r-base -y - sudo apt-get install -qq libharfbuzz-dev libfribidi-dev libmagick++-dev -y + sudo apt-get install -qq libharfbuzz-dev libfribidi-dev libmagick++-dev libudunits2-dev -y sudo R -q -e "install.packages(c('devtools','covr'), dependencies=TRUE, repos='https://cloud.r-project.org')" sudo R -q -e "install.packages(c('fields','meta','metafor','ggplot2','gridExtra','data.table'), dependencies=TRUE, repos='https://cloud.r-project.org')" sudo R -q -e "install.packages(c('DSI','DSOpal','DSLite'), dependencies=TRUE, repos='https://cloud.r-project.org')" sudo R -q -e "install.packages(c('MolgenisAuth', 'MolgenisArmadillo', 'DSMolgenisArmadillo'), dependencies=TRUE, repos='https://cloud.r-project.org')" sudo R -q -e "install.packages(c('DescTools','e1071'), dependencies=TRUE, repos='https://cloud.r-project.org')" - sudo R -q -e "library('devtools'); devtools::install_github(repo='datashield/dsDangerClient', ref='6.3.1', dependencies = TRUE)" + sudo R -q -e "library('devtools'); devtools::install_github(repo='datashield/dsDangerClient', ref='6.3.4', dependencies = TRUE)" # XML grep for coverage report merging sudo apt-get install -qq xml-twig-tools -y @@ -235,7 +235,7 @@ jobs: curl -u admin:admin -X GET http://localhost:8080/packages - curl -u admin:admin --max-time 300 -v -H 'Content-Type: multipart/form-data' -F "file=@dsBase_6.4.0.9000-permissive.tar.gz" -X POST http://localhost:8080/install-package + curl -u admin:admin --max-time 300 -v -H 'Content-Type: multipart/form-data' -F "file=@dsBase_6.4.0-permissive.tar.gz" -X POST http://localhost:8080/install-package sleep 60 docker container restart dsbaseclient_armadillo_1 @@ -364,7 +364,7 @@ jobs: - bash: | curl -u admin:admin http://localhost:8080/whitelist - curl -u admin:admin -v -H 'Content-Type: multipart/form-data' -F "file=@dsDanger_6.4.0.9000.tar.gz" -X POST http://localhost:8080/install-package + curl -u admin:admin -v -H 'Content-Type: multipart/form-data' -F "file=@dsDanger_6.4.0.tar.gz" -X POST http://localhost:8080/install-package docker container restart dsbaseclient_armadillo_1 sleep 60 diff --git a/azure-pipelines.yml b/azure-pipelines.yml index 60fdf85bf..a732a0ab2 100644 --- a/azure-pipelines.yml +++ b/azure-pipelines.yml @@ -3,11 +3,9 @@ # Starts with a vanilla Opal docker composition, installs dsBase # and dsBaseClient (as well as dependencies - including a fully functional # Opal server). -# Does checks and tests then saves results to testStatus repo. # # Inside the root directory $(Pipeline.Workspace) will be a file tree like: # /dsBaseClient <- Checked out version of datashield/dsBaseClient -# /testStatus <- Checked out version of datashield/testStatus # /logs <- Where results of tests and lots are collated # # As of May 2020 this takes ~ 70 mins to run. @@ -36,18 +34,6 @@ variables: _r_check_system_clock_: 0 -######################################################################################### -# Need to define all the GH repos and their access tokens, see: -# https://docs.microsoft.com/en-us/azure/devops/pipelines/library/service-endpoints?view=azure-devops&tabs=yaml -resources: - repositories: - - repository: testStatusRepo - type: github - endpoint: datashield-testing - name: datashield/testStatus - ref: master - - ######################################################################################### # When and under what condition to run the pipeline. schedules: @@ -82,11 +68,6 @@ jobs: - checkout: self path: 'dsBaseClient' - - checkout: testStatusRepo - path: 'testStatus' - persistCredentials: true - condition: and(eq(variables['Build.Repository.Name'], 'datashield/dsBaseClient'), ne(variables['Build.Reason'], 'PullRequest')) - ##################################################################################### # The MySQL install that comes with the VM doesn't seem compatable with our set up @@ -132,7 +113,7 @@ jobs: sudo apt-get upgrade -y sudo apt-get install -qq libxml2-dev libcurl4-openssl-dev libssl-dev libgsl-dev libgit2-dev r-base -y - sudo apt-get install -qq libharfbuzz-dev libfribidi-dev libmagick++-dev -y + sudo apt-get install -qq libharfbuzz-dev libfribidi-dev libmagick++-dev libudunits2-dev -y sudo R -q -e "install.packages(c('curl','httr'), dependencies=TRUE, repos='https://cloud.r-project.org')" sudo R -q -e "install.packages(c('devtools','covr'), dependencies=TRUE, repos='https://cloud.r-project.org')" sudo R -q -e "install.packages(c('fields','meta','metafor','ggplot2','gridExtra','data.table'), dependencies=TRUE, repos='https://cloud.r-project.org')" @@ -140,7 +121,7 @@ jobs: sudo R -q -e "install.packages(c('MolgenisAuth', 'MolgenisArmadillo', 'DSMolgenisArmadillo'), dependencies=TRUE, repos='https://cloud.r-project.org')" sudo R -q -e "install.packages(c('DescTools','e1071'), dependencies=TRUE, repos='https://cloud.r-project.org')" - sudo R -q -e "library('devtools'); devtools::install_github(repo='datashield/dsDangerClient', ref='6.4.0', dependencies = TRUE)" + sudo R -q -e "library('devtools'); devtools::install_github(repo='datashield/dsDangerClient', ref='6.3.4', dependencies = TRUE)" # XML grep for coverage report merging sudo apt-get install -qq xml-twig-tools -y @@ -235,7 +216,7 @@ jobs: - bash: | R -q -e "library(opalr); opal <- opal.login(username = 'administrator', password = 'datashield_test&', url = 'https://localhost:8443', opts = list(ssl_verifyhost=0, ssl_verifypeer=0)); opal.put(opal, 'system', 'conf', 'general', '_rPackage'); opal.logout(o)" - R -q -e "library(opalr); opal <- opal.login('administrator','datashield_test&', url='https://localhost:8443/', opts = list(ssl_verifyhost=0, ssl_verifypeer=0)); dsadmin.install_github_package(opal, 'dsBase', username = 'datashield', ref = '6.3.2'); opal.logout(opal)" + R -q -e "library(opalr); opal <- opal.login('administrator','datashield_test&', url='https://localhost:8443/', opts = list(ssl_verifyhost=0, ssl_verifypeer=0)); dsadmin.install_github_package(opal, 'dsBase', username = 'datashield', ref = 'v6.3.5-dev'); opal.logout(opal)" sleep 60 @@ -363,7 +344,7 @@ jobs: R -q -e "library(opalr); opal <- opal.login(username = 'administrator', password = 'datashield_test&', url = 'https://localhost:8443', opts = list(ssl_verifyhost=0, ssl_verifypeer=0)); opal.put(opal, 'system', 'conf', 'general', '_rPackage'); opal.logout(o)" - R -q -e "library(opalr); opal <- opal.login('administrator','datashield_test&', url='https://localhost:8443/', opts = list(ssl_verifyhost=0, ssl_verifypeer=0)); dsadmin.install_github_package(opal, 'dsDanger', username = 'datashield', ref = '6.3.1'); opal.logout(opal)" + R -q -e "library(opalr); opal <- opal.login('administrator','datashield_test&', url='https://localhost:8443/', opts = list(ssl_verifyhost=0, ssl_verifypeer=0)); dsadmin.install_github_package(opal, 'dsDanger', username = 'datashield', ref = '6.3.4'); opal.logout(opal)" workingDirectory: $(Pipeline.Workspace)/dsBaseClient displayName: 'Install dsDanger package on Opal server' @@ -524,75 +505,6 @@ jobs: displayName: 'Down Opal Docker Composition' condition: succeeded() - ##################################################################################### - # Windup phase - ##################################################################################### - - ##################################################################################### - # Output some important version numbers to file. This gets added to the testStatus - # commit so it can be parsed and used on the status table. - - bash: | - - echo 'branch:'$(branchName) >> $(datetime).txt - echo 'os:'$(lsb_release -ds) >> $(datetime).txt - echo 'R:'$(R --version | head -n 1) >> $(datetime).txt - echo 'opal:'$(opal system --opal localhost:8443 --user administrator --password "datashield_test&" --version) >> $(datetime).txt - - workingDirectory: $(Pipeline.Workspace)/logs - displayName: 'Write versions to file' - condition: succeededOrFailed() - - - ##################################################################################### - # Checkout the testStatus repo, add the results from here, push back to GH. - # TODO: Automatically pull in better email/name info from somewhere. - # TODO: More debug info in commit message - - bash: | - - # Git needs some config set to be able to push to a repo. - git config --global user.email "you@example.com" - git config --global user.name "Azure pipeline" - - # This repo is checked out in detatched head state, so reconnect it here. - git checkout master - - # It is possible that other commits have been made to the testStatus repo since it - # was checked out. i.e. other pipeline runs might have finished. - git pull - - # Make the directories if they dont already exist - mkdir --parents logs/$(projectName)/$(branchName) - mkdir --parents docs/$(projectName)/$(branchName)/latest - - cp $(Pipeline.Workspace)/logs/coveragelist.csv logs/$(projectName)/$(branchName)/ - cp $(Pipeline.Workspace)/logs/coveragelist.csv logs/$(projectName)/$(branchName)/$(datetime).csv - - cp $(Pipeline.Workspace)/logs/test_results.xml logs/$(projectName)/$(branchName)/ - cp $(Pipeline.Workspace)/logs/test_results.xml logs/$(projectName)/$(branchName)/$(datetime).xml - - cp $(Pipeline.Workspace)/logs/$(datetime).txt logs/$(projectName)/$(branchName)/ - - # Run the script to parse the results and build the html pages. - # status.py JUnit_file.xml coverage_file.csv output_file.html local_repo_path remote_repo_name branch - source/status.py logs/$(projectName)/$(branchName)/$(datetime).xml logs/$(projectName)/$(branchName)/$(datetime).csv logs/$(projectName)/$(branchName)/$(datetime).txt status.html $(Pipeline.Workspace)/$(projectName) $(projectName) $(branchName) - - cp status.html docs/$(projectName)/$(branchName)/latest/index.html - git add logs/$(projectName)/$(branchName)/coveragelist.csv - git add logs/$(projectName)/$(branchName)/test_results.xml - git add logs/$(projectName)/$(branchName)/$(datetime).xml - git add logs/$(projectName)/$(branchName)/$(datetime).csv - git add logs/$(projectName)/$(branchName)/$(datetime).txt - git add docs/$(projectName)/$(branchName)/latest/index.html - - git commit -m "Azure auto test for $(projectName)/$(branchName) @ $(datetime)" -m "Debug info:\nProjectName:$(projectName)\nBranchName:$(branchName)\nDataTime:$(datetime)" - git push - exit 0 - - workingDirectory: $(Pipeline.Workspace)/testStatus - displayName: 'Parse test results' - condition: and(eq(variables['Build.Repository.Name'], 'datashield/dsBaseClient'), ne(variables['Build.Reason'], 'PullRequest')) - - ##################################################################################### # Output the environment information to the console. This is useful for debugging. # Always do this, even if some of the above has failed or the job has been cacelled. diff --git a/docker-compose_armadillo.yml b/docker-compose_armadillo.yml index 2dd1c4de4..2912255c7 100644 --- a/docker-compose_armadillo.yml +++ b/docker-compose_armadillo.yml @@ -3,11 +3,7 @@ services: hostname: armadillo ports: - 8080:8080 -<<<<<<< HEAD - image: datashield/armadillo_citest:5.0.0 -======= - image: datashield/armadillo_citest:5.1.2 ->>>>>>> origin/v6.3.3-dev + image: datashield/armadillo_citest:5.11.0 environment: LOGGING_CONFIG: 'classpath:logback-file.xml' AUDIT_LOG_PATH: '/app/logs/audit.log' @@ -20,10 +16,7 @@ services: default: hostname: default -<<<<<<< HEAD image: datashield/rock-margin-devel-permissive:latest -======= - image: datashield/rserver-neutron-gypsum-permissive:latest ->>>>>>> origin/v6.3.3-dev +# image: datashield/rserver-panda-lamda:devel environment: DEBUG: "FALSE" diff --git a/docker-compose_opal.yml b/docker-compose_opal.yml index 5979ab7be..a9ab28741 100644 --- a/docker-compose_opal.yml +++ b/docker-compose_opal.yml @@ -1,8 +1,8 @@ services: opal: - image: datashield/opal_citest:5.1.4 + image: datashield/opal_citest:latest ports: - - "8443:8443" + - 8443:8443 links: - mongo - rock @@ -20,4 +20,6 @@ services: - MONGO_INITDB_ROOT_USERNAME=root - MONGO_INITDB_ROOT_PASSWORD=foobar rock: - image: datashield/rock-margin-joule-permissive:latest + image: datashield/rock-margin-devel-permissive:latest + environment: + DEBUG: "FALSE" diff --git a/docs/404.html b/docs/404.html index bac28cec0..42f9ed01f 100644 --- a/docs/404.html +++ b/docs/404.html @@ -1,5 +1,5 @@ - + @@ -73,12 +73,12 @@

Page not found (404)

-

Site built with pkgdown 2.1.3.

+

Site built with pkgdown 2.2.0.

diff --git a/docs/LICENSE.html b/docs/LICENSE.html index 40bc80ee8..515536140 100644 --- a/docs/LICENSE.html +++ b/docs/LICENSE.html @@ -1,5 +1,5 @@ -NA ‱ dsBaseClientNA ‱ dsBaseClient @@ -256,11 +256,11 @@

NA

-

Site built with pkgdown 2.1.3.

+

Site built with pkgdown 2.2.0.

diff --git a/docs/authors.html b/docs/authors.html index d662e9c57..a4be467aa 100644 --- a/docs/authors.html +++ b/docs/authors.html @@ -1,5 +1,5 @@ -Authors and Citation ‱ dsBaseClientAuthors and Citation ‱ dsBaseClient @@ -40,19 +40,19 @@

Authors and Citation

  • -

    Paul Burton. Author. +

    Paul Burton. Author.

  • -

    Rebecca Wilson. Author. +

    Rebecca Wilson. Author.

  • -

    Olly Butters. Author. +

    Olly Butters. Author.

  • -

    Patricia Ryser-Welch. Author. +

    Patricia Ryser-Welch. Author.

  • @@ -75,6 +75,18 @@

    Authors and Citation

    Yannick Marcon. Author.

  • +
  • +

    Tom Bishop. Author. +

    +
  • +
  • +

    Amadou Gaye. Author. +

    +
  • +
  • +

    Xavier EscribĂ -Montagut. Author. +

    +
  • Stuart Wheater. Author, maintainer.

    @@ -88,16 +100,62 @@

    Citation

    -

    Burton P, Wilson R, Butters O, Ryser-Welch P, Westerberg A, Abarrategui L, Villegas-Diaz R, Avraam D, Marcon Y, Wheater S (2025). -dsBaseClient: DataSHIELD Client Functions. +

    Burton P, Wilson R, Butters O, Ryser-Welch P, Westerberg A, Abarrategui L, Villegas-Diaz R, Avraam D, Marcon Y, Bishop T, Gaye A, EscribĂ -Montagut X, Wheater S (????). +dsBaseClient: 'DataSHIELD' Client Side Base Functions. R package version 6.4.0.9000.

    @Manual{,
    -  title = {dsBaseClient: DataSHIELD Client Functions},
    -  author = {Paul Burton and Rebecca Wilson and Olly Butters and Patricia Ryser-Welch and Alex Westerberg and Leire Abarrategui and Roberto Villegas-Diaz and Demetris Avraam and Yannick Marcon and Stuart Wheater},
    -  year = {2025},
    +  title = {dsBaseClient: 'DataSHIELD' Client Side Base Functions},
    +  author = {Paul Burton and Rebecca Wilson and Olly Butters and Patricia Ryser-Welch and Alex Westerberg and Leire Abarrategui and Roberto Villegas-Diaz and Demetris Avraam and Yannick Marcon and Tom Bishop and Amadou Gaye and Xavier EscribĂ -Montagut and Stuart Wheater},
       note = {R package version 6.4.0.9000},
     }
    +

    Gaye A, Marcon Y, Isaeva J, LaFlamme P, Turner A, Jones E, Minion J, Boyd A, Newby C, Nuotio M, Wilson R, Butters O, Murtagh B, Demir I, Doiron D, Giepmans L, Wallace S, Budin-Ljþsne I, Schmidt C, Boffetta P, Boniol M, Bota M, Carter K, deKlerk N, Dibben C, Francis R, Hiekkalinna T, Hveem K, Kvalþy K, Millar S, Perry I, Peters A, Phillips C, Popham F, Raab G, Reischl E, Sheehan N, Waldenberger M, Perola M, van den Heuvel E, Macleod J, Knoppers B, Stolk R, Fortier I, Harris J, Woffenbuttel B, Murtagh M, Ferretti V, Burton P (2014). +“DataSHIELD: taking the analysis to the data, not the data to the analysis.” +International Journal of Epidemiology, 43(6), 1929–1944. +doi:10.1093/ije/dyu188. +

    +
    @Article{,
    +  title = {{DataSHIELD: taking the analysis to the data, not the data to the analysis}},
    +  author = {Amadou Gaye and Yannick Marcon and Julia Isaeva and Philippe {LaFlamme} and Andrew Turner and Elinor M Jones and Joel Minion and Andrew W Boyd and Christopher J Newby and Marja-Liisa Nuotio and Rebecca Wilson and Oliver Butters and Barnaby Murtagh and Ipek Demir and Dany Doiron and Lisette Giepmans and Susan E Wallace and Isabelle Budin-Lj{\o}sne and Carsten O. Schmidt and Paolo Boffetta and Mathieu Boniol and Maria Bota and Kim W Carter and Nick {deKlerk} and Chris Dibben and Richard W Francis and Tero Hiekkalinna and Kristian Hveem and Kirsti Kval{\o}y and Sean Millar and Ivan J Perry and Annette Peters and Catherine M Phillips and Frank Popham and Gillian Raab and Eva Reischl and Nuala Sheehan and Melanie Waldenberger and Markus Perola and Edwin {{van den Heuvel}} and John Macleod and Bartha M Knoppers and Ronald P Stolk and Isabel Fortier and Jennifer R Harris and Bruce H R Woffenbuttel and Madeleine J Murtagh and Vincent Ferretti and Paul R Burton},
    +  journal = {International Journal of Epidemiology},
    +  year = {2014},
    +  volume = {43},
    +  number = {6},
    +  pages = {1929--1944},
    +  doi = {10.1093/ije/dyu188},
    +}
    +

    Wilson R, Butters O, Avraam D, Baker J, Tedds J, Turner A, Murtagh M, Burton P (2017). +“DataSHIELD – New Directions and Dimensions.” +Data Science Journal, 16(21), 1–21. +doi:10.5334/dsj-2017-021. +

    +
    @Article{,
    +  title = {{DataSHIELD – New Directions and Dimensions}},
    +  author = {Rebecca C. Wilson and Oliver W. Butters and Demetris Avraam and James Baker and Jonathan A. Tedds and Andrew Turner and Madeleine Murtagh and Paul R. Burton},
    +  journal = {Data Science Journal},
    +  year = {2017},
    +  volume = {16},
    +  number = {21},
    +  pages = {1--21},
    +  doi = {10.5334/dsj-2017-021},
    +}
    +

    Avraam D, Wilson R, Aguirre Chan N, Banerjee S, Bishop T, Butters O, Cadman T, Cederkvist L, Duijts L, Escribà Montagut X, Garner H, Gonçalves G, González J, Haakma S, Hartlev M, Hasenauer J, Huth M, Hyde E, Jaddoe V, Marcon Y, Mayrhofer M, Molnar-Gabor F, Morgan A, Murtagh M, Nestor M, Nybo Andersen A, Parker S, Pinot de Moira A, Schwarz F, Strandberg-Larsen K, Swertz M, Welten M, Wheater S, Burton P (2024). +“DataSHIELD: mitigating disclosure risk in a multi-site federated analysis platform.” +Bioinformatics Advances, 5(1), 1–21. +doi:10.1093/bioadv/vbaf046. +

    +
    @Article{,
    +  title = {{DataSHIELD: mitigating disclosure risk in a multi-site federated analysis platform}},
    +  author = {Demetris Avraam and Rebecca C Wilson and Noemi {{Aguirre Chan}} and Soumya Banerjee and Tom R P Bishop and Olly Butters and Tim Cadman and Luise Cederkvist and Liesbeth Duijts and Xavier {{Escrib{\a`a} Montagut}} and Hugh Garner and Gon{\c c}alo {Gon{\c c}alves} and Juan R Gonz{\a'a}lez and Sido Haakma and Mette Hartlev and Jan Hasenauer and Manuel Huth and Eleanor Hyde and Vincent W V Jaddoe and Yannick Marcon and Michaela Th Mayrhofer and Fruzsina Molnar-Gabor and Andrei Scott Morgan and Madeleine Murtagh and Marc Nestor and Anne-Marie {{Nybo Andersen}} and Simon Parker and Angela {{Pinot de Moira}} and Florian Schwarz and Katrine Strandberg-Larsen and Morris A Swertz and Marieke Welten and Stuart Wheater and Paul R Burton},
    +  journal = {Bioinformatics Advances},
    +  year = {2024},
    +  volume = {5},
    +  number = {1},
    +  pages = {1--21},
    +  doi = {10.1093/bioadv/vbaf046},
    +  editor = {Thomas Lengauer},
    +  publisher = {Oxford University Press (OUP)},
    +}
    @@ -106,11 +164,11 @@

    Citation

    -

    Site built with pkgdown 2.1.3.

    +

    Site built with pkgdown 2.2.0.

    diff --git a/docs/index.html b/docs/index.html index 83ad68969..42c7f7f3c 100644 --- a/docs/index.html +++ b/docs/index.html @@ -1,18 +1,18 @@ - + -DataSHIELD Client Functions ‱ dsBaseClient +DataSHIELD Client Side Base Functions ‱ dsBaseClient - - + +

    +
    +install.packages("remotes")
    +remotes::install_github("datashield/dsBaseClient", "<BRANCH>")
    +
    +# Install v6.3.5 with the following
    +remotes::install_github("datashield/dsBaseClient", "6.3.5")
    +

    For a full list of development branches, checkout https://github.com/datashield/dsBaseClient/branches

    + +
    +

    About +

    +

    DataSHIELD is a software package which allows you to do non-disclosive federated analysis on sensitive data. Our website (https://www.datashield.org) has in depth descriptions of what it is, how it works and how to install it. A key point to highlight is that DataSHIELD has a client-server infrastructure, so the dsBase package (https://github.com/datashield/dsBase) needs to be used in conjunction with the dsBaseClient package (https://github.com/datashield/dsBaseClient) - trying to use one without the other makes no sense.

    Detailed instructions on how to install DataSHIELD are at https://www.datashield.org/wiki.

    Discussion and help with using DataSHIELD can be obtained from The DataSHIELD Forum https://datashield.discourse.group/

    The code here is organised as:

    @@ -93,6 +107,21 @@

    About +

    +
    +

    References +

    +

    [1] Burton P, Wilson R, Butters O, Ryser-Welch P, Westerberg A, Abarrategui L, Villegas-Diaz R, Avraam D, Marcon Y, Bishop T, Gaye A, Escribà Montagut X, Wheater S (2025). dsBaseClient: ‘DataSHIELD’ Client Side Base Functions. R package version 6.3.5.

    +

    [2] Gaye A, Marcon Y, Isaeva J, LaFlamme P, Turner A, Jones E, Minion J, Boyd A, Newby C, Nuotio M, Wilson R, Butters O, Murtagh B, Demir I, Doiron D, Giepmans L, Wallace S, Budin-Ljþsne I, Oliver Schmidt C, Boffetta P, Boniol M, Bota M, Carter K, deKlerk N, Dibben C, Francis R, Hiekkalinna T, Hveem K, Kvalþy K, Millar S, Perry I, Peters A, Phillips C, Popham F, Raab G, Reischl E, Sheehan N, Waldenberger M, Perola M, van den Heuvel E, Macleod J, Knoppers B, Stolk R, Fortier I, Harris J, Woffenbuttel B, Murtagh M, Ferretti V, Burton P (2014). “DataSHIELD: taking the analysis to the data, not the data to the analysis.” International Journal of Epidemiology, 43(6), 1929-1944. https://doi.org/10.1093/ije/dyu188.

    +

    [3] Wilson R, W. Butters O, Avraam D, Baker J, Tedds J, Turner A, Murtagh M, R. Burton P (2017). “DataSHIELD – New Directions and Dimensions.” Data Science Journal, 16(21), 1-21. https://doi.org/10.5334/dsj-2017-021.

    +

    [4] Avraam D, Wilson R, Aguirre Chan N, Banerjee S, Bishop T, Butters O, Cadman T, Cederkvist L, Duijts L, Escribà Montagut X, Garner H, Gonçalves G, González J, Haakma S, Hartlev M, Hasenauer J, Huth M, Hyde E, Jaddoe V, Marcon Y, Mayrhofer M, Molnar-Gabor F, Morgan A, Murtagh M, Nestor M, Nybo Andersen A, Parker S, Pinot de Moira A, Schwarz F, Strandberg-Larsen K, Swertz M, Welten M, Wheater S, Burton P (2024). “DataSHIELD: mitigating disclosure risk in a multi-site federated analysis platform.” Bioinformatics Advances, 5(1), 1-21. https://doi.org/10.1093/bioadv/vbaf046.

    +
    +

    Note: Apple Mx architecture users, please be aware that there are some numerical limitations on this platform, which leads to unexpected results when using base R packages, like stats​.

    +

    x <- c(0, 3, 7)

    +

    1 - cor(x, x)​

    +

    The above should result in a value of zero.

    +

    Also See: For more details see https://cran.r-project.org/doc/FAQ/R-FAQ.html#Why-doesn_0027t-R-think-these-numbers-are-equal_003f and the bug report: https://bugs.r-project.org/show_bug.cgi?id=18941

    +
    @@ -117,15 +146,18 @@

    Citation

    Developers

      -
    • Paul Burton
      Author
    • -
    • Rebecca Wilson
      Author
    • -
    • Olly Butters
      Author
    • -
    • Patricia Ryser-Welch
      Author
    • +
    • Paul Burton
      Author
    • +
    • Rebecca Wilson
      Author
    • +
    • Olly Butters
      Author
    • +
    • Patricia Ryser-Welch
      Author
    • Alex Westerberg
      Author
    • Leire Abarrategui
      Author
    • Roberto Villegas-Diaz
      Author
    • Demetris Avraam
      Author
    • Yannick Marcon
      Author
    • +
    • Tom Bishop
      Author
    • +
    • Amadou Gaye
      Author
    • +
    • Xavier EscribĂ -Montagut
      Author
    • Stuart Wheater
      Author, maintainer
    @@ -138,12 +170,12 @@

    Developers

    -

    Site built with pkgdown 2.1.3.

    +

    Site built with pkgdown 2.2.0.

    diff --git a/docs/pkgdown.yml b/docs/pkgdown.yml index 1b35ec2bd..9cccba16b 100644 --- a/docs/pkgdown.yml +++ b/docs/pkgdown.yml @@ -1,5 +1,5 @@ pandoc: 3.1.3 -pkgdown: 2.1.3 +pkgdown: 2.2.0 pkgdown_sha: ~ articles: {} -last_built: 2025-07-12T18:38Z +last_built: 2025-11-28T11:37Z diff --git a/docs/reference/checkClass.html b/docs/reference/checkClass.html index 65b81d021..2704f5fa0 100644 --- a/docs/reference/checkClass.html +++ b/docs/reference/checkClass.html @@ -1,5 +1,5 @@ -Checks that an object has the same class in all studies — checkClass ‱ dsBaseClientChecks that an object has the same class in all studies — checkClass ‱ dsBaseClient @@ -78,11 +78,11 @@

    Details

    -

    Site built with pkgdown 2.1.3.

    +

    Site built with pkgdown 2.2.0.

    diff --git a/docs/reference/colPercent.html b/docs/reference/colPercent.html index 939c36a2e..ef63dde38 100644 --- a/docs/reference/colPercent.html +++ b/docs/reference/colPercent.html @@ -1,5 +1,5 @@ -Produces column percentages — colPercent ‱ dsBaseClientProduces column percentages — colPercent ‱ dsBaseClient @@ -76,11 +76,11 @@

    Author

    -

    Site built with pkgdown 2.1.3.

    +

    Site built with pkgdown 2.2.0.

    diff --git a/docs/reference/computeWeightedMeans.html b/docs/reference/computeWeightedMeans.html index 057300cd3..4cac093b3 100644 --- a/docs/reference/computeWeightedMeans.html +++ b/docs/reference/computeWeightedMeans.html @@ -1,5 +1,5 @@ -Compute Weighted Mean by Group — computeWeightedMeans ‱ dsBaseClientCompute Weighted Mean by Group — computeWeightedMeans ‱ dsBaseClientPool missing data patterns across studies — .pool_md_patterns ‱ dsBaseClient + + +
    +
    + + + +
    +
    + + +
    +

    Internal function to pool md.pattern results from multiple studies

    +
    + +
    +
    .pool_md_patterns(patterns_list, study_names)
    +
    + +
    +

    Arguments

    + + +
    patterns_list
    +

    List of pattern matrices from each study

    + + +
    study_names
    +

    Names of the studies

    + +
    +
    +

    Value

    +

    Pooled pattern matrix

    +
    + +
    + +
    + + +
    + +
    +

    Site built with pkgdown 2.2.0.

    +
    + +
    + + + + + + + + diff --git a/docs/reference/ds.Boole.html b/docs/reference/ds.Boole.html index 651a49e0f..0b2e0aaf2 100644 --- a/docs/reference/ds.Boole.html +++ b/docs/reference/ds.Boole.html @@ -1,5 +1,5 @@ -Converts a server-side R object into Boolean indicators — ds.Boole ‱ dsBaseClientConverts a server-side R object into Boolean indicators — ds.Boole ‱ dsBaseClientComputes the absolute values of a variable — ds.abs ‱ dsBaseClientComputes the absolute values of a variable — ds.abs ‱ dsBaseClientConverts a server-side R object into a character class — ds.asCharacter ‱ dsBaseClientConverts a server-side R object into a character class — ds.asCharacter ‱ dsBaseClientConverts a server-side R object into a data frame — ds.asDataFrame ‱ dsBaseClientConverts a server-side R object into a data frame — ds.asDataFrame ‱ dsBaseClientConverts a server-side R object into a matrix — ds.asDataMatrix ‱ dsBaseClientConverts a server-side R object into a matrix — ds.asDataMatrix ‱ dsBaseClientConverts a server-side numeric vector into a factor — ds.asFactor ‱ dsBaseClientConverts a server-side numeric vector into a factor — ds.asFactor ‱ dsBaseClient @@ -144,7 +144,7 @@

    Details

    If we set the argument fixed.dummy.vars = TRUE, baseline.level = 1 and forced.factor.levels = c(1,2,3,4,5). The input vector is converted to the following matrix of dummy variables:

    -
    DV2DV3DV4DV50
    00010
    00000
    00100
    00100
    01000
    00010
    00010

    For the same example if the baseline.level = 3 then the matrix is:

    +
    DV2DV3DV4DV5
    0000
    1000
    0000
    0100
    0010
    0010
    0000
    0100
    0010
    0001

    For the same example if the baseline.level = 3 then the matrix is:

    DV1DV2DV4DV5
    1000
    0100
    1000
    0000
    0010
    0010
    1000
    0000
    0010
    0001

    In the first instance the first row of the matrix has zeros in all entries indicating that the first data point belongs to level 1 (as the baseline level is equal to 1). The second row has 1 at the first (DV2) column and zeros elsewhere, @@ -229,11 +229,11 @@

    Examples

    -

    Site built with pkgdown 2.1.3.

    +

    Site built with pkgdown 2.2.0.

    diff --git a/docs/reference/ds.asFactorSimple.html b/docs/reference/ds.asFactorSimple.html index 9cc68a424..956774937 100644 --- a/docs/reference/ds.asFactorSimple.html +++ b/docs/reference/ds.asFactorSimple.html @@ -1,5 +1,5 @@ -Converts a numeric vector into a factor — ds.asFactorSimple ‱ dsBaseClientConverts a numeric vector into a factor — ds.asFactorSimple ‱ dsBaseClientConverts a server-side R object into an integer class — ds.asInteger ‱ dsBaseClientConverts a server-side R object into an integer class — ds.asInteger ‱ dsBaseClientConverts a server-side R object into a list — ds.asList ‱ dsBaseClientConverts a server-side R object into a list — ds.asList ‱ dsBaseClientConverts a server-side R object into a logical class — ds.asLogical ‱ dsBaseClientConverts a server-side R object into a logical class — ds.asLogical ‱ dsBaseClientConverts a server-side R object into a matrix — ds.asMatrix ‱ dsBaseClientConverts a server-side R object into a matrix — ds.asMatrix ‱ dsBaseClientConverts a server-side R object into a numeric class — ds.asNumeric ‱ dsBaseClientConverts a server-side R object into a numeric class — ds.asNumeric ‱ dsBaseClientAssigns an R object to a name in the server-side — ds.assign ‱ dsBaseClientAssigns an R object to a name in the server-side — ds.assign ‱ dsBaseClient @@ -131,11 +131,11 @@

    Examples

    -

    Site built with pkgdown 2.1.3.

    +

    Site built with pkgdown 2.2.0.

    diff --git a/docs/reference/ds.auc.html b/docs/reference/ds.auc.html index e586983fc..7db23ae3a 100644 --- a/docs/reference/ds.auc.html +++ b/docs/reference/ds.auc.html @@ -1,5 +1,5 @@ -Calculates the Area under the curve (AUC) — ds.auc ‱ dsBaseClientCalculates the Area under the curve (AUC) — ds.auc ‱ dsBaseClientDraw boxplot — ds.boxPlot ‱ dsBaseClientDraw boxplot — ds.boxPlot ‱ dsBaseClientRenders boxplot — ds.boxPlotGG ‱ dsBaseClientRenders boxplot — ds.boxPlotGG ‱ dsBaseClientTake a data frame on the server side an arrange it to pass it to the boxplot function — ds.boxPlotGG_data_Treatment ‱ dsBaseClientTake a data frame on the server side an arrange it to pass it to the boxplot function — ds.boxPlotGG_data_Treatment ‱ dsBaseClient @@ -95,11 +95,11 @@

    Value

    -

    Site built with pkgdown 2.1.3.

    +

    Site built with pkgdown 2.2.0.

    diff --git a/docs/reference/ds.boxPlotGG_data_Treatment_numeric.html b/docs/reference/ds.boxPlotGG_data_Treatment_numeric.html index 599cdd698..b5b29c300 100644 --- a/docs/reference/ds.boxPlotGG_data_Treatment_numeric.html +++ b/docs/reference/ds.boxPlotGG_data_Treatment_numeric.html @@ -1,5 +1,5 @@ -Take a vector on the server side an arrange it to pass it to the boxplot function — ds.boxPlotGG_data_Treatment_numeric ‱ dsBaseClientTake a vector on the server side an arrange it to pass it to the boxplot function — ds.boxPlotGG_data_Treatment_numeric ‱ dsBaseClient @@ -75,11 +75,11 @@

    Value

    -

    Site built with pkgdown 2.1.3.

    +

    Site built with pkgdown 2.2.0.

    diff --git a/docs/reference/ds.boxPlotGG_numeric.html b/docs/reference/ds.boxPlotGG_numeric.html index a7819dcfd..9a95f7c9a 100644 --- a/docs/reference/ds.boxPlotGG_numeric.html +++ b/docs/reference/ds.boxPlotGG_numeric.html @@ -1,5 +1,5 @@ -Draw boxplot with information from a numeric vector — ds.boxPlotGG_numeric ‱ dsBaseClientDraw boxplot with information from a numeric vector — ds.boxPlotGG_numeric ‱ dsBaseClient @@ -91,11 +91,11 @@

    Value

    -

    Site built with pkgdown 2.1.3.

    +

    Site built with pkgdown 2.2.0.

    diff --git a/docs/reference/ds.boxPlotGG_table.html b/docs/reference/ds.boxPlotGG_table.html index 152826f4c..0ca305d17 100644 --- a/docs/reference/ds.boxPlotGG_table.html +++ b/docs/reference/ds.boxPlotGG_table.html @@ -1,5 +1,5 @@ -Draw boxplot with information from a data frame — ds.boxPlotGG_table ‱ dsBaseClientDraw boxplot with information from a data frame — ds.boxPlotGG_table ‱ dsBaseClient @@ -106,11 +106,11 @@

    Value

    -

    Site built with pkgdown 2.1.3.

    +

    Site built with pkgdown 2.2.0.

    diff --git a/docs/reference/ds.bp_standards.html b/docs/reference/ds.bp_standards.html index f92795f26..b84f8d908 100644 --- a/docs/reference/ds.bp_standards.html +++ b/docs/reference/ds.bp_standards.html @@ -1,5 +1,5 @@ -Calculates Blood pressure z-scores — ds.bp_standards ‱ dsBaseClientCalculates Blood pressure z-scores — ds.bp_standards ‱ dsBaseClientCombines values into a vector or list in the server-side — ds.c ‱ dsBaseClientCombines values into a vector or list in the server-side — ds.c ‱ dsBaseClient @@ -132,11 +132,11 @@

    Examples

    -

    Site built with pkgdown 2.1.3.

    +

    Site built with pkgdown 2.2.0.

    diff --git a/docs/reference/ds.cbind.html b/docs/reference/ds.cbind.html index f3fd0c87d..e29940957 100644 --- a/docs/reference/ds.cbind.html +++ b/docs/reference/ds.cbind.html @@ -1,5 +1,5 @@ -Combines R objects by columns in the server-side — ds.cbind ‱ dsBaseClientCombines R objects by columns in the server-side — ds.cbind ‱ dsBaseClientChanges the reference level of a factor in the server-side — ds.changeRefGroup ‱ dsBaseClientChanges the reference level of a factor in the server-side — ds.changeRefGroup ‱ dsBaseClientClass of the R object in the server-side — ds.class ‱ dsBaseClientClass of the R object in the server-side — ds.class ‱ dsBaseClientProduces column names of the R object in the server-side — ds.colnames ‱ dsBaseClientProduces column names of the R object in the server-side — ds.colnames ‱ dsBaseClientIdentifies complete cases in server-side R objects — ds.completeCases ‱ dsBaseClientIdentifies complete cases in server-side R objects — ds.completeCases ‱ dsBaseClientGenerates a contour plot — ds.contourPlot ‱ dsBaseClientGenerates a contour plot — ds.contourPlot ‱ dsBaseClientCalculates the correlation of R objects in the server-side — ds.cor ‱ dsBaseClientCalculates the correlation of R objects in the server-side — ds.cor ‱ dsBaseClientTests for correlation between paired samples in the server-side — ds.corTest ‱ dsBaseClientTests for correlation between paired samples in the server-side — ds.corTest ‱ dsBaseClient @@ -75,7 +75,7 @@

    Arguments

    exact

    a logical indicating whether an exact p-value should be computed. Used for -Kendall's tau and Spearman's rho. See ‘Details’ of R stats function cor.test for +Kendall's tau and Spearman's rho. See Details of R stats function cor.test for the meaning of NULL (the default).

    @@ -162,11 +162,11 @@

    Examples

    -

    Site built with pkgdown 2.1.3.

    +

    Site built with pkgdown 2.2.0.

    diff --git a/docs/reference/ds.cov.html b/docs/reference/ds.cov.html index 2dc655be9..522dcfe3d 100644 --- a/docs/reference/ds.cov.html +++ b/docs/reference/ds.cov.html @@ -1,5 +1,5 @@ -Calculates the covariance of R objects in the server-side — ds.cov ‱ dsBaseClientCalculates the covariance of R objects in the server-side — ds.cov ‱ dsBaseClientGenerates a data frame object in the server-side — ds.dataFrame ‱ dsBaseClientGenerates a data frame object in the server-side — ds.dataFrame ‱ dsBaseClientCreates missing values columns in the server-side — ds.dataFrameFill ‱ dsBaseClientCreates missing values columns in the server-side — ds.dataFrameFill ‱ dsBaseClient @@ -150,11 +150,11 @@

    Examples

    -

    Site built with pkgdown 2.1.3.

    +

    Site built with pkgdown 2.2.0.

    diff --git a/docs/reference/ds.dataFrameSort.html b/docs/reference/ds.dataFrameSort.html index 98cd56ffa..137398e4f 100644 --- a/docs/reference/ds.dataFrameSort.html +++ b/docs/reference/ds.dataFrameSort.html @@ -1,5 +1,5 @@ -Sorts data frames in the server-side — ds.dataFrameSort ‱ dsBaseClientSorts data frames in the server-side — ds.dataFrameSort ‱ dsBaseClient @@ -171,11 +171,11 @@

    Examples

    -

    Site built with pkgdown 2.1.3.

    +

    Site built with pkgdown 2.2.0.

    diff --git a/docs/reference/ds.dataFrameSubset.html b/docs/reference/ds.dataFrameSubset.html index a6d549d29..43d94a193 100644 --- a/docs/reference/ds.dataFrameSubset.html +++ b/docs/reference/ds.dataFrameSubset.html @@ -1,5 +1,5 @@ -Sub-sets data frames in the server-side — ds.dataFrameSubset ‱ dsBaseClientSub-sets data frames in the server-side — ds.dataFrameSubset ‱ dsBaseClient @@ -63,7 +63,7 @@

    Arguments

    df.name
    -

    a character string providing the name of the data frame to be subseted.

    +

    a character string providing the name of the data frame to be subset.

    V1.name
    @@ -216,11 +216,11 @@

    Examples

    -

    Site built with pkgdown 2.1.3.

    +

    Site built with pkgdown 2.2.0.

    diff --git a/docs/reference/ds.densityGrid.html b/docs/reference/ds.densityGrid.html index b8931c146..8bea3f31a 100644 --- a/docs/reference/ds.densityGrid.html +++ b/docs/reference/ds.densityGrid.html @@ -1,5 +1,5 @@ -Generates a density grid in the client-side — ds.densityGrid ‱ dsBaseClientGenerates a density grid in the client-side — ds.densityGrid ‱ dsBaseClientRetrieves the dimension of a server-side R object — ds.dim ‱ dsBaseClientRetrieves the dimension of a server-side R object — ds.dim ‱ dsBaseClientCopy a clientside data.frame, matrix or tibble to the serverside — ds.dmtC2S ‱ dsBaseClientCopy a clientside data.frame, matrix or tibble to the serverside — ds.dmtC2S ‱ dsBaseClientBasis for a piecewise linear spline with meaningful coefficients — ds.elspline ‱ dsBaseClientBasis for a piecewise linear spline with meaningful coefficients — ds.elspline ‱ dsBaseClientChecks if an object is defined on the server-side — ds.exists ‱ dsBaseClientChecks if an object is defined on the server-side — ds.exists ‱ dsBaseClientComputes the exponentials in the server-side — ds.exp ‱ dsBaseClientComputes the exponentials in the server-side — ds.exp ‱ dsBaseClientSecure ranking of a vector across all sources and use of these ranks to estimate global quantiles across all studies — ds.extractQuantiles ‱ dsBaseClientSecure ranking of a vector across all sources and use of these ranks to estimate global quantiles across all studies — ds.extractQuantiles ‱ dsBaseClient -

    Developed by Paul Burton, Rebecca Wilson, Olly Butters, Patricia Ryser-Welch, Alex Westerberg, Leire Abarrategui, Roberto Villegas-Diaz, Demetris Avraam, Yannick Marcon, Stuart Wheater.

    +

    Developed by Paul Burton, Rebecca Wilson, Olly Butters, Patricia Ryser-Welch, Alex Westerberg, Leire Abarrategui, Roberto Villegas-Diaz, Demetris Avraam, Yannick Marcon, Tom Bishop, Amadou Gaye, Xavier EscribĂ -Montagut, Stuart Wheater.

    -

    Site built with pkgdown 2.1.3.

    +

    Site built with pkgdown 2.2.0.

    diff --git a/docs/reference/ds.forestplot.html b/docs/reference/ds.forestplot.html index 68c8d1dd3..81fa806d7 100644 --- a/docs/reference/ds.forestplot.html +++ b/docs/reference/ds.forestplot.html @@ -1,5 +1,5 @@ -Forestplot for SLMA models — ds.forestplot ‱ dsBaseClientForestplot for SLMA models — ds.forestplot ‱ dsBaseClientGeneralized Additive Models for Location Scale and Shape — ds.gamlss ‱ dsBaseClientAuthor
    -

    Site built with pkgdown 2.1.3.

    +

    Site built with pkgdown 2.2.0.

    diff --git a/docs/reference/ds.getWGSR.html b/docs/reference/ds.getWGSR.html index 502848fb8..0cdb583b4 100644 --- a/docs/reference/ds.getWGSR.html +++ b/docs/reference/ds.getWGSR.html @@ -1,5 +1,5 @@ -Computes the WHO Growth Reference z-scores of anthropometric data — ds.getWGSR ‱ dsBaseClientComputes the WHO Growth Reference z-scores of anthropometric data — ds.getWGSR ‱ dsBaseClientFits Generalized Linear Model — ds.glm ‱ dsBaseClientFits Generalized Linear Model — ds.glm ‱ dsBaseClientApplies predict.glm() to a serverside glm object — ds.glmPredict ‱ dsBaseClientApplies predict.glm() to a serverside glm object — ds.glmPredict ‱ dsBaseClientFit a Generalized Linear Model (GLM) with pooling via Study Level Meta-Analysis (SLMA) — ds.glmSLMA ‱ dsBaseClientFit a Generalized Linear Model (GLM) with pooling via Study Level Meta-Analysis (SLMA) — ds.glmSLMA ‱ dsBaseClientSummarize a glm object on the serverside — ds.glmSummary ‱ dsBaseClientSummarize a glm object on the serverside — ds.glmSummary ‱ dsBaseClientFits Generalized Linear Mixed-Effect Models via Study-Level Meta-Analysis — ds.glmerSLMA ‱ dsBaseClientFits Generalized Linear Mixed-Effect Models via Study-Level Meta-Analysis — ds.glmerSLMA ‱ dsBaseClientGenerates a Heat Map plot — ds.heatmapPlot ‱ dsBaseClientGenerates a Heat Map plot — ds.heatmapPlot ‱ dsBaseClient @@ -199,11 +199,11 @@

    Examples

    -

    Site built with pkgdown 2.1.3.

    +

    Site built with pkgdown 2.2.0.

    diff --git a/docs/reference/ds.hetcor.html b/docs/reference/ds.hetcor.html index d3765f393..1ac186669 100644 --- a/docs/reference/ds.hetcor.html +++ b/docs/reference/ds.hetcor.html @@ -1,5 +1,5 @@ -Heterogeneous Correlation Matrix — ds.hetcor ‱ dsBaseClientHeterogeneous Correlation Matrix — ds.hetcor ‱ dsBaseClient @@ -124,11 +124,11 @@

    Author

    -

    Site built with pkgdown 2.1.3.

    +

    Site built with pkgdown 2.2.0.

    diff --git a/docs/reference/ds.histogram.html b/docs/reference/ds.histogram.html index 842cac433..940021a56 100644 --- a/docs/reference/ds.histogram.html +++ b/docs/reference/ds.histogram.html @@ -1,5 +1,5 @@ -Generates a histogram plot — ds.histogram ‱ dsBaseClientGenerates a histogram plot — ds.histogram ‱ dsBaseClient @@ -190,11 +190,11 @@

    Examples

    -

    Site built with pkgdown 2.1.3.

    +

    Site built with pkgdown 2.2.0.

    diff --git a/docs/reference/ds.igb_standards.html b/docs/reference/ds.igb_standards.html index 99fadec3a..6a57aeb0a 100644 --- a/docs/reference/ds.igb_standards.html +++ b/docs/reference/ds.igb_standards.html @@ -1,5 +1,5 @@ -Converts birth measurements to intergrowth z-scores/centiles — ds.igb_standards ‱ dsBaseClientConverts birth measurements to intergrowth z-scores/centiles — ds.igb_standards ‱ dsBaseClient @@ -116,12 +116,18 @@

    Note

    References

    -

    International standards for newborn weight, length, and head circumference by -gestational age and sex: the Newborn Cross-Sectional Study of the INTERGROWTH-21st Project -Villar, José et al. The Lancet, Volume 384, Issue 9946, 857-868 -INTERGROWTH-21st very preterm size at birth reference charts. Lancet 2016 -doi.org/10.1016/S0140-6736(16) 00384-6. Villar, José et al.

    -
    + +
    • Villar, J., Ismail, L.C., Victora, C.G., Ohuma, E.O., Bertino, E., + Altman, D.G., Lambert, A., Papageorghiou, A.T., Carvalho, M., Jaffer, Y.A., + Gravett, M.G., Purwar, M., Frederick, I.O., Noble, A.J., Pang, R., Barros, + F.C., Chumlea, C., Bhutta, Z.A., Kennedy, S.H., 2014. International + standards for newborn weight, length, and head circumference by gestational + age and sex: the Newborn Cross-Sectional Study of the INTERGROWTH-21st + Project. The Lancet 384, 857–868. https://doi.org/10.1016/S0140-6736(14)60932-6

    • +
    • Villar, J., Giuliani, F., Fenton, T.R., Ohuma, E.O., Ismail, L.C., + Kennedy, S.H., 2016. INTERGROWTH-21st very preterm size at birth reference + charts. The Lancet 387, 844–845. https://doi.org/10.1016/S0140-6736(16)00384-6

    • +

    Author

    Demetris Avraam for DataSHIELD Development Team

    @@ -135,11 +141,11 @@

    Author

    -

    Site built with pkgdown 2.1.3.

    +

    Site built with pkgdown 2.2.0.

    diff --git a/docs/reference/ds.isNA.html b/docs/reference/ds.isNA.html index d4e1a7103..1f735c97b 100644 --- a/docs/reference/ds.isNA.html +++ b/docs/reference/ds.isNA.html @@ -1,5 +1,5 @@ -Checks if a server-side vector is empty — ds.isNA ‱ dsBaseClientChecks if a server-side vector is empty — ds.isNA ‱ dsBaseClientChecks if a server-side object is valid — ds.isValid ‱ dsBaseClientChecks if a server-side object is valid — ds.isValid ‱ dsBaseClientCalculates the kurtosis of a numeric variable — ds.kurtosis ‱ dsBaseClientCalculates the kurtosis of a numeric variable — ds.kurtosis ‱ dsBaseClient @@ -105,11 +105,11 @@

    Author

    -

    Site built with pkgdown 2.1.3.

    +

    Site built with pkgdown 2.2.0.

    diff --git a/docs/reference/ds.length.html b/docs/reference/ds.length.html index d4c7c3986..a7a4cb095 100644 --- a/docs/reference/ds.length.html +++ b/docs/reference/ds.length.html @@ -1,5 +1,5 @@ -Gets the length of an object in the server-side — ds.length ‱ dsBaseClientGets the length of an object in the server-side — ds.length ‱ dsBaseClientProduces levels attributes of a server-side factor — ds.levels ‱ dsBaseClientProduces levels attributes of a server-side factor — ds.levels ‱ dsBaseClientRepresents follow-up in multiple states on multiple time scales — ds.lexis ‱ dsBaseClientRepresents follow-up in multiple states on multiple time scales — ds.lexis ‱ dsBaseClientConstructs a list of objects in the server-side — ds.list ‱ dsBaseClientConstructs a list of objects in the server-side — ds.list ‱ dsBaseClient @@ -129,11 +129,11 @@

    Examples

    -

    Site built with pkgdown 2.1.3.

    +

    Site built with pkgdown 2.2.0.

    diff --git a/docs/reference/ds.listClientsideFunctions.html b/docs/reference/ds.listClientsideFunctions.html index 1ae293cf8..ccbeab882 100644 --- a/docs/reference/ds.listClientsideFunctions.html +++ b/docs/reference/ds.listClientsideFunctions.html @@ -1,5 +1,5 @@ -Lists client-side functions — ds.listClientsideFunctions ‱ dsBaseClientLists client-side functions — ds.listClientsideFunctions ‱ dsBaseClient @@ -86,11 +86,11 @@

    Examples

    -

    Site built with pkgdown 2.1.3.

    +

    Site built with pkgdown 2.2.0.

    diff --git a/docs/reference/ds.listDisclosureSettings.html b/docs/reference/ds.listDisclosureSettings.html index 8c9414980..de3b32fd4 100644 --- a/docs/reference/ds.listDisclosureSettings.html +++ b/docs/reference/ds.listDisclosureSettings.html @@ -1,5 +1,5 @@ -Lists disclosure settings — ds.listDisclosureSettings ‱ dsBaseClientLists disclosure settings — ds.listDisclosureSettings ‱ dsBaseClient @@ -162,11 +162,11 @@

    Examples

    -

    Site built with pkgdown 2.1.3.

    +

    Site built with pkgdown 2.2.0.

    diff --git a/docs/reference/ds.listOpals.html b/docs/reference/ds.listOpals.html index 0ad3682e1..664e3630b 100644 --- a/docs/reference/ds.listOpals.html +++ b/docs/reference/ds.listOpals.html @@ -1,5 +1,5 @@ -Lists all Opal objects in the analytic environment — ds.listOpals ‱ dsBaseClientLists all Opal objects in the analytic environment — ds.listOpals ‱ dsBaseClientLists server-side functions — ds.listServersideFunctions ‱ dsBaseClientLists server-side functions — ds.listServersideFunctions ‱ dsBaseClient @@ -124,11 +124,11 @@

    Examples

    -

    Site built with pkgdown 2.1.3.

    +

    Site built with pkgdown 2.2.0.

    diff --git a/docs/reference/ds.lmerSLMA.html b/docs/reference/ds.lmerSLMA.html index cda8ccb34..b4e045a6a 100644 --- a/docs/reference/ds.lmerSLMA.html +++ b/docs/reference/ds.lmerSLMA.html @@ -1,5 +1,5 @@ -Fits Linear Mixed-Effect model via Study-Level Meta-Analysis — ds.lmerSLMA ‱ dsBaseClientFits Linear Mixed-Effect model via Study-Level Meta-Analysis — ds.lmerSLMA ‱ dsBaseClientComputes logarithms in the server-side — ds.log ‱ dsBaseClientComputes logarithms in the server-side — ds.log ‱ dsBaseClientPerforms direct call to a server-side aggregate function — ds.look ‱ dsBaseClientPerforms direct call to a server-side aggregate function — ds.look ‱ dsBaseClientlists all objects on a server-side environment — ds.ls ‱ dsBaseClientlists all objects on a server-side environment — ds.ls ‱ dsBaseClientBasis for a piecewise linear spline with meaningful coefficients — ds.lspline ‱ dsBaseClientBasis for a piecewise linear spline with meaningful coefficients — ds.lspline ‱ dsBaseClientCalculates a new object in the server-side — ds.make ‱ dsBaseClientCalculates a new object in the server-side — ds.make ‱ dsBaseClientCreates a matrix on the server-side — ds.matrix ‱ dsBaseClientCreates a matrix on the server-side — ds.matrix ‱ dsBaseClientCalculates de determinant of a matrix in the server-side — ds.matrixDet ‱ dsBaseClientCalculates de determinant of a matrix in the server-side — ds.matrixDet ‱ dsBaseClientReturns matrix determinant to the client-side — ds.matrixDet.report ‱ dsBaseClientReturns matrix determinant to the client-side — ds.matrixDet.report ‱ dsBaseClientCalculates matrix diagonals in the server-side — ds.matrixDiag ‱ dsBaseClientCalculates matrix diagonals in the server-side — ds.matrixDiag ‱ dsBaseClientSpecifies the dimnames of the server-side matrix — ds.matrixDimnames ‱ dsBaseClientSpecifies the dimnames of the server-side matrix — ds.matrixDimnames ‱ dsBaseClientInverts a server-side square matrix — ds.matrixInvert ‱ dsBaseClientInverts a server-side square matrix — ds.matrixInvert ‱ dsBaseClient @@ -157,11 +157,11 @@

    Examples

    -

    Site built with pkgdown 2.1.3.

    +

    Site built with pkgdown 2.2.0.

    diff --git a/docs/reference/ds.matrixMult.html b/docs/reference/ds.matrixMult.html index 4f63091d4..5538c7394 100644 --- a/docs/reference/ds.matrixMult.html +++ b/docs/reference/ds.matrixMult.html @@ -1,5 +1,5 @@ -Calculates tow matrix multiplication in the server-side — ds.matrixMult ‱ dsBaseClientCalculates tow matrix multiplication in the server-side — ds.matrixMult ‱ dsBaseClientTransposes a server-side matrix — ds.matrixTranspose ‱ dsBaseClientTransposes a server-side matrix — ds.matrixTranspose ‱ dsBaseClient @@ -159,11 +159,11 @@

    Examples

    -

    Site built with pkgdown 2.1.3.

    +

    Site built with pkgdown 2.2.0.

    diff --git a/docs/reference/ds.mdPattern.html b/docs/reference/ds.mdPattern.html new file mode 100644 index 000000000..fc24cf0e9 --- /dev/null +++ b/docs/reference/ds.mdPattern.html @@ -0,0 +1,205 @@ + +Display missing data patterns with disclosure control — ds.mdPattern ‱ dsBaseClient + + +
    +
    + + + +
    +
    + + +
    +

    This function is a client-side wrapper for the server-side mdPatternDS +function. It generates a missing data pattern matrix similar to mice::md.pattern but +with disclosure control applied to prevent revealing small cell counts.

    +
    + +
    +
    ds.mdPattern(x = NULL, type = "split", datasources = NULL)
    +
    + +
    +

    Arguments

    + + +
    x
    +

    a character string specifying the name of a data frame or matrix on the +server-side containing the data to analyze.

    + + +
    type
    +

    a character string specifying the output type. If 'split' (default), +returns separate patterns for each study. If 'combine', attempts to pool patterns +across studies.

    + + +
    datasources
    +

    a list of DSConnection-class objects obtained +after login. If the datasources argument is not specified, the default set of +connections will be used: see datashield.connections_default.

    + +
    +
    +

    Value

    +

    For type='split': A list with one element per study, each containing:

    pattern
    +

    The missing data pattern matrix for that study

    + +
    valid
    +

    Logical indicating if all patterns meet disclosure requirements

    + +
    message
    +

    A message describing the validity status

    + + +

    For type='combine': A list containing:

    pattern
    +

    The pooled missing data pattern matrix across all studies

    + +
    valid
    +

    Logical indicating if all pooled patterns meet disclosure requirements

    + +
    message
    +

    A message describing the validity status

    + + +
    +
    +

    Details

    +

    The function calls the server-side mdPatternDS function which uses +mice::md.pattern to analyze missing data patterns. Patterns with counts below the +disclosure threshold (default: nfilter.tab = 3) are suppressed to maintain privacy.

    +

    Output Format: +- Each row represents a missing data pattern +- Pattern counts are shown in row names (e.g., "150", "25") +- Columns show 1 if the variable is observed, 0 if missing +- Last column shows the total number of missing values per pattern +- Last row shows the total number of missing values per variable

    +

    Disclosure Control:

    +

    Suppressed patterns (count below threshold) are indicated by: +- Row name: "suppressed(<N>)" where N is the threshold +- All pattern values set to NA +- Summary row also suppressed to prevent back-calculation

    +

    Pooling Behavior (type='combine'):

    +

    When pooling across studies, the function uses a conservative approach +for disclosure control:

    +

    1. Identifies identical missing patterns across studies +2. EXCLUDES suppressed patterns from pooling - patterns suppressed in + ANY study are not included in the pooled count +3. Sums counts only for non-suppressed identical patterns +4. Re-validates pooled counts against disclosure threshold

    +

    Important: This conservative approach means: +- Pooled counts may be underestimates if some studies had suppressed patterns +- This prevents disclosure through subtraction (e.g., if study A shows count=5 + and pool shows count=7, one could deduce study B has count=2, violating disclosure) +- Different patterns across studies are preserved separately in the pooled result

    +
    +
    +

    Author

    +

    Xavier EscribĂ  montagut for DataSHIELD Development Team

    +
    + +
    +

    Examples

    +
    if (FALSE) { # \dontrun{
    + ## Version 6, for version 5 see the Wiki
    +
    +  # Connecting to the Opal servers
    +
    +  require('DSI')
    +  require('DSOpal')
    +  require('dsBaseClient')
    +
    +  builder <- DSI::newDSLoginBuilder()
    +  builder$append(server = "study1",
    +                 url = "http://192.168.56.100:8080/",
    +                 user = "administrator", password = "datashield_test&",
    +                 table = "CNSIM.CNSIM1", driver = "OpalDriver")
    +  builder$append(server = "study2",
    +                 url = "http://192.168.56.100:8080/",
    +                 user = "administrator", password = "datashield_test&",
    +                 table = "CNSIM.CNSIM2", driver = "OpalDriver")
    +  logindata <- builder$build()
    +
    +  connections <- DSI::datashield.login(logins = logindata, assign = TRUE, symbol = "D")
    +
    +  # Get missing data patterns for each study separately
    +  patterns_split <- ds.mdPattern(x = "D", type = "split", datasources = connections)
    +
    +  # View results for study1
    +  print(patterns_split$study1$pattern)
    +  #      var1 var2 var3
    +  # 150    1    1    1  0    <- 150 obs complete
    +  #  25    0    1    1  1    <- 25 obs missing var1
    +  #       25    0    0 25    <- Summary: 25 missing per variable
    +
    +  # Get pooled missing data patterns across studies
    +  patterns_pooled <- ds.mdPattern(x = "D", type = "combine", datasources = connections)
    +  print(patterns_pooled$pattern)
    +
    +  # Example with suppressed patterns:
    +  # If study1 has a pattern with count=2 (suppressed) and study2 has same pattern 
    +  # with count=5 (valid), the pooled result will show count=5 (conservative approach)
    +  # A warning will indicate: "Pooled counts may underestimate the true total"
    +
    +  # Clear the Datashield R sessions and logout
    +  datashield.logout(connections)
    +} # }
    +
    +
    +
    +
    + +
    + + +
    + +
    +

    Site built with pkgdown 2.2.0.

    +
    + +
    + + + + + + + + diff --git a/docs/reference/ds.mean.html b/docs/reference/ds.mean.html index fa5044906..1ae3e1e52 100644 --- a/docs/reference/ds.mean.html +++ b/docs/reference/ds.mean.html @@ -1,5 +1,5 @@ -Computes server-side vector statistical mean — ds.mean ‱ dsBaseClientComputes server-side vector statistical mean — ds.mean ‱ dsBaseClientComputes the mean and standard deviation across categories — ds.meanByClass ‱ dsBaseClientComputes the mean and standard deviation across categories — ds.meanByClass ‱ dsBaseClientComputes the mean and standard deviation across groups defined by one factor — ds.meanSdGp ‱ dsBaseClientComputes the mean and standard deviation across groups defined by one factor — ds.meanSdGp ‱ dsBaseClientMerges two data frames in the server-side — ds.merge ‱ dsBaseClientMerges two data frames in the server-side — ds.merge ‱ dsBaseClientReturns server-side messages to the client-side — ds.message ‱ dsBaseClientReturns server-side messages to the client-side — ds.message ‱ dsBaseClientGets the metadata associated with a variable held on the server — ds.metadata ‱ dsBaseClientGets the metadata associated with a variable held on the server — ds.metadata ‱ dsBaseClientMultivariate Imputation by Chained Equations — ds.mice ‱ dsBaseClientMultivariate Imputation by Chained Equations — ds.mice ‱ dsBaseClient -

    Developed by Paul Burton, Rebecca Wilson, Olly Butters, Patricia Ryser-Welch, Alex Westerberg, Leire Abarrategui, Roberto Villegas-Diaz, Demetris Avraam, Yannick Marcon, Stuart Wheater.

    +

    Developed by Paul Burton, Rebecca Wilson, Olly Butters, Patricia Ryser-Welch, Alex Westerberg, Leire Abarrategui, Roberto Villegas-Diaz, Demetris Avraam, Yannick Marcon, Tom Bishop, Amadou Gaye, Xavier EscribĂ -Montagut, Stuart Wheater.

    -

    Site built with pkgdown 2.1.3.

    +

    Site built with pkgdown 2.2.0.

    diff --git a/docs/reference/ds.names.html b/docs/reference/ds.names.html index 312b4e817..25e3ca7f6 100644 --- a/docs/reference/ds.names.html +++ b/docs/reference/ds.names.html @@ -1,5 +1,5 @@ -Return the names of a list object — ds.names ‱ dsBaseClientReturn the names of a list object — ds.names ‱ dsBaseClient @@ -142,11 +142,11 @@

    Examples

    -

    Site built with pkgdown 2.1.3.

    +

    Site built with pkgdown 2.2.0.

    diff --git a/docs/reference/ds.ns.html b/docs/reference/ds.ns.html index d93099820..63b15c3c5 100644 --- a/docs/reference/ds.ns.html +++ b/docs/reference/ds.ns.html @@ -1,5 +1,5 @@ -Generate a Basis Matrix for Natural Cubic Splines — ds.ns ‱ dsBaseClientGenerate a Basis Matrix for Natural Cubic Splines — ds.ns ‱ dsBaseClientGets the number of missing values in a server-side vector — ds.numNA ‱ dsBaseClientGets the number of missing values in a server-side vector — ds.numNA ‱ dsBaseClientBasis for a piecewise linear spline with meaningful coefficients — ds.qlspline ‱ dsBaseClientBasis for a piecewise linear spline with meaningful coefficients — ds.qlspline ‱ dsBaseClientComputes the quantiles of a server-side variable — ds.quantileMean ‱ dsBaseClientComputes the quantiles of a server-side variable — ds.quantileMean ‱ dsBaseClientGenerates Binomial distribution in the server-side — ds.rBinom ‱ dsBaseClientGenerates Binomial distribution in the server-side — ds.rBinom ‱ dsBaseClientGenerates Normal distribution in the server-side — ds.rNorm ‱ dsBaseClientGenerates Normal distribution in the server-side — ds.rNorm ‱ dsBaseClientGenerates Poisson distribution in the server-side — ds.rPois ‱ dsBaseClientGenerates Poisson distribution in the server-side — ds.rPois ‱ dsBaseClientGenerates Uniform distribution in the server-side — ds.rUnif ‱ dsBaseClientGenerates Uniform distribution in the server-side — ds.rUnif ‱ dsBaseClientSecure ranking of a vector across all sources — ds.ranksSecure ‱ dsBaseClientSecure ranking of a vector across all sources — ds.ranksSecure ‱ dsBaseClient @@ -42,7 +42,7 @@

    Secure ranking of a vector across all sources

    Securely generate the ranks of a numeric vector and estimate -true qlobal quantiles across all data sources simultaneously

    +true global quantiles across all data sources simultaneously

    @@ -102,7 +102,7 @@

    Arguments

    of the clusters of values that are being ranked such that some values are treated as being missing and the processing stops, then setting generate.quantiles to FALSE allows the generation of ranks to complete so -they can then be used for non-parameteric analysis, even if the key values +they can then be used for non-parametric analysis, even if the key values cannot be estimated. A real example of an unusual configuration was in a reasonably large dataset of survival times, where a substantial proportion of survival profiles were censored at precisely 10 years. This meant that @@ -278,11 +278,11 @@

    Author

    -

    Site built with pkgdown 2.1.3.

    +

    Site built with pkgdown 2.2.0.

    diff --git a/docs/reference/ds.rbind.html b/docs/reference/ds.rbind.html index c7431a74b..e0995494e 100644 --- a/docs/reference/ds.rbind.html +++ b/docs/reference/ds.rbind.html @@ -1,5 +1,5 @@ -Combines R objects by rows in the server-side — ds.rbind ‱ dsBaseClientCombines R objects by rows in the server-side — ds.rbind ‱ dsBaseClientReshapes server-side grouped data — ds.reShape ‱ dsBaseClientReshapes server-side grouped data — ds.reShape ‱ dsBaseClientRecodes the levels of a server-side factor vector — ds.recodeLevels ‱ dsBaseClientRecodes the levels of a server-side factor vector — ds.recodeLevels ‱ dsBaseClient @@ -144,11 +144,11 @@

    Examples

    -

    Site built with pkgdown 2.1.3.

    +

    Site built with pkgdown 2.2.0.

    diff --git a/docs/reference/ds.recodeValues.html b/docs/reference/ds.recodeValues.html index 7557fb81b..27efd8e07 100644 --- a/docs/reference/ds.recodeValues.html +++ b/docs/reference/ds.recodeValues.html @@ -1,5 +1,5 @@ -Recodes server-side variable values — ds.recodeValues ‱ dsBaseClientRecodes server-side variable values — ds.recodeValues ‱ dsBaseClientCreates a repetitive sequence in the server-side — ds.rep ‱ dsBaseClientCreates a repetitive sequence in the server-side — ds.rep ‱ dsBaseClientReplaces the missing values in a server-side vector — ds.replaceNA ‱ dsBaseClientReplaces the missing values in a server-side vector — ds.replaceNA ‱ dsBaseClientDeletes server-side R objects — ds.rm ‱ dsBaseClientDeletes server-side R objects — ds.rm ‱ dsBaseClient @@ -140,11 +140,11 @@

    Examples

    -

    Site built with pkgdown 2.1.3.

    +

    Site built with pkgdown 2.2.0.

    diff --git a/docs/reference/ds.rowColCalc.html b/docs/reference/ds.rowColCalc.html index a63f57653..d308880c2 100644 --- a/docs/reference/ds.rowColCalc.html +++ b/docs/reference/ds.rowColCalc.html @@ -1,5 +1,5 @@ -Computes rows and columns sums and means in the server-side — ds.rowColCalc ‱ dsBaseClientComputes rows and columns sums and means in the server-side — ds.rowColCalc ‱ dsBaseClientPerforms random sampling and permuting of vectors, dataframes and matrices — ds.sample ‱ dsBaseClientPerforms random sampling and permuting of vectors, dataframes and matrices — ds.sample ‱ dsBaseClientGenerates non-disclosive scatter plots — ds.scatterPlot ‱ dsBaseClientGenerates non-disclosive scatter plots — ds.scatterPlot ‱ dsBaseClientGenerates a sequence in the server-side — ds.seq ‱ dsBaseClientGenerates a sequence in the server-side — ds.seq ‱ dsBaseClientCreates a default set of Opal objects called 'default.opals' — ds.setDefaultOpals ‱ dsBaseClientCreates a default set of Opal objects called 'default.opals' — ds.setDefaultOpals ‱ dsBaseClient @@ -17,7 +17,7 @@ dsBaseClient - 6.3.3 + 6.3.5-9000 @@ -93,11 +93,11 @@

    Author

    -

    Site built with pkgdown 2.1.3.

    +

    Site built with pkgdown 2.2.0.

    diff --git a/docs/reference/ds.setSeed.html b/docs/reference/ds.setSeed.html index 0feac487d..e221dab61 100644 --- a/docs/reference/ds.setSeed.html +++ b/docs/reference/ds.setSeed.html @@ -1,5 +1,5 @@ -Server-side random number generation — ds.setSeed ‱ dsBaseClientServer-side random number generation — ds.setSeed ‱ dsBaseClient @@ -156,11 +156,11 @@

    Examples

    -

    Site built with pkgdown 2.1.3.

    +

    Site built with pkgdown 2.2.0.

    diff --git a/docs/reference/ds.skewness.html b/docs/reference/ds.skewness.html index 39733b961..fe5647037 100644 --- a/docs/reference/ds.skewness.html +++ b/docs/reference/ds.skewness.html @@ -1,5 +1,5 @@ -Calculates the skewness of a server-side numeric variable — ds.skewness ‱ dsBaseClientCalculates the skewness of a server-side numeric variable — ds.skewness ‱ dsBaseClientComputes the square root values of a variable — ds.sqrt ‱ dsBaseClientComputes the square root values of a variable — ds.sqrt ‱ dsBaseClientGenerates a valid subset of a table or a vector — ds.subset ‱ dsBaseClientGenerates a valid subset of a table or a vector — ds.subset ‱ dsBaseClient @@ -19,7 +19,7 @@ dsBaseClient - 6.3.3 + 6.4.0.9000 @@ -43,8 +43,8 @@

    Generates a valid subset of a table or a vector

    The function uses the R classical subsetting with squared brackets '[]' and allows also to -subset using a logical oprator and a threshold. The object to subset from must be a vector (factor, numeric -or charcater) or a table (data.frame or matrix).

    +subset using a logical operator and a threshold. The object to subset from must be a vector (factor, numeric +or character) or a table (data.frame or matrix).

    @@ -107,7 +107,7 @@

    Value

    Details

    (1) If the input data is a table the user specifies the rows and/or columns to include in the subset; the columns can be -refered to by their names. Table subsetting can also be done using the name of a variable and a threshold (see example 3). +referred to by their names. Table subsetting can also be done using the name of a variable and a threshold (see example 3). (2) If the input data is a vector and the parameters 'rows', 'logical' and 'threshold' are all provided the last two are ignored (i.e. 'rows' has precedence over the other two parameters then). IMPORTANT NOTE: If the requested subset is not valid (i.e. contains less than the allowed number of observations) all the values are @@ -115,7 +115,7 @@

    Details

    See also

    -

    ds.subsetByClass to subset by the classes of factor vector(s).

    +

    ds.subsetByClass to subset by the classes of factor vector(s).

    ds.meanByClass to compute mean and standard deviation across categories of a factor vectors.

    @@ -180,11 +180,11 @@

    Examples

    -

    Site built with pkgdown 2.1.3.

    +

    Site built with pkgdown 2.2.0.

    diff --git a/docs/reference/ds.subsetByClass.html b/docs/reference/ds.subsetByClass.html index 024ebff5a..f7327c760 100644 --- a/docs/reference/ds.subsetByClass.html +++ b/docs/reference/ds.subsetByClass.html @@ -1,5 +1,5 @@ -Generates valid subset(s) of a data frame or a factor — ds.subsetByClass ‱ dsBaseClientGenerates valid subset(s) of a data frame or a factor — ds.subsetByClass ‱ dsBaseClientGenerates the summary of a server-side object — ds.summary ‱ dsBaseClientGenerates the summary of a server-side object — ds.summary ‱ dsBaseClient @@ -139,11 +139,11 @@

    Examples

    -

    Site built with pkgdown 2.1.3.

    +

    Site built with pkgdown 2.2.0.

    diff --git a/docs/reference/ds.table.html b/docs/reference/ds.table.html index 419d69d15..17761a15a 100644 --- a/docs/reference/ds.table.html +++ b/docs/reference/ds.table.html @@ -1,5 +1,5 @@ -Generates 1-, 2-, and 3-dimensional contingency tables with option of assigning to serverside only and producing chi-squared statistics — ds.table ‱ dsBaseClientGenerates 1-, 2-, and 3-dimensional contingency tables with option of assigning to serverside only and producing chi-squared statistics — ds.table ‱ dsBaseClientGenerates 1-dimensional contingency tables — ds.table1D ‱ dsBaseClientGenerates 1-dimensional contingency tables — ds.table1D ‱ dsBaseClientGenerates 2-dimensional contingency tables — ds.table2D ‱ dsBaseClientGenerates 2-dimensional contingency tables — ds.table2D ‱ dsBaseClientApplies a Function Over a Ragged Array on the server-side — ds.tapply.assign ‱ dsBaseClientApplies a Function Over a Ragged Array on the server-side — ds.tapply.assign ‱ dsBaseClientApplies a Function Over a Server-Side Ragged Array — ds.tapply ‱ dsBaseClientApplies a Function Over a Server-Side Ragged Array — ds.tapply ‱ dsBaseClientChecks if an R object exists on the server-side — ds.testObjExists ‱ dsBaseClientChecks if an R object exists on the server-side — ds.testObjExists ‱ dsBaseClientFlattens Server-Side Lists — ds.unList ‱ dsBaseClientFlattens Server-Side Lists — ds.unList ‱ dsBaseClientPerform 'unique' on a variable on the server-side — ds.unique ‱ dsBaseClientPerform 'unique' on a variable on the server-side — ds.unique ‱ dsBaseClient @@ -52,7 +52,7 @@

    Arguments

    x.name
    -

    a character string providing the name of the varable, in the server, to perform unique upon

    +

    a character string providing the name of the variable, in the server, to perform unique upon

    newobj
    @@ -122,11 +122,11 @@

    Examples

    -

    Site built with pkgdown 2.1.3.

    +

    Site built with pkgdown 2.2.0.

    diff --git a/docs/reference/ds.var.html b/docs/reference/ds.var.html index 91d043207..cf468f0fc 100644 --- a/docs/reference/ds.var.html +++ b/docs/reference/ds.var.html @@ -1,5 +1,5 @@ -Computes server-side vector variance — ds.var ‱ dsBaseClientComputes server-side vector variance — ds.var ‱ dsBaseClient @@ -153,11 +153,11 @@

    Examples

    -

    Site built with pkgdown 2.1.3.

    +

    Site built with pkgdown 2.2.0.

    diff --git a/docs/reference/ds.vectorCalc.html b/docs/reference/ds.vectorCalc.html index 902c6a46f..14adb046c 100644 --- a/docs/reference/ds.vectorCalc.html +++ b/docs/reference/ds.vectorCalc.html @@ -1,5 +1,5 @@ -Performs a mathematical operation on two or more vectors — ds.vectorCalc ‱ dsBaseClientPerforms a mathematical operation on two or more vectors — ds.vectorCalc ‱ dsBaseClientSplits character by '$' and returns the single characters — extract ‱ dsBaseClientSplits character by '$' and returns the single characters — extract ‱ dsBaseClient @@ -72,11 +72,11 @@

    Details

    -

    Site built with pkgdown 2.1.3.

    +

    Site built with pkgdown 2.2.0.

    diff --git a/docs/reference/getPooledMean.html b/docs/reference/getPooledMean.html index ec53ec914..51656de6e 100644 --- a/docs/reference/getPooledMean.html +++ b/docs/reference/getPooledMean.html @@ -1,5 +1,5 @@ -Gets a pooled statistical mean — getPooledMean ‱ dsBaseClientGets a pooled statistical mean — getPooledMean ‱ dsBaseClient @@ -79,11 +79,11 @@

    Details

    -

    Site built with pkgdown 2.1.3.

    +

    Site built with pkgdown 2.2.0.

    diff --git a/docs/reference/getPooledVar.html b/docs/reference/getPooledVar.html index 16cc1c6a3..36de0a71a 100644 --- a/docs/reference/getPooledVar.html +++ b/docs/reference/getPooledVar.html @@ -1,5 +1,5 @@ -Gets a pooled variance — getPooledVar ‱ dsBaseClientGets a pooled variance — getPooledVar ‱ dsBaseClient @@ -79,11 +79,11 @@

    Details

    -

    Site built with pkgdown 2.1.3.

    +

    Site built with pkgdown 2.2.0.

    diff --git a/docs/reference/glmChecks.html b/docs/reference/glmChecks.html index d89ad3fcf..dbb063002 100644 --- a/docs/reference/glmChecks.html +++ b/docs/reference/glmChecks.html @@ -1,6 +1,6 @@ -Checks if the elements in the glm model have the right characteristics — glmChecks ‱ dsBaseClientChecks if the elements in the glm model have the right characteristics — glmChecks ‱ dsBaseClient @@ -42,7 +42,7 @@

    Checks if the elements in the glm model have the right characteristics

    This is an internal function required by the client function ds.glm -to verify all the variables and ensure the process does not halt inadvertanly.

    +to verify all the variables and ensure the process does not halt inadvertently

    @@ -63,7 +63,7 @@

    Arguments

    offset
    -

    null or a numreric vector that can be used to specify an a priori known component to be +

    null or a numeric vector that can be used to specify an a priori known component to be included in the linear predictor during fitting.

    @@ -84,7 +84,7 @@

    Value

    Details

    the variables are checked to ensure they are defined, not empty (i.e. are not missing -at complete) and evantually (if 'offset' or 'weights') are of 'numeric' with non negative value +at complete) and eventually (if 'offset' or 'weights') are of 'numeric' with non negative value (if 'weights').

    @@ -100,11 +100,11 @@

    Author

    -

    Site built with pkgdown 2.1.3.

    +

    Site built with pkgdown 2.2.0.

    diff --git a/docs/reference/index.html b/docs/reference/index.html index be77a4283..552bc44ee 100644 --- a/docs/reference/index.html +++ b/docs/reference/index.html @@ -1,5 +1,5 @@ -Package index ‱ dsBaseClientPackage index ‱ dsBaseClient @@ -42,10 +42,6 @@

    All functions

    -

    computeWeightedMeans()

    - -

    Compute Weighted Mean by Group

    -

    ds.Boole()

    Converts a server-side R object into Boolean indicators

    @@ -357,6 +353,10 @@

    All functions ds.matrixTranspose()

    Transposes a server-side matrix

    + +

    ds.mdPattern()

    + +

    Display missing data patterns with disclosure control

    ds.mean()

    @@ -481,6 +481,10 @@

    All functions ds.sqrt()

    Computes the square root values of a variable

    + +

    ds.subset()

    + +

    Generates a valid subset of a table or a vector

    ds.summary()

    @@ -534,11 +538,11 @@

    All functions
    -

    Site built with pkgdown 2.1.3.

    +

    Site built with pkgdown 2.2.0.

    diff --git a/docs/reference/isAssigned.html b/docs/reference/isAssigned.html index c521d262c..6273e9e60 100644 --- a/docs/reference/isAssigned.html +++ b/docs/reference/isAssigned.html @@ -1,5 +1,5 @@ -Checks an object has been generated on the server side — isAssigned ‱ dsBaseClientChecks an object has been generated on the server side — isAssigned ‱ dsBaseClient @@ -80,11 +80,11 @@

    Details

    -

    Site built with pkgdown 2.1.3.

    +

    Site built with pkgdown 2.2.0.

    diff --git a/docs/reference/isDefined.html b/docs/reference/isDefined.html index 19bebebe0..c601e6444 100644 --- a/docs/reference/isDefined.html +++ b/docs/reference/isDefined.html @@ -1,5 +1,5 @@ -Checks if the objects are defined in all studies — isDefined ‱ dsBaseClientChecks if the objects are defined in all studies — isDefined ‱ dsBaseClient @@ -91,11 +91,11 @@

    Author

    -

    Site built with pkgdown 2.1.3.

    +

    Site built with pkgdown 2.2.0.

    diff --git a/docs/reference/logical2int.html b/docs/reference/logical2int.html index 4e925bb0f..730bcb433 100644 --- a/docs/reference/logical2int.html +++ b/docs/reference/logical2int.html @@ -1,5 +1,5 @@ -Turns a logical operator into an integer — logical2int ‱ dsBaseClientTurns a logical operator into an integer — logical2int ‱ dsBaseClient @@ -17,7 +17,7 @@ dsBaseClient - 6.3.3 + 6.4.0.9000 @@ -61,7 +61,7 @@

    Value

    Details

    -

    This function is called to turn a logical oprator given as a +

    This function is called to turn a logical operator given as a character into an integer: '>' is turned into 1, '>=' into 2, '<' into 3, '<=' into 4, '==' into 5 and '!=' into 6.

    @@ -74,11 +74,11 @@

    Details

    -

    Site built with pkgdown 2.1.3.

    +

    Site built with pkgdown 2.2.0.

    diff --git a/docs/reference/meanByClassHelper0a.html b/docs/reference/meanByClassHelper0a.html index 150c99086..f5dc12aa4 100644 --- a/docs/reference/meanByClassHelper0a.html +++ b/docs/reference/meanByClassHelper0a.html @@ -1,5 +1,5 @@ -Computes the mean values of a numeric vector across a factor vector — meanByClassHelper0a ‱ dsBaseClientComputes the mean values of a numeric vector across a factor vector — meanByClassHelper0a ‱ dsBaseClient @@ -62,7 +62,7 @@

    Arguments

    type

    a character which represents the type of analysis to carry out. If type is set to 'combine', a pooled table of results is generated. If type is set to 'split', a table of results -is genrated for each study.

    +is generated for each study.

    datasources
    @@ -93,11 +93,11 @@

    Author

    -

    Site built with pkgdown 2.1.3.

    +

    Site built with pkgdown 2.2.0.

    diff --git a/docs/reference/meanByClassHelper0b.html b/docs/reference/meanByClassHelper0b.html index 79e7419fb..b4bc1732e 100644 --- a/docs/reference/meanByClassHelper0b.html +++ b/docs/reference/meanByClassHelper0b.html @@ -1,5 +1,5 @@ -Runs the computation if variables are within a table structure — meanByClassHelper0b ‱ dsBaseClientRuns the computation if variables are within a table structure — meanByClassHelper0b ‱ dsBaseClient @@ -66,7 +66,7 @@

    Arguments

    type

    a character which represents the type of analysis to carry out. If type is set to 'combine', a pooled table of results is generated. If type is set to 'split', a table of results -is genrated for each study.

    +is generated for each study.

    datasources
    @@ -82,7 +82,7 @@

    Value

    Details

    This function is called by the function 'ds.meanByClass' to produce the final tables -if the user soecify a table structure.

    +if the user specify a table structure.

    Author

    @@ -97,11 +97,11 @@

    Author

    -

    Site built with pkgdown 2.1.3.

    +

    Site built with pkgdown 2.2.0.

    diff --git a/docs/reference/meanByClassHelper1.html b/docs/reference/meanByClassHelper1.html index 50668b68f..867357783 100644 --- a/docs/reference/meanByClassHelper1.html +++ b/docs/reference/meanByClassHelper1.html @@ -1,5 +1,5 @@ -Generates subset tables — meanByClassHelper1 ‱ dsBaseClientGenerates subset tables — meanByClassHelper1 ‱ dsBaseClient @@ -90,11 +90,11 @@

    Author

    -

    Site built with pkgdown 2.1.3.

    +

    Site built with pkgdown 2.2.0.

    diff --git a/docs/reference/meanByClassHelper2.html b/docs/reference/meanByClassHelper2.html index 328d6ac03..6f6c84f57 100644 --- a/docs/reference/meanByClassHelper2.html +++ b/docs/reference/meanByClassHelper2.html @@ -1,5 +1,5 @@ -Generates a table for pooled results — meanByClassHelper2 ‱ dsBaseClientGenerates a table for pooled results — meanByClassHelper2 ‱ dsBaseClient @@ -65,7 +65,7 @@

    Arguments

    invalidrecorder
    -

    a list, holds informations about invalid subsets in each study.

    +

    a list, holds information about invalid subsets in each study.

    @@ -76,7 +76,7 @@

    Value

    Details

    This function is called by the function 'ds.meanByClass' to produce the final table -if the user sets the parmater 'type' to combine (the default behaviour of 'ds.meanByClass').

    +if the user sets the parameter 'type' to combine (the default behaviour of 'ds.meanByClass').

    Author

    @@ -91,11 +91,11 @@

    Author

    -

    Site built with pkgdown 2.1.3.

    +

    Site built with pkgdown 2.2.0.

    diff --git a/docs/reference/meanByClassHelper3.html b/docs/reference/meanByClassHelper3.html index 80835e85f..a7a93c9b4 100644 --- a/docs/reference/meanByClassHelper3.html +++ b/docs/reference/meanByClassHelper3.html @@ -1,5 +1,5 @@ -Generates results tables for each study separately — meanByClassHelper3 ‱ dsBaseClientGenerates results tables for each study separately — meanByClassHelper3 ‱ dsBaseClient @@ -65,7 +65,7 @@

    Arguments

    invalidrecorder
    -

    a list, holds informations about invalid subsets in each study

    +

    a list, holds information about invalid subsets in each study

    @@ -75,7 +75,7 @@

    Value

    Details

    This function is called by the function 'ds.meanByClass' to produce the final tables -if the user sets the parmater 'type' to 'split'.

    +if the user sets the parameter 'type' to 'split'.

    Author

    @@ -90,11 +90,11 @@

    Author

    -

    Site built with pkgdown 2.1.3.

    +

    Site built with pkgdown 2.2.0.

    diff --git a/docs/reference/meanByClassHelper4.html b/docs/reference/meanByClassHelper4.html index 1a2dd5e44..5ed4bc7dd 100644 --- a/docs/reference/meanByClassHelper4.html +++ b/docs/reference/meanByClassHelper4.html @@ -1,5 +1,5 @@ -Gets the subset tables out of the list (i.e. unlist) — meanByClassHelper4 ‱ dsBaseClientGets the subset tables out of the list (i.e. unlist) — meanByClassHelper4 ‱ dsBaseClient @@ -100,11 +100,11 @@

    Author

    -

    Site built with pkgdown 2.1.3.

    +

    Site built with pkgdown 2.2.0.

    diff --git a/docs/reference/rowPercent.html b/docs/reference/rowPercent.html index 9e5db1e70..40a77a5dc 100644 --- a/docs/reference/rowPercent.html +++ b/docs/reference/rowPercent.html @@ -1,5 +1,5 @@ -Produces row percentages — rowPercent ‱ dsBaseClientProduces row percentages — rowPercent ‱ dsBaseClient @@ -76,11 +76,11 @@

    Author

    -

    Site built with pkgdown 2.1.3.

    +

    Site built with pkgdown 2.2.0.

    diff --git a/docs/reference/subsetHelper.html b/docs/reference/subsetHelper.html index 53e88d63e..bc97b31b9 100644 --- a/docs/reference/subsetHelper.html +++ b/docs/reference/subsetHelper.html @@ -1,5 +1,5 @@ -Ensures that the requested subset is not larger than the original object — subsetHelper ‱ dsBaseClientEnsures that the requested subset is not larger than the original object — subsetHelper ‱ dsBaseClient @@ -17,7 +17,7 @@ dsBaseClient - 6.3.3 + 6.3.5-9000 @@ -131,11 +131,11 @@

    Examples

    -

    Site built with pkgdown 2.1.3.

    +

    Site built with pkgdown 2.2.0.

    diff --git a/docs/sitemap.xml b/docs/sitemap.xml index e2d8de7e3..842ccdb57 100644 --- a/docs/sitemap.xml +++ b/docs/sitemap.xml @@ -6,6 +6,7 @@ /reference/checkClass.html /reference/colPercent.html /reference/computeWeightedMeans.html +/reference/dot-pool_md_patterns.html /reference/ds.Boole.html /reference/ds.abs.html /reference/ds.asCharacter.html @@ -85,6 +86,7 @@ /reference/ds.matrixInvert.html /reference/ds.matrixMult.html /reference/ds.matrixTranspose.html +/reference/ds.mdPattern.html /reference/ds.mean.html /reference/ds.meanByClass.html /reference/ds.meanSdGp.html diff --git a/dsBase_6.4.0.9000-permissive.tar.gz b/dsBase_6.4.0-permissive.tar.gz similarity index 100% rename from dsBase_6.4.0.9000-permissive.tar.gz rename to dsBase_6.4.0-permissive.tar.gz diff --git a/dsBase_6.4.0.9000.tar.gz b/dsBase_6.4.0.tar.gz similarity index 100% rename from dsBase_6.4.0.9000.tar.gz rename to dsBase_6.4.0.tar.gz diff --git a/dsDanger_6.3.1.tar.gz b/dsDanger_6.3.1.tar.gz deleted file mode 100644 index 56375b808..000000000 Binary files a/dsDanger_6.3.1.tar.gz and /dev/null differ diff --git a/dsDanger_6.3.4.tar.gz b/dsDanger_6.3.4.tar.gz new file mode 100644 index 000000000..25ca59feb Binary files /dev/null and b/dsDanger_6.3.4.tar.gz differ diff --git a/inst/CITATION b/inst/CITATION new file mode 100644 index 000000000..cf856ce67 --- /dev/null +++ b/inst/CITATION @@ -0,0 +1,134 @@ +bibentry("Manual", + other = unlist(citation(auto = meta), recursive = FALSE)) + +bibentry( + bibtype = "Article", + title = "{DataSHIELD: taking the analysis to the data, not the data to the analysis}", + author = c( + person("Amadou", "Gaye"), + person("Yannick", "Marcon"), + person("Julia", "Isaeva"), + person("Philippe", "{LaFlamme}"), + person("Andrew", "Turner"), + person("Elinor M", "Jones"), + person("Joel", "Minion"), + person("Andrew W", "Boyd"), + person("Christopher J", "Newby"), + person("Marja-Liisa", "Nuotio"), + person("Rebecca", "Wilson"), + person("Oliver", "Butters"), + person("Barnaby", "Murtagh"), + person("Ipek", "Demir"), + person("Dany", "Doiron"), + person("Lisette", "Giepmans"), + person("Susan E", "Wallace"), + person("Isabelle", "Budin-Lj{\\o}sne"), + person("Carsten O.", "Schmidt"), + person("Paolo", "Boffetta"), + person("Mathieu", "Boniol"), + person("Maria", "Bota"), + person("Kim W", "Carter"), + person("Nick", "{deKlerk}"), + person("Chris", "Dibben"), + person("Richard W", "Francis"), + person("Tero", "Hiekkalinna"), + person("Kristian", "Hveem"), + person("Kirsti", "Kval{\\o}y"), + person("Sean", "Millar"), + person("Ivan J", "Perry"), + person("Annette", "Peters"), + person("Catherine M", "Phillips"), + person("Frank", "Popham"), + person("Gillian", "Raab"), + person("Eva", "Reischl"), + person("Nuala", "Sheehan"), + person("Melanie", "Waldenberger"), + person("Markus", "Perola"), + person("Edwin", "{van den Heuvel}"), + person("John", "Macleod"), + person("Bartha M", "Knoppers"), + person("Ronald P", "Stolk"), + person("Isabel", "Fortier"), + person("Jennifer R", "Harris"), + person("Bruce H R", "Woffenbuttel"), + person("Madeleine J", "Murtagh"), + person("Vincent", "Ferretti"), + person("Paul R", "Burton") + ), + journal = "International Journal of Epidemiology", + year = "2014", + volume = "43", + number = "6", + pages = "1929--1944", + doi = "10.1093/ije/dyu188", +) + +bibentry( + bibtype = "Article", + title = "{DataSHIELD – New Directions and Dimensions}", + author = c( + person("Rebecca C.", "Wilson"), + person("Oliver W.", "Butters"), + person("Demetris", "Avraam"), + person("James", "Baker"), + person("Jonathan A.", "Tedds"), + person("Andrew", "Turner"), + person("Madeleine", "Murtagh"), + person("Paul R.", "Burton") + ), + journal = "Data Science Journal", + year = "2017", + volume = "16", + number = "21", + pages = "1--21", + doi = "10.5334/dsj-2017-021" +) + +bibentry( + bibtype = "Article", + title = "{DataSHIELD: mitigating disclosure risk in a multi-site federated analysis platform}", + author = c( + person("Demetris", "Avraam"), + person("Rebecca C", "Wilson"), + person("Noemi", "{Aguirre Chan}"), + person("Soumya", "Banerjee"), + person("Tom R P", "Bishop"), + person("Olly", "Butters"), + person("Tim", "Cadman"), + person("Luise", "Cederkvist"), + person("Liesbeth", "Duijts"), + person("Xavier", "{Escrib{\\a`a} Montagut}"), + person("Hugh", "Garner"), + person("Gon{\\c c}alo", "Gon{\\c c}alves"), + person("Juan R", "Gonz{\\a'a}lez"), + person("Sido", "Haakma"), + person("Mette", "Hartlev"), + person("Jan", "Hasenauer"), + person("Manuel", "Huth"), + person("Eleanor", "Hyde"), + person("Vincent W V", "Jaddoe"), + person("Yannick", "Marcon"), + person("Michaela Th", "Mayrhofer"), + person("Fruzsina", "Molnar-Gabor"), + person("Andrei Scott", "Morgan"), + person("Madeleine", "Murtagh"), + person("Marc", "Nestor"), + person("Anne-Marie", "{Nybo Andersen}"), + person("Simon", "Parker"), + person("Angela", "{Pinot de Moira}"), + person("Florian", "Schwarz"), + person("Katrine", "Strandberg-Larsen"), + person("Morris A", "Swertz"), + person("Marieke", "Welten"), + person("Stuart", "Wheater"), + person("Paul R", "Burton") + ), + journal = "Bioinformatics Advances", + year = "2024", + volume = "5", + number = "1", + pages = "1--21", + doi = "10.1093/bioadv/vbaf046", + editor = person("Thomas", "Lengauer"), + publisher = "Oxford University Press (OUP)" +) diff --git a/inst/WORDLIST b/inst/WORDLIST new file mode 100644 index 000000000..b51917533 --- /dev/null +++ b/inst/WORDLIST @@ -0,0 +1,307 @@ +Amongst +BMI +Banerjee +Bannert +Barros +Bertino +Bhutta +Bioinformatics +Boffetta +Boniol +Bota +Bucur +Budin +Cadman +Carvalho +Cederkvist +Chumlea +Clientside +Codecov +DMT +DSI +DV +DataSHIELD +DataSHIELD's +Demir +Diaz +Dibben +Doiron +Duijts +EscribĂ  +Fenton +Ferretti +Forestplot +Fortier +GAMLSS +GLME +GLMEs +Gabor +Giepmans +GonzĂĄlez +Gonçalves +Gravett +HC +Haakma +Hartlev +Hasenauer +Heuvel +Hiekkalinna +Huth +Hveem +IDSEQ +INTERGROWTH +IRLS +Isaeva +Jaddoe +Jaffer +Knoppers +KvalĂžy +LME +LMEs +LaFlamme +LjĂžsne +MUAC +Macleod +Mayrhofer +Millar +Montagut +Murtagh +Newby +Nuotio +Nvalid +Nybo +Ohuma +PIRLS +PRWa +Papageorghiou +Perola +Pinot +Polychoric +Polyserial +Popham +Purwar +REstricted +Raab +Raphson +Reischl +Rigby +Roption +Ryser +SDS +SDs +SLMA +SSF +SURVTIME +Schwarz +Serverside +Sheehan +Stasinopoulos +Stolk +Strandberg +Swertz +TSF +Tedds +UID +VarCovMatrix +Victora +Villar +Villegas +Waldenberger +Welch +Welten +Woffenbuttel +Zbp +ag +aic +analyse +analysed +analysing +anonymised +anthropometric +asFactor +asFactorDS +asFactorSimple +asFactorSimpleDS +behaviour +bfa +bp +byrow +casewise +categorising +cbind +cbinded +centile +centiles +centre +characterised +chisq +clientside +cov +crit +cvar +cyc +dataFrameSort +dataframefill +datashield +datasource +datasources +de +deKlerk +defaultMethod +df +disclosive +discriminative +dmt +dmtC +docx +doi +ds +dsBase +eg +elspline +exponentials +extractQuantile +extractQuantiles +extractQuantilesDS +forestplot +gamlss +gamlssDS +gd +getOpals +ggplot +glim +glm +glmPredict +glmPredict's +glmPredictDS +glmSLMA +glmSLMADS +glmSummary +glmSummaryDS +glmer +glmerMod +glms +hbp +hca +hcircm +hetcor +heterogenous +hfa +https +ie +igb +imputationSet +intergrowth +iter +kendall +labelled +lencm +lfa +listOpals +listOpalsIreminds +lme +lmer +lmerMod +loess +lspline +maximises +meanByClass +metafor +mfa +miceDS +mids +modelled +modelling +na +namesDS +ncol +ncols +nearPD +neighbour +neighbours +newObj +newdata +newdataname +newobj +nfilter +nhlbi +nih +normalised +nrows +ns +obiba +optimisation +organised +panelaggregation +parametrise +patho +pb +pearson +ped +penalised +perc +poisson +polychoric +polyserial +pre +predictorMatrix +probs +pseudodata +pseudorandom +qlspline +quasipoisson +rBinom +rNorm +rPois +rUnif +ra +ranksSecure +ranksSecureDS +rbinded +recodeValues +recognise +recognised +releasers +resid +rvar +sampleDS +se +serverside +setDefaultOpals +setSeedDS +skinfold +skinfolds +sortkey +spearman +ssa +standardised +stringShort +studyside +studysideMessages +stvar +subClasses +subsetByClass +subsetObject +summarised +summarises +tapply +th +tibble +tol +tsa +unlist +useNA +vals +vectorcalc +visualise +visualised +wfa +wfh +wfl +wlr +wtkg +www +xlevels +xyz +zscore +zscores diff --git a/man/computeWeightedMeans.Rd b/man/computeWeightedMeans.Rd index 0b8b0879f..c1f9bfc15 100644 --- a/man/computeWeightedMeans.Rd +++ b/man/computeWeightedMeans.Rd @@ -15,6 +15,9 @@ computeWeightedMeans(data_table, variables, weight, by) \item{by}{character vector of the columns to group by} } +\value{ +Returns a data table object with computed weighted means. +} \description{ This function is originally from the panelaggregation package. It has been ported here in order to bypass the package being @@ -23,3 +26,4 @@ kicked off CRAN. \author{ Matthias Bannert, Gabriel Bucur } +\keyword{internal} diff --git a/man/dot-pool_md_patterns.Rd b/man/dot-pool_md_patterns.Rd new file mode 100644 index 000000000..baabf3e92 --- /dev/null +++ b/man/dot-pool_md_patterns.Rd @@ -0,0 +1,20 @@ +% Generated by roxygen2: do not edit by hand +% Please edit documentation in R/ds.mdPattern.R +\name{.pool_md_patterns} +\alias{.pool_md_patterns} +\title{Pool missing data patterns across studies} +\usage{ +.pool_md_patterns(patterns_list, study_names) +} +\arguments{ +\item{patterns_list}{List of pattern matrices from each study} + +\item{study_names}{Names of the studies} +} +\value{ +Pooled pattern matrix +} +\description{ +Internal function to pool md.pattern results from multiple studies +} +\keyword{internal} diff --git a/man/ds.asFactor.Rd b/man/ds.asFactor.Rd index c412df383..24125632b 100644 --- a/man/ds.asFactor.Rd +++ b/man/ds.asFactor.Rd @@ -95,7 +95,7 @@ If we set the argument \code{fixed.dummy.vars = TRUE}, \code{baseline.level = 1} and \code{forced.factor.levels = c(1,2,3,4,5)}. The input vector is converted to the following matrix of dummy variables: -\tabular{rrrrr}{ +\tabular{rrrr}{ \strong{DV2} \tab \strong{DV3} \tab \strong{DV4} \tab \strong{DV5} \cr 0 \tab 0 \tab 0 \tab 0\cr 1 \tab 0 \tab 0 \tab 0\cr diff --git a/man/ds.asNumeric.Rd b/man/ds.asNumeric.Rd index a07204c18..9928942a5 100644 --- a/man/ds.asNumeric.Rd +++ b/man/ds.asNumeric.Rd @@ -32,7 +32,7 @@ This function is based on the native R function \code{as.numeric}. This function is based on the native R function \code{as.numeric}. However, it behaves differently with some specific classes of variables. For example, if the input object is of class factor, it first converts its values into characters and then convert those to -numerics. This behavior is important for the case where the input object is of class factor having +numerics. This behaviour is important for the case where the input object is of class factor having numbers as levels. In that case, the native R \code{as.numeric} function returns the underlying level codes and not the values as numbers. For example \code{as.numeric} in R converts the factor vector: \cr diff --git a/man/ds.colnames.Rd b/man/ds.colnames.Rd index e73910812..9460a567f 100644 --- a/man/ds.colnames.Rd +++ b/man/ds.colnames.Rd @@ -9,20 +9,20 @@ ds.colnames(x = NULL, datasources = NULL) \arguments{ \item{x}{a character string providing the name of the input data frame or matrix.} -\item{datasources}{a list of \code{\link[DSI]{DSConnection-class}} objects obtained after login. +\item{datasources}{a list of \code{\link[DSI]{DSConnection-class}} objects obtained after login. If the \code{datasources} argument is not specified the default set of connections will be used: see \code{\link[DSI]{datashield.connections_default}}.} } \value{ -\code{ds.colnames} returns the column names of +\code{ds.colnames} returns the column names of the specified server-side data frame or matrix. } \description{ -Retrieves column names of an R object on the server-side. +Retrieves column names of an R object on the server-side. This function is similar to R function \code{colnames}. } \details{ -The input is restricted to the object of type \code{data.frame} or \code{matrix}. +The input is restricted to the object of type \code{data.frame} or \code{matrix}. Server function called: \code{colnamesDS} } @@ -37,28 +37,28 @@ Server function called: \code{colnamesDS} require('dsBaseClient') builder <- DSI::newDSLoginBuilder() - builder$append(server = "study1", - url = "http://192.168.56.100:8080/", - user = "administrator", password = "datashield_test&", + builder$append(server = "study1", + url = "http://192.168.56.100:8080/", + user = "administrator", password = "datashield_test&", table = "CNSIM.CNSIM1", driver = "OpalDriver") - builder$append(server = "study2", - url = "http://192.168.56.100:8080/", - user = "administrator", password = "datashield_test&", + builder$append(server = "study2", + url = "http://192.168.56.100:8080/", + user = "administrator", password = "datashield_test&", table = "CNSIM.CNSIM2", driver = "OpalDriver") builder$append(server = "study3", - url = "http://192.168.56.100:8080/", - user = "administrator", password = "datashield_test&", + url = "http://192.168.56.100:8080/", + user = "administrator", password = "datashield_test&", table = "CNSIM.CNSIM3", driver = "OpalDriver") logindata <- builder$build() - + # Log onto the remote Opal training servers - connections <- DSI::datashield.login(logins = logindata, assign = TRUE, symbol = "D") + connections <- DSI::datashield.login(logins = logindata, assign = TRUE, symbol = "D") # Getting column names of the R objects stored in the server-side ds.colnames(x = "D", datasources = connections[1]) #only the first server ("study1") is used # Clear the Datashield R sessions and logout - datashield.logout(connections) + datashield.logout(connections) } } \seealso{ diff --git a/man/ds.corTest.Rd b/man/ds.corTest.Rd index fac90553f..6277df16a 100644 --- a/man/ds.corTest.Rd +++ b/man/ds.corTest.Rd @@ -24,7 +24,7 @@ used for the test. One of "pearson", "kendall", or "spearman", can be abbreviate Default is set to "pearson".} \item{exact}{a logical indicating whether an exact p-value should be computed. Used for -Kendall's tau and Spearman's rho. See ‘Details’ of R stats function \code{cor.test} for +Kendall's tau and Spearman's rho. See \emph{Details} of R stats function \code{cor.test} for the meaning of NULL (the default).} \item{conf.level}{confidence level for the returned confidence interval. Currently diff --git a/man/ds.dataFrameSubset.Rd b/man/ds.dataFrameSubset.Rd index 58b557fe5..4d2afc18d 100644 --- a/man/ds.dataFrameSubset.Rd +++ b/man/ds.dataFrameSubset.Rd @@ -18,7 +18,7 @@ ds.dataFrameSubset( ) } \arguments{ -\item{df.name}{a character string providing the name of the data frame to be subseted.} +\item{df.name}{a character string providing the name of the data frame to be subset.} \item{V1.name}{A character string specifying the name of the vector to which the Boolean operator is to be applied to define the subset. diff --git a/man/ds.dmtC2S.Rd b/man/ds.dmtC2S.Rd index 4453cf73a..51ef6a964 100644 --- a/man/ds.dmtC2S.Rd +++ b/man/ds.dmtC2S.Rd @@ -23,7 +23,7 @@ that will be the dataset used by default if no other dataset is specified. If yo wish to change the connections you wish to use by default the call datashield.connections_default('opals.a') will set 'default.connections' to be 'opals.a' and so in the absence of specific instructions to the contrary -(e.g. by specifiying a particular dataset to be used via the +(e.g. by specifying a particular dataset to be used via the argument) all subsequent function calls will be to the datasets held in opals.a. If the argument is specified, it should be set without inverted commas: e.g. datasources=opals.a or datasources=default.connections. diff --git a/man/ds.elspline.Rd b/man/ds.elspline.Rd index e6e32197a..d7f20819d 100644 --- a/man/ds.elspline.Rd +++ b/man/ds.elspline.Rd @@ -19,7 +19,7 @@ ds.elspline( \item{n}{integer greater than 2, knots are computed such that they cut n equally-spaced intervals along the range of x} -\item{marginal}{logical, how to parametrize the spline, see Details} +\item{marginal}{logical, how to parametrise the spline, see Details} \item{names}{character, vector of names for constructed variables} diff --git a/man/ds.forestplot.Rd b/man/ds.forestplot.Rd index 6ce3d54c6..66606601d 100644 --- a/man/ds.forestplot.Rd +++ b/man/ds.forestplot.Rd @@ -7,10 +7,10 @@ ds.forestplot(mod, variable = NULL, method = "ML", layout = "JAMA") } \arguments{ -\item{mod}{\code{list} List outputed by any of the SLMA models of DataSHIELD (\code{ds.glmerSLMA}, +\item{mod}{\code{list} List outputted by any of the SLMA models of DataSHIELD (\code{ds.glmerSLMA}, \code{ds.glmSLMA}, \code{ds.lmerSLMA})} -\item{variable}{\code{character} (default \code{NULL}) Variable to meta-analyze and visualize, by setting this +\item{variable}{\code{character} (default \code{NULL}) Variable to meta-analyse and visualise, by setting this argument to \code{NULL} (default) the first independent variable will be used.} \item{method}{\code{character} (Default \code{"ML"}) Method to estimate the between study variance. @@ -19,8 +19,11 @@ See details from \code{?meta::metagen} for the different options.} \item{layout}{\code{character} (default \code{"JAMA"}) Layout of the plot. See details from \code{?meta::metagen} for the different options.} } +\value{ +Results a foresplot object created with `meta::forest`. +} \description{ -Draws a foresplot of the coefficients for Study-Level Meta-Analysis performed with +Draws a forestplot of the coefficients for Study-Level Meta-Analysis performed with DataSHIELD } \examples{ diff --git a/man/ds.glmPredict.Rd b/man/ds.glmPredict.Rd index e156e6c97..32e5c9f5d 100644 --- a/man/ds.glmPredict.Rd +++ b/man/ds.glmPredict.Rd @@ -87,7 +87,7 @@ that will be the dataset used by default if no other dataset is specified. If yo wish to change the connections you wish to use by default the call datashield.connections_default('opals.a') will set 'default.connections' to be 'opals.a' and so in the absence of specific instructions to the contrary -(e.g. by specifiying a particular dataset to be used via the +(e.g. by specifying a particular dataset to be used via the argument) all subsequent function calls will be to the datasets held in opals.a. If the argument is specified, it should be set without inverted commas: e.g. datasources=opals.a or datasources=default.connections. @@ -114,7 +114,7 @@ the output always includes: the name of the serverside glm object being predicte the name - if one was specified - of the dataframe being used as the basis for predictions, the output.type specified ('link', 'response' or 'terms'), the value of the dispersion parameter if one had been specified and the residual scale parameter (which is -multipled by sqrt(dispersion parameter) if one has been set). If output.type = 'terms', +multiplied by sqrt(dispersion parameter) if one has been set). If output.type = 'terms', the summary statistics for the fit and se.fit vectors are replaced by equivalent summary statistics for each column in fit and se.fit matrices which each have k columns if k terms are being summarised. diff --git a/man/ds.glmSLMA.Rd b/man/ds.glmSLMA.Rd index e15e2437e..64bd77dd7 100644 --- a/man/ds.glmSLMA.Rd +++ b/man/ds.glmSLMA.Rd @@ -172,7 +172,7 @@ them into their meta-analysis package of choice. \code{is.object.created} and \code{validity.check} are standard items returned by an assign function when the designated newobj appears to have -been successfuly created on the serverside at each study. This output is +been successfully created on the serverside at each study. This output is produced specifically by the assign function \code{glmSLMADS.assign} that writes out the glm object on the serverside } diff --git a/man/ds.glmSummary.Rd b/man/ds.glmSummary.Rd index d7906d311..897dbae90 100644 --- a/man/ds.glmSummary.Rd +++ b/man/ds.glmSummary.Rd @@ -24,7 +24,7 @@ that will be the dataset used by default if no other dataset is specified. If yo wish to change the connections you wish to use by default the call datashield.connections_default('opals.a') will set 'default.connections' to be 'opals.a' and so in the absence of specific instructions to the contrary -(e.g. by specifiying a particular dataset to be used via the +(e.g. by specifying a particular dataset to be used via the argument) all subsequent function calls will be to the datasets held in opals.a. If the argument is specified, it should be set without inverted commas: e.g. datasources=opals.a or datasources=default.connections. diff --git a/man/ds.igb_standards.Rd b/man/ds.igb_standards.Rd index 499220a21..e9ab20f51 100644 --- a/man/ds.igb_standards.Rd +++ b/man/ds.igb_standards.Rd @@ -54,11 +54,19 @@ For gestational ages between 24 and 33 weeks, the INTERGROWTH very early preterm standard is used. } \references{ -International standards for newborn weight, length, and head circumference by -gestational age and sex: the Newborn Cross-Sectional Study of the INTERGROWTH-21st Project -Villar, JosĂ© et al. The Lancet, Volume 384, Issue 9946, 857-868 -INTERGROWTH-21st very preterm size at birth reference charts. Lancet 2016 -doi.org/10.1016/S0140-6736(16) 00384-6. Villar, JosĂ© et al. +\itemize{ + \item Villar, J., Ismail, L.C., Victora, C.G., Ohuma, E.O., Bertino, E., + Altman, D.G., Lambert, A., Papageorghiou, A.T., Carvalho, M., Jaffer, Y.A., + Gravett, M.G., Purwar, M., Frederick, I.O., Noble, A.J., Pang, R., Barros, + F.C., Chumlea, C., Bhutta, Z.A., Kennedy, S.H., 2014. International + standards for newborn weight, length, and head circumference by gestational + age and sex: the Newborn Cross-Sectional Study of the INTERGROWTH-21st + Project. The Lancet 384, 857--868. https://doi.org/10.1016/S0140-6736(14)60932-6 + \item Villar, J., Giuliani, F., Fenton, T.R., Ohuma, E.O., Ismail, L.C., + Kennedy, S.H., 2016. INTERGROWTH-21st very preterm size at birth reference + charts. The Lancet 387, 844--845. https://doi.org/10.1016/S0140-6736(16)00384-6 + +} } \author{ Demetris Avraam for DataSHIELD Development Team diff --git a/man/ds.ls.Rd b/man/ds.ls.Rd index e1b5d324e..207af8548 100644 --- a/man/ds.ls.Rd +++ b/man/ds.ls.Rd @@ -13,7 +13,7 @@ ds.ls( } \arguments{ \item{search.filter}{character string (potentially including \code{*} symbol) specifying the filter -for the object name that you want to find in the enviroment. For more information see \strong{Details}.} +for the object name that you want to find in the environment. For more information see \strong{Details}.} \item{env.to.search}{an integer (e.g. in \code{2} or \code{2L} format) specifying the position in the search path of the environment to be explored. \code{1L} is the current active analytic diff --git a/man/ds.lspline.Rd b/man/ds.lspline.Rd index 0cf8e5aae..c0189ce40 100644 --- a/man/ds.lspline.Rd +++ b/man/ds.lspline.Rd @@ -18,7 +18,7 @@ ds.lspline( \item{knots}{numeric vector of knot positions} -\item{marginal}{logical, how to parametrize the spline, see Details} +\item{marginal}{logical, how to parametrise the spline, see Details} \item{names}{character, vector of names for constructed variables} diff --git a/man/ds.matrix.Rd b/man/ds.matrix.Rd index b2928c3ed..d60a91832 100644 --- a/man/ds.matrix.Rd +++ b/man/ds.matrix.Rd @@ -18,7 +18,7 @@ ds.matrix( \arguments{ \item{mdata}{a character string specifying the name of a server-side scalar or vector. Also, a numeric value representing a -scalar specified from the client-side can be speficied. +scalar specified from the client-side can be specified Zeros, negative values and NAs are all allowed. For more information see \strong{Details}.} diff --git a/man/ds.matrixDiag.Rd b/man/ds.matrixDiag.Rd index 84fdba387..268e5148c 100644 --- a/man/ds.matrixDiag.Rd +++ b/man/ds.matrixDiag.Rd @@ -15,7 +15,7 @@ ds.matrixDiag( \arguments{ \item{x1}{a character string specifying the name of a server-side scalar or vector. Also, a numeric value or vector -specified from the client-side can be speficied. This argument depends +specified from the client-side can be specified. This argument depends on the value specified in \code{aim}. For more information see \strong{Details}.} diff --git a/man/ds.mdPattern.Rd b/man/ds.mdPattern.Rd new file mode 100644 index 000000000..b1bacc0b1 --- /dev/null +++ b/man/ds.mdPattern.Rd @@ -0,0 +1,126 @@ +% Generated by roxygen2: do not edit by hand +% Please edit documentation in R/ds.mdPattern.R +\name{ds.mdPattern} +\alias{ds.mdPattern} +\title{Display missing data patterns with disclosure control} +\usage{ +ds.mdPattern(x = NULL, type = "split", datasources = NULL) +} +\arguments{ +\item{x}{a character string specifying the name of a data frame or matrix on the +server-side containing the data to analyze.} + +\item{type}{a character string specifying the output type. If 'split' (default), +returns separate patterns for each study. If 'combine', attempts to pool patterns +across studies.} + +\item{datasources}{a list of \code{\link[DSI]{DSConnection-class}} objects obtained +after login. If the \code{datasources} argument is not specified, the default set of +connections will be used: see \code{\link[DSI]{datashield.connections_default}}.} +} +\value{ +For type='split': A list with one element per study, each containing: +\describe{ + \item{pattern}{The missing data pattern matrix for that study} + \item{valid}{Logical indicating if all patterns meet disclosure requirements} + \item{message}{A message describing the validity status} +} + +For type='combine': A list containing: +\describe{ + \item{pattern}{The pooled missing data pattern matrix across all studies} + \item{valid}{Logical indicating if all pooled patterns meet disclosure requirements} + \item{message}{A message describing the validity status} +} +} +\description{ +This function is a client-side wrapper for the server-side mdPatternDS +function. It generates a missing data pattern matrix similar to mice::md.pattern but +with disclosure control applied to prevent revealing small cell counts. +} +\details{ +The function calls the server-side mdPatternDS function which uses +mice::md.pattern to analyze missing data patterns. Patterns with counts below the +disclosure threshold (default: nfilter.tab = 3) are suppressed to maintain privacy. + +\strong{Output Format:} +- Each row represents a missing data pattern +- Pattern counts are shown in row names (e.g., "150", "25") +- Columns show 1 if the variable is observed, 0 if missing +- Last column shows the total number of missing values per pattern +- Last row shows the total number of missing values per variable + +\strong{Disclosure Control:} + +Suppressed patterns (count below threshold) are indicated by: +- Row name: "suppressed()" where N is the threshold +- All pattern values set to NA +- Summary row also suppressed to prevent back-calculation + +\strong{Pooling Behavior (type='combine'):} + +When pooling across studies, the function uses a \emph{conservative approach} +for disclosure control: + +1. Identifies identical missing patterns across studies +2. \strong{EXCLUDES suppressed patterns from pooling} - patterns suppressed in + ANY study are not included in the pooled count +3. Sums counts only for non-suppressed identical patterns +4. Re-validates pooled counts against disclosure threshold + +\strong{Important:} This conservative approach means: +- Pooled counts may be \emph{underestimates} if some studies had suppressed patterns +- This prevents disclosure through subtraction (e.g., if study A shows count=5 + and pool shows count=7, one could deduce study B has count=2, violating disclosure) +- Different patterns across studies are preserved separately in the pooled result +} +\examples{ +\dontrun{ + ## Version 6, for version 5 see the Wiki + + # Connecting to the Opal servers + + require('DSI') + require('DSOpal') + require('dsBaseClient') + + builder <- DSI::newDSLoginBuilder() + builder$append(server = "study1", + url = "http://192.168.56.100:8080/", + user = "administrator", password = "datashield_test&", + table = "CNSIM.CNSIM1", driver = "OpalDriver") + builder$append(server = "study2", + url = "http://192.168.56.100:8080/", + user = "administrator", password = "datashield_test&", + table = "CNSIM.CNSIM2", driver = "OpalDriver") + logindata <- builder$build() + + connections <- DSI::datashield.login(logins = logindata, assign = TRUE, symbol = "D") + + # Get missing data patterns for each study separately + patterns_split <- ds.mdPattern(x = "D", type = "split", datasources = connections) + + # View results for study1 + print(patterns_split$study1$pattern) + # var1 var2 var3 + # 150 1 1 1 0 <- 150 obs complete + # 25 0 1 1 1 <- 25 obs missing var1 + # 25 0 0 25 <- Summary: 25 missing per variable + + # Get pooled missing data patterns across studies + patterns_pooled <- ds.mdPattern(x = "D", type = "combine", datasources = connections) + print(patterns_pooled$pattern) + + # Example with suppressed patterns: + # If study1 has a pattern with count=2 (suppressed) and study2 has same pattern + # with count=5 (valid), the pooled result will show count=5 (conservative approach) + # A warning will indicate: "Pooled counts may underestimate the true total" + + # Clear the Datashield R sessions and logout + datashield.logout(connections) +} + +} +\author{ +Xavier EscribĂ  montagut for DataSHIELD Development Team +} diff --git a/man/ds.ns.Rd b/man/ds.ns.Rd index 910511729..28ffaaa04 100644 --- a/man/ds.ns.Rd +++ b/man/ds.ns.Rd @@ -55,7 +55,7 @@ a basis matrix for representing the family of piecewise-cubic splines with the s sequence of interior knots, and the natural boundary conditions. These enforce the constraint that the function is linear beyond the boundary knots, which can either be supplied or default to the extremes of the data. -A primary use is in modeling formula to directly specify a natural spline term in a model. +A primary use is in modelling formula to directly specify a natural spline term in a model. } \author{ Demetris Avraam for DataSHIELD Development Team diff --git a/man/ds.qlspline.Rd b/man/ds.qlspline.Rd index 93460e65a..003f6b3ad 100644 --- a/man/ds.qlspline.Rd +++ b/man/ds.qlspline.Rd @@ -23,7 +23,7 @@ intervals along x or a vector of numbers in (0; 1) specifying the quantiles expl \item{na.rm}{logical, whether NA should be removed when calculating quantiles, passed to na.rm of quantile. Default set to TRUE} -\item{marginal}{logical, how to parametrize the spline, see Details} +\item{marginal}{logical, how to parametrise the spline, see Details} \item{names}{character, vector of names for constructed variables} diff --git a/man/ds.ranksSecure.Rd b/man/ds.ranksSecure.Rd index 3fd8ed8eb..294a754f7 100644 --- a/man/ds.ranksSecure.Rd +++ b/man/ds.ranksSecure.Rd @@ -51,7 +51,7 @@ is usually the setting to use. But, if there is some abnormal configuration of the clusters of values that are being ranked such that some values are treated as being missing and the processing stops, then setting generate.quantiles to FALSE allows the generation of ranks to complete so -they can then be used for non-parameteric analysis, even if the key values +they can then be used for non-parametric analysis, even if the key values cannot be estimated. A real example of an unusual configuration was in a reasonably large dataset of survival times, where a substantial proportion of survival profiles were censored at precisely 10 years. This meant that @@ -181,7 +181,7 @@ occurred. } \description{ Securely generate the ranks of a numeric vector and estimate -true qlobal quantiles across all data sources simultaneously +true global quantiles across all data sources simultaneously } \details{ ds.ranksSecure is a clientside function which calls a series of diff --git a/man/ds.recodeValues.Rd b/man/ds.recodeValues.Rd index 5ebe1f675..6b775bc9d 100644 --- a/man/ds.recodeValues.Rd +++ b/man/ds.recodeValues.Rd @@ -52,7 +52,7 @@ them to a matched set of alternative specified values. This function recodes individual values with new individual values. This can apply to numeric and character values, factor levels and NAs. One particular use of \code{ds.recodeValues} is to convert NAs to an explicit value. This value is specified -in the argument \code{missing}. If tthe user want to recode only missing values, then it +in the argument \code{missing}. If the user want to recode only missing values, then it should also specify an identical vector of values in both arguments \code{values2replace.vector} and \code{new.values.vector} (see Example 2 below). Server function called: \code{recodeValuesDS} diff --git a/man/ds.sample.Rd b/man/ds.sample.Rd index 3cd49b75c..cceb1236d 100644 --- a/man/ds.sample.Rd +++ b/man/ds.sample.Rd @@ -141,7 +141,7 @@ but they join the sample in random order. By sorting the output object (in this case with the default name 'newobj.sample) using ds.dataFrameSort with the 'sampling.order' vector as the sort key, the output object is rendered equivalent to PRWa but with the rows randomly permuted (so the column reflecting -the vector 'sample.order' now runs from 1:length of obejct, while the +the vector 'sample.order' now runs from 1:length of object, while the column reflecting 'ID.seq' denoting the original order is now randomly ordered. If you need to return to the original order you can simply us ds.dataFrameSort again using the column reflecting 'ID.seq' as the sort key: diff --git a/man/ds.scatterPlot.Rd b/man/ds.scatterPlot.Rd index bbcfa5b5d..798c08447 100644 --- a/man/ds.scatterPlot.Rd +++ b/man/ds.scatterPlot.Rd @@ -27,7 +27,7 @@ This argument can be set as \code{'deteministic'} or \code{'probabilistic'}. Default \code{'deteministic'}. For more information see \strong{Details}.} -\item{k}{the number of the nearest neighbors for which their centroid is calculated. +\item{k}{the number of the nearest neighbours for which their centroid is calculated. Default 3. For more information see \strong{Details}.} @@ -60,7 +60,7 @@ As the generation of a scatter plot from original data is disclosive and is not permitted in DataSHIELD, this function allows the user to plot non-disclosive scatter plots. If the argument \code{method} is set to \code{'deterministic'}, the server-side function searches -for the \code{k-1} nearest neighbors of each single data point and calculates the centroid +for the \code{k-1} nearest neighbours of each single data point and calculates the centroid of such \code{k} points. The proximity is defined by the minimum Euclidean distances of z-score transformed data. diff --git a/man/ds.sqrt.Rd b/man/ds.sqrt.Rd index b42ecaedb..638d26a5f 100644 --- a/man/ds.sqrt.Rd +++ b/man/ds.sqrt.Rd @@ -71,7 +71,6 @@ specified by the user through the argument \code{newobj}, otherwise is named by # and get their square roots ds.make(toAssign='rep((1:10)^2, times=10)', newobj='squares.vector', datasources=connections) ds.sqrt(x='squares.vector', newobj='sqrt.vector', datasources=connections) - # check the behavior of that operation by comparing the tables of squares.vector and sqrt.vector ds.table(rvar='squares.vector')$output.list$TABLE_rvar.by.study_counts ds.table(rvar='sqrt.vector')$output.list$TABLE_rvar.by.study_counts diff --git a/man/ds.subset.Rd b/man/ds.subset.Rd new file mode 100644 index 000000000..2b2d91b99 --- /dev/null +++ b/man/ds.subset.Rd @@ -0,0 +1,109 @@ +% Generated by roxygen2: do not edit by hand +% Please edit documentation in R/ds.subset.R +\name{ds.subset} +\alias{ds.subset} +\title{Generates a valid subset of a table or a vector} +\usage{ +ds.subset( + x = NULL, + subset = "subsetObject", + completeCases = FALSE, + rows = NULL, + cols = NULL, + logicalOperator = NULL, + threshold = NULL, + datasources = NULL +) +} +\arguments{ +\item{x}{a character, the name of the dataframe or the factor vector and the range of the subset.} + +\item{subset}{the name of the output object, a list that holds the subset object. If set to NULL +the default name of this list is 'subsetObject'} + +\item{completeCases}{a character that tells if only complete cases should be included or not.} + +\item{rows}{a vector of integers, the indices of the rows to extract.} + +\item{cols}{a vector of integers or a vector of characters; the indices of the columns to extract or their names.} + +\item{logicalOperator}{a boolean, the logical parameter to use if the user wishes to subset a vector using a logical +operator. This parameter is ignored if the input data is not a vector.} + +\item{threshold}{a numeric, the threshold to use in conjunction with the logical parameter. This parameter is ignored +if the input data is not a vector.} + +\item{datasources}{a list of \code{\link[DSI]{DSConnection-class}} objects obtained after login. If the +the default set of connections will be used: see \link[DSI]{datashield.connections_default}.} +} +\value{ +no data are return to the user, the generated subset dataframe is stored on the server side. +} +\description{ +The function uses the R classical subsetting with squared brackets '[]' and allows also to +subset using a logical operator and a threshold. The object to subset from must be a vector (factor, numeric +or character) or a table (data.frame or matrix). +} +\details{ +(1) If the input data is a table the user specifies the rows and/or columns to include in the subset; the columns can be +referred to by their names. Table subsetting can also be done using the name of a variable and a threshold (see example 3). +(2) If the input data is a vector and the parameters 'rows', 'logical' and 'threshold' are all provided the last two are ignored +(i.e. 'rows' has precedence over the other two parameters then). +IMPORTANT NOTE: If the requested subset is not valid (i.e. contains less than the allowed number of observations) all the values are +turned into missing values (NA). Hence an invalid subset is indicated by the fact that all values within it are set to NA. +} +\examples{ +\dontrun{ + + # load the login data + data(logindata) + + # login and assign some variables to R + myvar <- list("DIS_DIAB","PM_BMI_CONTINUOUS","LAB_HDL", "GENDER") + conns <- datashield.login(logins=logindata,assign=TRUE,variables=myvar) + + # Example 1: generate a subset of the assigned dataframe (by default the table is named 'D') + # with complete cases only + ds.subset(x='D', subset='subD1', completeCases=TRUE) + # display the dimensions of the initial table ('D') and those of the subset table ('subD1') + ds.dim('D') + ds.dim('subD1') + + # Example 2: generate a subset of the assigned table (by default the table is named 'D') + # with only the variables + # DIS_DIAB' and'PM_BMI_CONTINUOUS' specified by their name. + ds.subset(x='D', subset='subD2', cols=c('DIS_DIAB','PM_BMI_CONTINUOUS')) + + # Example 3: generate a subset of the table D with bmi values greater than or equal to 25. + ds.subset(x='D', subset='subD3', logicalOperator='PM_BMI_CONTINUOUS>=', threshold=25) + + # Example 4: get the variable 'PM_BMI_CONTINUOUS' from the dataframe 'D' and generate a + # subset bmi + # vector with bmi values greater than or equal to 25 + ds.assign(toAssign='D$PM_BMI_CONTINUOUS', newobj='BMI') + ds.subset(x='BMI', subset='BMI25plus', logicalOperator='>=', threshold=25) + + # Example 5: subsetting by rows: + # get the logarithmic values of the variable 'lab_hdl' and generate a subset with + # the first 50 observations of that new vector. If the specified number of row is + # greater than the total + # number of rows in any of the studies the process will stop. + ds.assign(toAssign='log(D$LAB_HDL)', newobj='logHDL') + ds.subset(x='logHDL', subset='subLAB_HDL', rows=c(1:50)) + # now get a subset of the table 'D' with just the 100 first observations + ds.subset(x='D', subset='subD5', rows=c(1:100)) + + # clear the Datashield R sessions and logout + datashield.logout(conns) + +} + +} +\seealso{ +\link{ds.subsetByClass} to subset by the classes of factor vector(s). + +\link{ds.meanByClass} to compute mean and standard deviation across categories of a factor vectors. +} +\author{ +Gaye, A. +} diff --git a/man/ds.subsetByClass.Rd b/man/ds.subsetByClass.Rd new file mode 100644 index 000000000..fe372adb8 --- /dev/null +++ b/man/ds.subsetByClass.Rd @@ -0,0 +1,80 @@ +% Generated by roxygen2: do not edit by hand +% Please edit documentation in R/ds.subsetByClass.R +\name{ds.subsetByClass} +\alias{ds.subsetByClass} +\title{Generates valid subset(s) of a data frame or a factor} +\usage{ +ds.subsetByClass( + x = NULL, + subsets = "subClasses", + variables = NULL, + datasources = NULL +) +} +\arguments{ +\item{x}{a character, the name of the dataframe or the vector to generate subsets from.} + +\item{subsets}{the name of the output object, a list that holds the subset objects. If set to NULL +the default name of this list is 'subClasses'.} + +\item{variables}{a vector of string characters, the name(s) of the variables to subset by.} + +\item{datasources}{a list of \code{\link[DSI]{DSConnection-class}} objects obtained after login. If the +the default set of connections will be used: see \link[DSI]{datashield.connections_default}.} +} +\value{ +a no data are return to the user but messages are printed out. +} +\description{ +The function takes a categorical variable or a data frame as input and generates +subset(s) variables or data frames for each category. +} +\details{ +If the input data object is a data frame it is possible to specify the variables +to subset on. If a subset is not 'valid' all its the values are reported as missing (i.e. NA), +the name of the subsets is labelled with the suffix '_INVALID'. Subsets are considered invalid if +the number of observations it holds are between 1 and the threshold allowed by the data owner. if +a subset is empty (i.e. no entries) the name of the subset is labelled with the suffix '_EMPTY'. +} +\examples{ +\dontrun{ + + # load the login data + data(logindata) + + # login and assign some variables to R + myvar <- list('DIS_DIAB','PM_BMI_CONTINUOUS','LAB_HDL', 'GENDER') + conns <- datashield.login(logins=logindata,assign=TRUE,variables=myvar) + + # Example 1: generate all possible subsets from the table assigned above (one subset table + # for each class in each factor) + ds.subsetByClass(x='D', subsets='subclasses') + # display the names of the subset tables that were generated in each study + ds.names('subclasses') + + # Example 2: subset the table initially assigned by the variable 'GENDER' + ds.subsetByClass(x='D', subsets='subtables', variables='GENDER') + # display the names of the subset tables that were generated in each study + ds.names('subtables') + + # Example 3: generate a new variable 'gender' and split it into two vectors: males + # and females + ds.assign(toAssign='D$GENDER', newobj='gender') + ds.subsetByClass(x='gender', subsets='subvectors') + # display the names of the subset vectors that were generated in each study + ds.names('subvectors') + + # clear the Datashield R sessions and logout + datashield.logout(conns) + +} + +} +\seealso{ +\link{ds.meanByClass} to compute mean and standard deviation across categories of a factor vectors. + +\link{ds.subset} to subset by complete cases (i.e. removing missing values), threshold, columns and rows. +} +\author{ +Gaye, A. +} diff --git a/man/ds.table1D.Rd b/man/ds.table1D.Rd index d480b3bb1..b79ee21ee 100644 --- a/man/ds.table1D.Rd +++ b/man/ds.table1D.Rd @@ -14,11 +14,11 @@ ds.table1D( \arguments{ \item{x}{a character, the name of a numerical vector with discrete values - usually a factor.} -\item{type}{a character which represent the type of table to ouput: pooled table or one table for each +\item{type}{a character which represent the type of table to output: pooled table or one table for each data source. If \code{type} is set to 'combine', a pooled 1-dimensional table is returned; if If \code{type} is set to 'split' a 1-dimensional table is returned for each data source.} -\item{warningMessage}{a boolean, if set to TRUE (deafult) a warning is displayed if any returned table is invalid. Warning +\item{warningMessage}{a boolean, if set to TRUE (default) a warning is displayed if any returned table is invalid. Warning messages are suppressed if this parameter is set to FALSE. However the analyst can still view 'validity' information which are stored in the output object 'validity' - see the list of output objects.} diff --git a/man/ds.table2D.Rd b/man/ds.table2D.Rd index aec01d734..3d0e2a2c2 100644 --- a/man/ds.table2D.Rd +++ b/man/ds.table2D.Rd @@ -17,12 +17,12 @@ ds.table2D( \item{y}{a character, the name of a numerical vector with discrete values - usually a factor.} -\item{type}{a character which represent the type of table to ouput: pooled table or one table for each +\item{type}{a character which represent the type of table to output: pooled table or one table for each data source or both. If \code{type} is set to 'combine', a pooled 2-dimensional table is returned; If \code{type} is set to 'split' a 2-dimensional table is returned for each data source. If \code{type} is set to 'both' (default) a pooled 2-dimensional table plus a 2-dimensional table for each data source are returned.} -\item{warningMessage}{a boolean, if set to TRUE (deafult) a warning is displayed if any returned table is invalid. Warning +\item{warningMessage}{a boolean, if set to TRUE (default) a warning is displayed if any returned table is invalid. Warning messages are suppressed if this parameter is set to FALSE. However the analyst can still view 'validity' information which are stored in the output object 'validity' - see the list of output objects.} diff --git a/man/ds.unique.Rd b/man/ds.unique.Rd index 072510a43..61d6355bd 100644 --- a/man/ds.unique.Rd +++ b/man/ds.unique.Rd @@ -7,7 +7,7 @@ ds.unique(x.name = NULL, newobj = NULL, datasources = NULL) } \arguments{ -\item{x.name}{a character string providing the name of the varable, in the server, to perform \code{unique} upon} +\item{x.name}{a character string providing the name of the variable, in the server, to perform \code{unique} upon} \item{newobj}{a character string that provides the name for the output object that is stored on the data servers. Default \code{unique.newobj}.} diff --git a/man/ds.vectorCalc.Rd b/man/ds.vectorCalc.Rd index 6c97d344e..87d7a5dd7 100644 --- a/man/ds.vectorCalc.Rd +++ b/man/ds.vectorCalc.Rd @@ -26,10 +26,10 @@ server side function; it uses the R operation symbols built in DataSHIELD. } \details{ In DataSHIELD it is possible to perform an operation on vectors by just using the relevant -R symbols (e.g. '+' for addtion, '*' for multiplication, '-' for substraction and '/' for division). +R symbols (e.g. '+' for addition, '*' for multiplication, '-' for subtraction and '/' for division). This might however be inconvenient if the number of vectors to include in the operation is large. This function takes the names of two or more vectors and performs the desired operation which could be -an addition, a multiplication, a substraction or a division. If one or more vectors have a missing value +an addition, a multiplication, a subtraction or a division. If one or more vectors have a missing value at any one entry (i.e. observation), the operation returns a missing value ('NA') for that entry; the output vectors has, hence the same length as the input vectors. } diff --git a/man/glmChecks.Rd b/man/glmChecks.Rd index af57ca542..ec482bed6 100644 --- a/man/glmChecks.Rd +++ b/man/glmChecks.Rd @@ -12,7 +12,7 @@ glmChecks(formula, data, offset, weights, datasources) \item{data}{a character, the name of an optional data frame containing the variables in in the \code{formula}.} -\item{offset}{null or a numreric vector that can be used to specify an a priori known component to be +\item{offset}{null or a numeric vector that can be used to specify an a priori known component to be included in the linear predictor during fitting.} \item{weights}{a character, the name of an optional vector of 'prior weights' to be used in the fitting @@ -26,11 +26,11 @@ an integer 0 if check was passed and 1 if failed } \description{ This is an internal function required by the client function \code{ds.glm} -to verify all the variables and ensure the process does not halt inadvertanly. +to verify all the variables and ensure the process does not halt inadvertently } \details{ the variables are checked to ensure they are defined, not empty (i.e. are not missing -at complete) and evantually (if 'offset' or 'weights') are of 'numeric' with non negative value +at complete) and eventually (if 'offset' or 'weights') are of 'numeric' with non negative value (if 'weights'). } \author{ diff --git a/man/logical2int.Rd b/man/logical2int.Rd new file mode 100644 index 000000000..14517f63d --- /dev/null +++ b/man/logical2int.Rd @@ -0,0 +1,23 @@ +% Generated by roxygen2: do not edit by hand +% Please edit documentation in R/logical2int.R +\name{logical2int} +\alias{logical2int} +\title{Turns a logical operator into an integer} +\usage{ +logical2int(obj = NULL) +} +\arguments{ +\item{obj}{a character, the logical parameter to turn into an integer} +} +\value{ +an integer +} +\description{ +This is an internal function. +} +\details{ +This function is called to turn a logical operator given as a +character into an integer: '>' is turned into 1, '>=' into 2, '<' into 3, +'<=' into 4, '==' into 5 and '!=' into 6. +} +\keyword{internal} diff --git a/man/meanByClassHelper0a.Rd b/man/meanByClassHelper0a.Rd index 3880fa393..ec7fed67e 100644 --- a/man/meanByClassHelper0a.Rd +++ b/man/meanByClassHelper0a.Rd @@ -13,7 +13,7 @@ meanByClassHelper0a(a, b, type, datasources) \item{type}{a character which represents the type of analysis to carry out. If \code{type} is set to 'combine', a pooled table of results is generated. If \code{type} is set to 'split', a table of results -is genrated for each study.} +is generated for each study.} \item{datasources}{a list of \code{\link[DSI]{DSConnection-class}} objects obtained after login. If the the default set of connections will be used: see \link[DSI]{datashield.connections_default}.} diff --git a/man/meanByClassHelper0b.Rd b/man/meanByClassHelper0b.Rd index fbaa90aed..56dd89d10 100644 --- a/man/meanByClassHelper0b.Rd +++ b/man/meanByClassHelper0b.Rd @@ -15,7 +15,7 @@ meanByClassHelper0b(x, outvar, covar, type, datasources) \item{type}{a character which represents the type of analysis to carry out. If \code{type} is set to 'combine', a pooled table of results is generated. If \code{type} is set to 'split', a table of results -is genrated for each study.} +is generated for each study.} \item{datasources}{a list of \code{\link[DSI]{DSConnection-class}} objects obtained after login. If the the default set of connections will be used: see \link[DSI]{datashield.connections_default}.} @@ -29,7 +29,7 @@ This is an internal function. } \details{ This function is called by the function 'ds.meanByClass' to produce the final tables -if the user soecify a table structure. +if the user specify a table structure. } \author{ Gaye, A. diff --git a/man/meanByClassHelper2.Rd b/man/meanByClassHelper2.Rd index 38c98a934..27a763d74 100644 --- a/man/meanByClassHelper2.Rd +++ b/man/meanByClassHelper2.Rd @@ -14,7 +14,7 @@ the default set of connections will be used: see \link[DSI]{datashield.connectio \item{variables}{a character vector, the names of the continuous variables to computes a mean for.} -\item{invalidrecorder}{a list, holds informations about invalid subsets in each study.} +\item{invalidrecorder}{a list, holds information about invalid subsets in each study.} } \value{ a matrix, a table which contains the length, mean and standard deviation of each of the @@ -25,7 +25,7 @@ This is an internal function. } \details{ This function is called by the function 'ds.meanByClass' to produce the final table -if the user sets the parmater 'type' to combine (the default behaviour of 'ds.meanByClass'). +if the user sets the parameter 'type' to combine (the default behaviour of 'ds.meanByClass'). } \author{ Gaye, A. diff --git a/man/meanByClassHelper3.Rd b/man/meanByClassHelper3.Rd index e4fffdca7..ee80e814f 100644 --- a/man/meanByClassHelper3.Rd +++ b/man/meanByClassHelper3.Rd @@ -14,7 +14,7 @@ the default set of connections will be used: see \link[DSI]{datashield.connectio \item{variables}{a character vector, the names of the continuous variables to computes a mean for.} -\item{invalidrecorder}{a list, holds informations about invalid subsets in each study} +\item{invalidrecorder}{a list, holds information about invalid subsets in each study} } \value{ a list which one results table for each study. @@ -24,7 +24,7 @@ This is an internal function. } \details{ This function is called by the function 'ds.meanByClass' to produce the final tables -if the user sets the parmater 'type' to 'split'. +if the user sets the parameter 'type' to 'split'. } \author{ Gaye, A. diff --git a/man/subsetHelper.Rd b/man/subsetHelper.Rd new file mode 100644 index 000000000..6922ec94b --- /dev/null +++ b/man/subsetHelper.Rd @@ -0,0 +1,74 @@ +% Generated by roxygen2: do not edit by hand +% Please edit documentation in R/subsetHelper.R +\name{subsetHelper} +\alias{subsetHelper} +\title{Ensures that the requested subset is not larger than the original object} +\usage{ +subsetHelper(dts, data, rs = NULL, cs = NULL) +} +\arguments{ +\item{dts}{a list of \code{\link[DSI]{DSConnection-class}} +objects obtained after login. If the \code{datasources} argument is not specified +the default set of connections will be used: see \code{\link[DSI]{datashield.connections_default}}.} + +\item{data}{a character string specifying the name of the data frame or +the factor vector and the range of the subset.} + +\item{rs}{a vector of two integers specifying the indices of the rows de extract.} + +\item{cs}{a vector of two integers or one or more characters.} +} +\value{ +\code{subsetHelper} returns a message or the class of the object if the +object has the same class in all studies. +} +\description{ +Compares subset and original object sizes and eventually carries out subsetting. +} +\details{ +This function is called by the function \code{ds.subset} to ensure that the requested subset +is not larger than the original object. + +This function is internal. + +Server function called: \code{dimDS} +} +\examples{ +\dontrun{ + + ## Version 6, for version 5 see the Wiki + + # connecting to the Opal servers + + require('DSI') + require('DSOpal') + require('dsBaseClient') + + builder <- DSI::newDSLoginBuilder() + builder$append(server = "study1", + url = "http://192.168.56.100:8080/", + user = "administrator", password = "datashield_test&", + table = "CNSIM.CNSIM1", driver = "OpalDriver") + builder$append(server = "study2", + url = "http://192.168.56.100:8080/", + user = "administrator", password = "datashield_test&", + table = "CNSIM.CNSIM2", driver = "OpalDriver") + builder$append(server = "study3", + url = "http://192.168.56.100:8080/", + user = "administrator", password = "datashield_test&", + table = "CNSIM.CNSIM3", driver = "OpalDriver") + logindata <- builder$build() + + connections <- DSI::datashield.login(logins = logindata, assign = TRUE, symbol = "D") + + subsetHelper(dts = connections, + data = "D", + rs = 1:10, + cs = c("D$LAB_TSC","D$LAB_TRIG")) + + # clear the Datashield R sessions and logout + datashield.logout(connections) +} + +} +\keyword{internal} diff --git a/opal_azure-pipelines.yml b/opal_azure-pipelines.yml index 20d815d16..7c92d39af 100644 --- a/opal_azure-pipelines.yml +++ b/opal_azure-pipelines.yml @@ -140,7 +140,7 @@ jobs: sudo R -q -e "install.packages(c('MolgenisAuth', 'MolgenisArmadillo', 'DSMolgenisArmadillo'), dependencies=TRUE, repos='https://cloud.r-project.org')" sudo R -q -e "install.packages(c('DescTools','e1071'), dependencies=TRUE, repos='https://cloud.r-project.org')" - sudo R -q -e "library('devtools'); devtools::install_github(repo='datashield/dsDangerClient', ref='6.3.1', dependencies = TRUE)" + sudo R -q -e "library('devtools'); devtools::install_github(repo='datashield/dsDangerClient', ref='6.3.4', dependencies = TRUE)" # XML grep for coverage report merging sudo apt-get install -qq xml-twig-tools -y @@ -233,9 +233,9 @@ jobs: # Install dsBase. # If previous steps have failed then don't run. - bash: | - R -q -e "library(opalr); opal <- opal.login(username = 'administrator', password = 'datashield_test&', url = 'https://localhost:8443', opts = list(ssl_verifyhost=0, ssl_verifypeer=0)); opal.put(opal, 'system', 'conf', 'general', '_rPackage'); opal.logout(o)" + R -q -e "library(opalr); opal <- opal.login(username = 'administrator', password = 'datashield_test&', url = 'https://localhost:8443', opts = list(ssl_verifyhost=0, ssl_verifypeer=0)); opal.put(opal, 'system', 'conf', 'general', '_rPackage'); opal.logout(opal)" - R -q -e "library(opalr); opal <- opal.login('administrator','datashield_test&', url='https://localhost:8443/', opts = list(ssl_verifyhost=0, ssl_verifypeer=0)); dsadmin.install_github_package(opal, 'dsBase', username = 'datashield', ref = '6.3.2'); opal.logout(opal)" + R -q -e "library(opalr); opal <- opal.login('administrator','datashield_test&', url='https://localhost:8443/', opts = list(ssl_verifyhost=0, ssl_verifypeer=0)); dsadmin.install_github_package(opal, 'dsBase', username = 'datashield', ref = 'v6.4.0-dev'); opal.logout(opal)" sleep 60 @@ -363,7 +363,7 @@ jobs: R -q -e "library(opalr); opal <- opal.login(username = 'administrator', password = 'datashield_test&', url = 'https://localhost:8443', opts = list(ssl_verifyhost=0, ssl_verifypeer=0)); opal.put(opal, 'system', 'conf', 'general', '_rPackage'); opal.logout(o)" - R -q -e "library(opalr); opal <- opal.login('administrator','datashield_test&', url='https://localhost:8443/', opts = list(ssl_verifyhost=0, ssl_verifypeer=0)); dsadmin.install_github_package(opal, 'dsDanger', username = 'datashield', ref = '6.3.1'); opal.logout(opal)" + R -q -e "library(opalr); opal <- opal.login('administrator','datashield_test&', url='https://localhost:8443/', opts = list(ssl_verifyhost=0, ssl_verifypeer=0)); dsadmin.install_github_package(opal, 'dsDanger', username = 'datashield', ref = '6.3.4'); opal.logout(opal)" workingDirectory: $(Pipeline.Workspace)/dsBaseClient displayName: 'Install dsDanger package on Opal server' diff --git a/tests/docker/armadillo/standard/config/application.yml b/tests/docker/armadillo/standard/config/application.yml index c63077640..54e90c36a 100644 --- a/tests/docker/armadillo/standard/config/application.yml +++ b/tests/docker/armadillo/standard/config/application.yml @@ -14,22 +14,11 @@ armadillo: # oidc-admin-user: user@yourdomain.org profiles: - name: default -<<<<<<< HEAD - image: datashield/rock-margin-gypsum-permissive:latest + image: datashield/rock-quebrada-lamda-permissive:latest port: 8085 -======= - image: datashield/rserver-neutron-gypsum-permissive:latest - port: 6311 ->>>>>>> origin/v6.3.3-dev host: default - package-whitelist: # Packages for 'gypsum-permissive' + package-whitelist: # Packages for 'permissive' - dsBase - - dsMediation - - dsMTLBase - - dsSurvival - - dsTidyverse - - dsExposome - - dsOmics - resourcer function-blacklist: [ ] options: diff --git a/tests/testthat.R b/tests/testthat.R index 3e6bbe151..389ee66c5 100644 --- a/tests/testthat.R +++ b/tests/testthat.R @@ -9,4 +9,5 @@ library(testthat) library(dsBaseClient) -test_check("dsBaseClient") +if (identical(Sys.getenv("NOT_CRAN"), "true")) + test_check("dsBaseClient") diff --git a/tests/testthat/connection_to_datasets/login_details.R b/tests/testthat/connection_to_datasets/login_details.R index 95a001a5f..2ce4ca2de 100644 --- a/tests/testthat/connection_to_datasets/login_details.R +++ b/tests/testthat/connection_to_datasets/login_details.R @@ -4,7 +4,7 @@ source("connection_to_datasets/init_local_settings.R") init.ip.address() -# create blank enviroment of test data +# create blank environment of test data ds.test_env <- new.env() # this option helps DSI to find the connection objects by looking in the right environment diff --git a/tests/testthat/data_files/dataBootstrapUnitTests.R b/tests/testthat/data_files/dataBootstrapUnitTests.R deleted file mode 100644 index 4c51af16a..000000000 --- a/tests/testthat/data_files/dataBootstrapUnitTests.R +++ /dev/null @@ -1,117 +0,0 @@ -library(remotes) -install.packages("MolgenisArmadillo", repos = "https://registry.molgenis.org/repository/R") -library(MolgenisArmadillo) -library(DSI) - -# init_studies_dataset -CNSIM1 <- load("data_files/CNSIM/CNSIM1.rda") -CNSIM2 <- load("data_files/CNSIM/CNSIM2.rda") -CNSIM3 <- load("data_files/CNSIM/CNSIM3.rda") - -DASIM1 <- load("data_files/DASIM/DASIM1.rda") -DASIM2 <- load("data_files/DASIM/DASIM2.rda") -DASIM3 <- load("data_files/DASIM/DASIM3.rda") - -EXPAND_WITH_MISSING1 <- load("data_files/SURVIVAL/EXPAND_MISSING/expand_missing_study1.rda") -EXPAND_WITH_MISSING2 <- load("data_files/SURVIVAL/EXPAND_MISSING/expand_missing_study2.rda") -EXPAND_WITH_MISSING3 <- load("data_files/SURVIVAL/EXPAND_MISSING/expand_missing_study3.rda") - -CLUSTER_INT1 <- load("data_files/CLUSTER/CLUSTER_INT1.rda") -CLUSTER_INT2 <- load("data_files/CLUSTER/CLUSTER_INT2.rda") -CLUSTER_INT3 <- load("data_files/CLUSTER/CLUSTER_INT3.rda") - -CLUSTER_SLO1 <- load("data_files/CLUSTER/CLUSTER_SLO1.rda") -CLUSTER_SLO2 <- load("data_files/CLUSTER/CLUSTER_SLO2.rda") -CLUSTER_SLO3 <- load("data_files/CLUSTER/CLUSTER_SLO3.rda") - -# init_discordant_datasets -DISCORDANT_STUDY1 <- load("data_files/DISCORDANT/discordant_study1.rda") -DISCORDANT_STUDY2 <- load("data_files/DISCORDANT/discordant_study2.rda") -DISCORDANT_STUDY3 <- load("data_files/DISCORDANT/discordant_study3.rda") - -# init_testing_datasets -DATASET1 <- load("data_files/TESTING/DATASET1.rda") -DATASET2 <- load("data_files/TESTING/DATASET2.rda") -DATASET3 <- load("data_files/TESTING/DATASET3.rda") - -FACTOR_LEVELS_DATASET1 <- load("data_files/FACTOR_LEVELS/FACTOR_LEVELS_DATASET1.rda") -FACTOR_LEVELS_DATASET2 <- load("data_files/FACTOR_LEVELS/FACTOR_LEVELS_DATASET2.rda") -FACTOR_LEVELS_DATASET3 <- load("data_files/FACTOR_LEVELS/FACTOR_LEVELS_DATASET3.rda") - - -storage_url <- "http://localhost:9000" -# access_key and secret_key can be found in the minio configuration in the docker-compose.yml -MolgenisArmadillo::armadillo.set_credentials(server = storage_url, access_key = "molgenis", secret_key = "molgenis") -MolgenisArmadillo::armadillo.create_project("testdata") - - -# init_studies_datasets -MolgenisArmadillo::armadillo.upload_table("testdata", "cnsim", CNSIM1) -MolgenisArmadillo::armadillo.upload_table("testdata", "cnsim", CNSIM2) -MolgenisArmadillo::armadillo.upload_table("testdata", "cnsim", CNSIM3) - -MolgenisArmadillo::armadillo.upload_table("testdata", "dasim", DASIM1) -MolgenisArmadillo::armadillo.upload_table("testdata", "dasim", DASIM2) -MolgenisArmadillo::armadillo.upload_table("testdata", "dasim", DASIM3) - -MolgenisArmadillo::armadillo.upload_table("testdata", "survival", EXPAND_WITH_MISSING1) -MolgenisArmadillo::armadillo.upload_table("testdata", "survival", EXPAND_WITH_MISSING2) -MolgenisArmadillo::armadillo.upload_table("testdata", "survival", EXPAND_WITH_MISSING3) - -MolgenisArmadillo::armadillo.upload_table("testdata", "cluster", CLUSTER_INT1) -MolgenisArmadillo::armadillo.upload_table("testdata", "cluster", CLUSTER_INT2) -MolgenisArmadillo::armadillo.upload_table("testdata", "cluster", CLUSTER_INT3) - -MolgenisArmadillo::armadillo.upload_table("testdata", "cluster", CLUSTER_SLO1) -MolgenisArmadillo::armadillo.upload_table("testdata", "cluster", CLUSTER_SLO2) -MolgenisArmadillo::armadillo.upload_table("testdata", "cluster", CLUSTER_SLO3) - - -# init_discordant_datasets -MolgenisArmadillo::armadillo.upload_table("testdata", "discordant", DISCORDANT_STUDY1) -MolgenisArmadillo::armadillo.upload_table("testdata", "discordant", DISCORDANT_STUDY2) -MolgenisArmadillo::armadillo.upload_table("testdata", "discordant", DISCORDANT_STUDY3) - - -# remove first column -DATASET1 <- DATASET1[,-1] -DATASET2 <- DATASET2[,-1] -DATASET3 <- DATASET3[,-1] - -# init_testing_datasets -MolgenisArmadillo::armadillo.upload_table("testdata", "testing", DATASET1) -MolgenisArmadillo::armadillo.upload_table("testdata", "testing", DATASET2) -MolgenisArmadillo::armadillo.upload_table("testdata", "testing", DATASET3) - -MolgenisArmadillo::armadillo.upload_table("testdata", "factor_levels", FACTOR_LEVELS_DATASET1) -MolgenisArmadillo::armadillo.upload_table("testdata", "factor_levels", FACTOR_LEVELS_DATASET2) -MolgenisArmadillo::armadillo.upload_table("testdata", "factor_levels", FACTOR_LEVELS_DATASET3) - -class(CNSIM1$PM_BMI_CATEGORICAL) -levels(CNSIM1$PM_BMI_CATEGORICAL) - -devtools::test() -devtools::test(filter = "datachk", invert = TRUE) -devtools::test(filter = "dataFrameSort") - - # build the login dataframe -builder <- DSI::newDSLoginBuilder() -builder$append(server = "armadillo", - url = armadillo_url, - user = "admin", - password = "admin", - table = "testdata/testing/DISCORDANT_STUDY1", - driver = "ArmadilloDriver") - -# create loginframe -logindata <- builder$build() -logindata - -datashield.logout(conns) - -conns <- datashield.login(logins = logindata, assign = TRUE) -ds.ls() -dsGetInfo(conns$armadillo) -ds.colnames("D") -datashield.errors() -dsGetInfo(conns$armadillo) diff --git a/tests/testthat/dstest_functions/ds_expect_variables.R b/tests/testthat/dstest_functions/ds_expect_variables.R index 54d051c43..abb504c78 100644 --- a/tests/testthat/dstest_functions/ds_expect_variables.R +++ b/tests/testthat/dstest_functions/ds_expect_variables.R @@ -13,9 +13,9 @@ # ds_expect_variables <- function(expected.variables) { - studies.current.varables <- ds.ls() + studies.current.variables <- ds.ls() - for (study.current.varables in studies.current.varables) { - expect_setequal(study.current.varables$objects.found, expected.variables) + for (study.current.variables in studies.current.variables) { + expect_setequal(study.current.variables$objects.found, expected.variables) } } diff --git a/tests/testthat/perf_files/armadillo_azure-pipeline.csv b/tests/testthat/perf_files/armadillo_azure-pipeline.csv index 186e1d583..e913cff92 100644 --- a/tests/testthat/perf_files/armadillo_azure-pipeline.csv +++ b/tests/testthat/perf_files/armadillo_azure-pipeline.csv @@ -1,14 +1,14 @@ "refer_name","rate","lower_tolerance","upper_tolerance" -"conndisconn::perf::simple0","0.1275","0.5","2" -"ds.abs::perf::0","4.824","0.5","2" -"ds.asInteger::perf:0","4.366","0.5","2" -"ds.asList::perf:0","9.787","0.5","2" -"ds.asNumeric::perf:0","4.316","0.5","2" -"ds.assign::perf::0","8.055","0.5","2" -"ds.class::perf::combine:0","9.847","0.5","2" -"ds.colnames::perf:0","7.574","0.5","2" -"ds.exists::perf::combine:0","19.84","0.5","2" -"ds.length::perf::combine:0","19.58","0.5","2" -"ds.mean::perf::combine:0","19.66","0.5","2" -"ds.mean::perf::split:0","19.21","0.5","2" -"void::perf::void::0","41810.0","0.5","2" +"conndisconn::perf::simple0","0.1225","0.5","2" +"ds.abs::perf::0","5.820","0.5","2" +"ds.asInteger::perf:0","5.328","0.5","2" +"ds.asList::perf:0","11.71","0.5","2" +"ds.asNumeric::perf:0","5.268","0.5","2" +"ds.assign::perf::0","9.229","0.5","2" +"ds.class::perf::combine:0","10.84","0.5","2" +"ds.colnames::perf:0","7.993","0.5","2" +"ds.exists::perf::combine:0","21.68","0.5","2" +"ds.length::perf::combine:0","21.84","0.5","2" +"ds.mean::perf::combine:0","22.01","0.5","2" +"ds.mean::perf::split:0","22.22","0.5","2" +"void::perf::void::0","48520.0","0.5","2" diff --git a/tests/testthat/perf_files/armadillo_hp-laptop_quay.csv b/tests/testthat/perf_files/armadillo_hp-laptop_quay.csv index 417e89f4d..9ac69853e 100644 --- a/tests/testthat/perf_files/armadillo_hp-laptop_quay.csv +++ b/tests/testthat/perf_files/armadillo_hp-laptop_quay.csv @@ -1,14 +1,14 @@ "refer_name","rate","lower_tolerance","upper_tolerance" -"conndisconn::perf::simple0","0.0728825086646545","0.5","2" -"ds.abs::perf::0","1.82780826738886","0.5","2" -"ds.asInteger::perf:0","1.82494215205532","0.5","2" -"ds.asList::perf:0","4.63744814345485","0.5","2" -"ds.asNumeric::perf:0","2.17634899364127","0.5","2" -"ds.assign::perf::0","4.03888444894903","0.5","2" -"ds.class::perf::combine:0","4.99978056980171","0.5","2" -"ds.colnames::perf:0","3.24967546869707","0.5","2" -"ds.exists::perf::combine:0","9.59415959170337","0.5","2" -"ds.length::perf::combine:0","9.9987761882776","0.5","2" -"ds.mean::perf::combine:0","8.62936433290321","0.5","2" -"ds.mean::perf::split:0","8.55029467108351","0.5","2" -"void::perf::void::0","21874.0401780822","0.5","2" +"conndisconn::perf::simple0","0.04918","0.5","2" +"ds.abs::perf::0","1.184","0.5","2" +"ds.asInteger::perf:0","1.297","0.5","2" +"ds.asList::perf:0","2.884","0.5","2" +"ds.asNumeric::perf:0","1.354","0.5","2" +"ds.assign::perf::0","2.745","0.5","2" +"ds.class::perf::combine:0","3.261","0.5","2" +"ds.colnames::perf:0","2.404","0.5","2" +"ds.exists::perf::combine:0","6.342","0.5","2" +"ds.length::perf::combine:0","7.835","0.5","2" +"ds.mean::perf::combine:0","8.127","0.5","2" +"ds.mean::perf::split:0","8.109","0.5","2" +"void::perf::void::0","20280.0","0.5","2" diff --git a/tests/testthat/perf_files/default_perf_profile.csv b/tests/testthat/perf_files/default_perf_profile.csv index cff242360..ead056989 100644 --- a/tests/testthat/perf_files/default_perf_profile.csv +++ b/tests/testthat/perf_files/default_perf_profile.csv @@ -1,14 +1,14 @@ "refer_name","rate","lower_tolerance","upper_tolerance" -"conndisconn::perf::simple0","0.2118","0.5","2" -"ds.abs::perf::0","1.718","0.5","2" -"ds.asInteger::perf:0","1.484","0.5","2" -"ds.asList::perf:0","3.050","0.5","2" -"ds.asNumeric::perf:0","1.508","0.5","2" -"ds.assign::perf::0","3.547","0.5","2" -"ds.class::perf::combine:0","3.061","0.5","2" -"ds.colnames::perf:0","2.456","0.5","2" -"ds.exists::perf::combine:0","6.904","0.5","2" -"ds.length::perf::combine:0","6.058","0.5","2" -"ds.mean::perf::combine:0","5.892","0.5","2" -"ds.mean::perf::split:0","6.881","0.5","2" -"void::perf::void::0","27070.0","0.5","2" +"conndisconn::perf::simple0","0.2725","0.5","2" +"ds.abs::perf::0","2.677","0.5","2" +"ds.asInteger::perf:0","2.294","0.5","2" +"ds.asList::perf:0","4.587","0.5","2" +"ds.asNumeric::perf:0","2.185","0.5","2" +"ds.assign::perf::0","5.490","0.5","2" +"ds.class::perf::combine:0","4.760","0.5","2" +"ds.colnames::perf:0","9.578","0.5","2" +"ds.exists::perf::combine:0","11.09","0.5","2" +"ds.length::perf::combine:0","9.479","0.5","2" +"ds.mean::perf::combine:0","9.650","0.5","2" +"ds.mean::perf::split:0","11.26","0.5","2" +"void::perf::void::0","46250.0","0.5","2" diff --git a/tests/testthat/perf_files/opal_azure-pipeline.csv b/tests/testthat/perf_files/opal_azure-pipeline.csv index cff242360..d75711a36 100644 --- a/tests/testthat/perf_files/opal_azure-pipeline.csv +++ b/tests/testthat/perf_files/opal_azure-pipeline.csv @@ -1,14 +1,14 @@ "refer_name","rate","lower_tolerance","upper_tolerance" -"conndisconn::perf::simple0","0.2118","0.5","2" -"ds.abs::perf::0","1.718","0.5","2" -"ds.asInteger::perf:0","1.484","0.5","2" -"ds.asList::perf:0","3.050","0.5","2" -"ds.asNumeric::perf:0","1.508","0.5","2" -"ds.assign::perf::0","3.547","0.5","2" -"ds.class::perf::combine:0","3.061","0.5","2" -"ds.colnames::perf:0","2.456","0.5","2" -"ds.exists::perf::combine:0","6.904","0.5","2" -"ds.length::perf::combine:0","6.058","0.5","2" -"ds.mean::perf::combine:0","5.892","0.5","2" -"ds.mean::perf::split:0","6.881","0.5","2" -"void::perf::void::0","27070.0","0.5","2" +"conndisconn::perf::simple0","0.2725","0.5","2" +"ds.abs::perf::0","2.677","0.5","2" +"ds.asInteger::perf:0","2.294","0.5","2" +"ds.asList::perf:0","4.587","0.5","2" +"ds.asNumeric::perf:0","2.185","0.5","2" +"ds.assign::perf::0","5.490","0.5","2" +"ds.class::perf::combine:0","4.760","0.5","2" +"ds.colnames::perf:0","4.159","0.5","2" +"ds.exists::perf::combine:0","11.09","0.5","2" +"ds.length::perf::combine:0","9.479","0.5","2" +"ds.mean::perf::combine:0","9.650","0.5","2" +"ds.mean::perf::split:0","11.26","0.5","2" +"void::perf::void::0","46250.0","0.5","2" diff --git a/tests/testthat/perf_files/opal_hp-laptop_quay.csv b/tests/testthat/perf_files/opal_hp-laptop_quay.csv index a6e5e655a..334cd62c1 100644 --- a/tests/testthat/perf_files/opal_hp-laptop_quay.csv +++ b/tests/testthat/perf_files/opal_hp-laptop_quay.csv @@ -1,14 +1,14 @@ "refer_name","rate","lower_tolerance","upper_tolerance" -"conndisconn::perf::simple0","0.163258942292474","0.5","2" -"ds.abs::perf::0","0.855013692368105","0.5","2" -"ds.asInteger::perf:0","0.788986058823576","0.5","2" -"ds.asList::perf:0","1.77505549252221","0.5","2" -"ds.asNumeric::perf:0","0.877591207737289","0.5","2" -"ds.assign::perf::0","2.08707546713196","0.5","2" -"ds.class::perf::combine:0","1.65635603819885","0.5","2" -"ds.colnames::perf:0","1.33221754701434","0.5","2" -"ds.exists::perf::combine:0","4.18346517297051","0.5","2" -"ds.length::perf::combine:0","3.45700158311582","0.5","2" -"ds.mean::perf::combine:0","3.36796688580702","0.5","2" -"ds.mean::perf::split:0","4.11472547478384","0.5","2" -"void::perf::void::0","23198.7075219865","0.5","2" +"conndisconn::perf::simple0","0.147643461923159","0.5","2" +"ds.abs::perf::0","0.631818039001181","0.5","2" +"ds.asInteger::perf:0","0.675696161933654","0.5","2" +"ds.asList::perf:0","1.59078428438764","0.5","2" +"ds.asNumeric::perf:0","0.692813012683229","0.5","2" +"ds.assign::perf::0","1.89351857736982","0.5","2" +"ds.class::perf::combine:0","1.62870246867488","0.5","2" +"ds.colnames::perf:0","1.32209430785405","0.5","2" +"ds.exists::perf::combine:0","3.45004426293124","0.5","2" +"ds.length::perf::combine:0","2.78832377100152","0.5","2" +"ds.mean::perf::combine:0","2.7801284055162","0.5","2" +"ds.mean::perf::split:0","3.67443474363821","0.5","2" +"void::perf::void::0","18974.1385397392","0.5","2" diff --git a/tests/testthat/setup.R b/tests/testthat/setup.R index 4c55c6e74..512e649c1 100644 --- a/tests/testthat/setup.R +++ b/tests/testthat/setup.R @@ -1,6 +1,6 @@ #------------------------------------------------------------------------------- # Copyright (c) 2019-2022 University of Newcastle upon Tyne. All rights reserved. -# Copyright (c) 2022 Arjuna Technologies, Newcastle upon Tyne. All rights reserved. +# Copyright (c) 2022-2025 Arjuna Technologies, Newcastle upon Tyne. All rights reserved. # # This program and the accompanying materials # are made available under the terms of the GNU Public License v3.0. @@ -8,11 +8,12 @@ # You should have received a copy of the GNU General Public License # along with this program. If not, see . #------------------------------------------------------------------------------- + # # Datashield test suite set up # -context("setup - start") +# context("setup - start") # Convert 'warnings' to 'errors' # options(warn = 2) @@ -33,4 +34,4 @@ source("connection_to_datasets/init_studies_datasets.R") source("connection_to_datasets/init_discordant_datasets.R") source("connection_to_datasets/init_mediation_datasets.R") -context("setup - done") +# context("setup - done") diff --git a/tests/testthat/teardown.R b/tests/testthat/teardown.R index 710dac810..5026a0dbf 100644 --- a/tests/testthat/teardown.R +++ b/tests/testthat/teardown.R @@ -1,5 +1,6 @@ #------------------------------------------------------------------------------- # Copyright (c) 2018-2022 University of Newcastle upon Tyne. All rights reserved. +# Copyright (c) 2022-2025 Arjuna Technologies, Newcastle upon Tyne. All rights reserved. # # This program and the accompanying materials # are made available under the terms of the GNU Public License v3.0. @@ -8,6 +9,6 @@ # along with this program. If not, see . #------------------------------------------------------------------------------- -context("teardown") +# context("teardown") -context("teardown - done") +# context("teardown - done") diff --git a/tests/testthat/test-_-vm-test.R b/tests/testthat/test-_-vm-test.R index 952425f56..7b5af1f4e 100644 --- a/tests/testthat/test-_-vm-test.R +++ b/tests/testthat/test-_-vm-test.R @@ -1,5 +1,6 @@ #------------------------------------------------------------------------------- # Copyright (c) 2019-2022 University of Newcastle upon Tyne. All rights reserved. +# Copyright (c) 2022-2025 Arjuna Technologies, Newcastle upon Tyne. All rights reserved. # # This program and the accompanying materials # are made available under the terms of the GNU Public License v3.0. @@ -12,7 +13,7 @@ # Set up # -context("vm-test::_::setup") +# context("vm-test::_::setup") init.testing.datasets() @@ -21,7 +22,7 @@ init.testing.datasets() # #connect to a server -context("vm-test::_::tests::vm") +# context("vm-test::_::tests::vm") test_that("The virtual machine is loaded. ", { @@ -33,11 +34,11 @@ test_that("The virtual machine is loaded. ", # Shutdown # -context("vm-test::_::shutdown") +# context("vm-test::_::shutdown") # # Done # -context("vm-test::_::done") +# context("vm-test::_::done") diff --git a/tests/testthat/test-arg-ds.Boole.R b/tests/testthat/test-arg-ds.Boole.R index fdfc45026..d8fb3bedf 100644 --- a/tests/testthat/test-arg-ds.Boole.R +++ b/tests/testthat/test-arg-ds.Boole.R @@ -1,5 +1,6 @@ #------------------------------------------------------------------------------- # Copyright (c) 2018-2022 University of Newcastle upon Tyne. All rights reserved. +# Copyright (c) 2022-2025 Arjuna Technologies, Newcastle upon Tyne. All rights reserved. # # This program and the accompanying materials # are made available under the terms of the GNU Public License v3.0. @@ -18,7 +19,7 @@ connect.studies.dataset.cnsim(list("LAB_TSC", "LAB_TRIG")) # Tests # -context("ds.Boole::arg::test errors") +# context("ds.Boole::arg::test errors") test_that("Boole_erros", { expect_error(ds.Boole(), "Please provide the name of the column or scalar that holds V1!", fixed=TRUE) expect_error(ds.Boole(V1="D$LAB_TSC"), "Please provide the name of a column or scalar holding V2 or declare a scalar in character format: eg '3'", fixed=TRUE) diff --git a/tests/testthat/test-arg-ds.asCharacter.R b/tests/testthat/test-arg-ds.asCharacter.R index a007ec6a3..8d7d35449 100644 --- a/tests/testthat/test-arg-ds.asCharacter.R +++ b/tests/testthat/test-arg-ds.asCharacter.R @@ -1,5 +1,6 @@ #------------------------------------------------------------------------------- # Copyright (c) 2018-2022 University of Newcastle upon Tyne. All rights reserved. +# Copyright (c) 2022-2025 Arjuna Technologies, Newcastle upon Tyne. All rights reserved. # # This program and the accompanying materials # are made available under the terms of the GNU Public License v3.0. @@ -18,7 +19,7 @@ connect.discordant.dataset.simple(list("A", "B", "C")) # Tests # -context("ds.asCharacter::arg::test errors") +# context("ds.asCharacter::arg::test errors") test_that("asCharacter_erros", { expect_error(ds.asCharacter(), "Please provide the name of the input vector!", fixed=TRUE) }) diff --git a/tests/testthat/test-arg-ds.asDataFrame.R b/tests/testthat/test-arg-ds.asDataFrame.R index 563a30de6..8149e30bd 100644 --- a/tests/testthat/test-arg-ds.asDataFrame.R +++ b/tests/testthat/test-arg-ds.asDataFrame.R @@ -1,6 +1,7 @@ #------------------------------------------------------------------------------- # Copyright (c) 2018-2022 University of Newcastle upon Tyne. All rights reserved. -# +# Copyright (c) 2022-2025 Arjuna Technologies, Newcastle upon Tyne. All rights reserved. +# # This program and the accompanying materials # are made available under the terms of the GNU Public License v3.0. # @@ -18,9 +19,9 @@ connect.studies.dataset.cnsim(list("LAB_TSC")) # Tests # -context("ds.asDataFrame::arg::test errors") -test_that("asDataFrame_errors", { - expect_error(ds.asDataMatrix(), "Please provide the name of the input vector!", fixed=TRUE) +# context("ds.subset::arg::test errors") +test_that("subset_erros", { + expect_error(expect_warning(ds.subset(), "'ds.subset' is deprecated.", fixed = TRUE), "Please provide the name of the object to subset from!", fixed=TRUE) }) # diff --git a/tests/testthat/test-arg-ds.asDataMatrix.R b/tests/testthat/test-arg-ds.asDataMatrix.R index e84e2281b..ca65f6cb0 100644 --- a/tests/testthat/test-arg-ds.asDataMatrix.R +++ b/tests/testthat/test-arg-ds.asDataMatrix.R @@ -1,5 +1,6 @@ #------------------------------------------------------------------------------- # Copyright (c) 2018-2022 University of Newcastle upon Tyne. All rights reserved. +# Copyright (c) 2022-2025 Arjuna Technologies, Newcastle upon Tyne. All rights reserved. # # This program and the accompanying materials # are made available under the terms of the GNU Public License v3.0. @@ -18,7 +19,7 @@ connect.studies.dataset.cnsim(list("LAB_TSC")) # Tests # -context("ds.asDataMatrix::arg::test errors") +# context("ds.asDataMatrix::arg::test errors") test_that("asDataMatrix_erros", { expect_error(ds.asDataMatrix(), "Please provide the name of the input vector!", fixed=TRUE) }) diff --git a/tests/testthat/test-arg-ds.asFactor.R b/tests/testthat/test-arg-ds.asFactor.R index bfc4662dc..a264b040a 100644 --- a/tests/testthat/test-arg-ds.asFactor.R +++ b/tests/testthat/test-arg-ds.asFactor.R @@ -1,5 +1,6 @@ #------------------------------------------------------------------------------- # Copyright (c) 2018-2022 University of Newcastle upon Tyne. All rights reserved. +# Copyright (c) 2022-2025 Arjuna Technologies, Newcastle upon Tyne. All rights reserved. # # This program and the accompanying materials # are made available under the terms of the GNU Public License v3.0. @@ -18,7 +19,7 @@ connect.studies.dataset.cnsim(list("LAB_TSC")) # Tests # -context("ds.asFactor::arg::test errors") +# context("ds.asFactor::arg::test errors") test_that("asFactor_erros", { expect_error(ds.asFactor(), "Please provide the name of the variable that is to be converted to a factor e.g. 'varname'", fixed=TRUE) expect_error(ds.asFactor(input.var.name=1), "Please provide the name of the variable that is to be converted to a factor in character format e.g. 'varname'", fixed=TRUE) diff --git a/tests/testthat/test-arg-ds.asInteger.R b/tests/testthat/test-arg-ds.asInteger.R index a6a1196ef..c6305012e 100644 --- a/tests/testthat/test-arg-ds.asInteger.R +++ b/tests/testthat/test-arg-ds.asInteger.R @@ -1,5 +1,6 @@ #------------------------------------------------------------------------------- # Copyright (c) 2018-2022 University of Newcastle upon Tyne. All rights reserved. +# Copyright (c) 2022-2025 Arjuna Technologies, Newcastle upon Tyne. All rights reserved. # # This program and the accompanying materials # are made available under the terms of the GNU Public License v3.0. @@ -18,7 +19,7 @@ connect.studies.dataset.cnsim(list("LAB_TSC")) # Tests # -context("ds.asInteger::arg::test errors") +# context("ds.asInteger::arg::test errors") test_that("asInteger_erros", { expect_error(ds.asInteger(), "Please provide the name of the input vector!", fixed=TRUE) }) diff --git a/tests/testthat/test-arg-ds.asList.R b/tests/testthat/test-arg-ds.asList.R index c498d36cd..926401881 100644 --- a/tests/testthat/test-arg-ds.asList.R +++ b/tests/testthat/test-arg-ds.asList.R @@ -1,5 +1,6 @@ #------------------------------------------------------------------------------- # Copyright (c) 2018-2022 University of Newcastle upon Tyne. All rights reserved. +# Copyright (c) 2022-2025 Arjuna Technologies, Newcastle upon Tyne. All rights reserved. # # This program and the accompanying materials # are made available under the terms of the GNU Public License v3.0. @@ -18,7 +19,7 @@ connect.studies.dataset.cnsim(list("LAB_TSC")) # Tests # -context("ds.asList::arg::test errors") +# context("ds.asList::arg::test errors") test_that("asList_erros", { expect_error(ds.asList(), "Please provide the name of the input vector!", fixed=TRUE) }) diff --git a/tests/testthat/test-arg-ds.asLogical.R b/tests/testthat/test-arg-ds.asLogical.R index 64912059a..39056cc38 100644 --- a/tests/testthat/test-arg-ds.asLogical.R +++ b/tests/testthat/test-arg-ds.asLogical.R @@ -1,5 +1,6 @@ #------------------------------------------------------------------------------- # Copyright (c) 2018-2022 University of Newcastle upon Tyne. All rights reserved. +# Copyright (c) 2022-2025 Arjuna Technologies, Newcastle upon Tyne. All rights reserved. # # This program and the accompanying materials # are made available under the terms of the GNU Public License v3.0. @@ -18,7 +19,7 @@ connect.studies.dataset.cnsim(list("LAB_TSC")) # Tests # -context("ds.asLogical::arg::test errors") +# context("ds.asLogical::arg::test errors") test_that("asLogical_erros", { expect_error(ds.asLogical(), "Please provide the name of the input vector!", fixed=TRUE) }) diff --git a/tests/testthat/test-arg-ds.asMatrix.R b/tests/testthat/test-arg-ds.asMatrix.R index 5c7c8ebdf..4a199dd08 100644 --- a/tests/testthat/test-arg-ds.asMatrix.R +++ b/tests/testthat/test-arg-ds.asMatrix.R @@ -1,4 +1,6 @@ +# #Copyright (c) 2018-2022 University of Newcastle upon Tyne. All rights reserved. +# Copyright (c) 2022-2025 Arjuna Technologies, Newcastle upon Tyne. All rights reserved. # #This program and the accompanying materials are made available under the terms #of the GNU Public License v3.0. @@ -17,7 +19,7 @@ connect.studies.dataset.cnsim(list("LAB_TSC")) # Tests # -context("ds.asMatrix::arg::test errors") +# context("ds.asMatrix::arg::test errors") test_that("asMatrix_erros", { expect_error(ds.asMatrix(), "Please provide the name of the input vector!", fixed=TRUE) }) diff --git a/tests/testthat/test-arg-ds.asNumeric.R b/tests/testthat/test-arg-ds.asNumeric.R index b821c8429..276260751 100644 --- a/tests/testthat/test-arg-ds.asNumeric.R +++ b/tests/testthat/test-arg-ds.asNumeric.R @@ -1,5 +1,6 @@ #------------------------------------------------------------------------------- # Copyright (c) 2018-2022 University of Newcastle upon Tyne. All rights reserved. +# Copyright (c) 2022-2025 Arjuna Technologies, Newcastle upon Tyne. All rights reserved. # # This program and the accompanying materials # are made available under the terms of the GNU Public License v3.0. @@ -18,7 +19,7 @@ connect.studies.dataset.cnsim(list("LAB_TSC")) # Tests # -context("ds.asNumeric::arg::test errors") +# context("ds.asNumeric::arg::test errors") test_that("asNumeric_erros", { expect_error(ds.asNumeric(), "Please provide the name of the input vector!", fixed=TRUE) }) diff --git a/tests/testthat/test-arg-ds.assign.R b/tests/testthat/test-arg-ds.assign.R index 9c1cdac01..4fbd06c42 100644 --- a/tests/testthat/test-arg-ds.assign.R +++ b/tests/testthat/test-arg-ds.assign.R @@ -1,5 +1,6 @@ #------------------------------------------------------------------------------- # Copyright (c) 2018-2022 University of Newcastle upon Tyne. All rights reserved. +# Copyright (c) 2022-2025 Arjuna Technologies, Newcastle upon Tyne. All rights reserved. # # This program and the accompanying materials # are made available under the terms of the GNU Public License v3.0. @@ -18,7 +19,7 @@ connect.studies.dataset.cnsim(list("LAB_TSC")) # Tests # -context("ds.assign::arg::test errors") +# context("ds.assign::arg::test errors") test_that("assign_erros", { expect_error(ds.assign(), "Please give the name of object to assign or an expression to evaluate and assign.!\n") }) diff --git a/tests/testthat/test-arg-ds.auc.R b/tests/testthat/test-arg-ds.auc.R index 7c42585f3..ade352110 100644 --- a/tests/testthat/test-arg-ds.auc.R +++ b/tests/testthat/test-arg-ds.auc.R @@ -1,5 +1,6 @@ #------------------------------------------------------------------------------- # Copyright (c) 2018-2022 University of Newcastle upon Tyne. All rights reserved. +# Copyright (c) 2022-2025 Arjuna Technologies, Newcastle upon Tyne. All rights reserved. # # This program and the accompanying materials # are made available under the terms of the GNU Public License v3.0. @@ -12,13 +13,13 @@ # Set up # -context("ds.auc::arg::setup") +# context("ds.auc::arg::setup") # # Tests # -context("ds.auc::arg::test errors") +# context("ds.auc::arg::test errors") test_that("ds.auc errors for null pred or y", { @@ -31,5 +32,5 @@ test_that("ds.auc errors for null pred or y", { # Done # -context("ds.auc::arg::shutdown") -context("ds.auc::arg::done") +# context("ds.auc::arg::shutdown") +# context("ds.auc::arg::done") diff --git a/tests/testthat/test-arg-ds.c.R b/tests/testthat/test-arg-ds.c.R index 3371d591d..7a85cecb4 100644 --- a/tests/testthat/test-arg-ds.c.R +++ b/tests/testthat/test-arg-ds.c.R @@ -1,5 +1,6 @@ #------------------------------------------------------------------------------- # Copyright (c) 2019-2022 University of Newcastle upon Tyne. All rights reserved. +# Copyright (c) 2022-2025 Arjuna Technologies, Newcastle upon Tyne. All rights reserved. # # This program and the accompanying materials # are made available under the terms of the GNU Public License v3.0. @@ -18,7 +19,7 @@ connect.studies.dataset.cnsim(list("LAB_TSC")) # Tests # -context("ds.c::arg::test errors") +# context("ds.c::arg::test errors") test_that("simple c errors", { expect_error(ds.c(), "x=NULL. Please provide the names of the objects to concatenate!") }) diff --git a/tests/testthat/test-arg-ds.cbind.R b/tests/testthat/test-arg-ds.cbind.R index d600ac830..a51988136 100644 --- a/tests/testthat/test-arg-ds.cbind.R +++ b/tests/testthat/test-arg-ds.cbind.R @@ -1,5 +1,6 @@ #------------------------------------------------------------------------------- # Copyright (c) 2018-2022 University of Newcastle upon Tyne. All rights reserved. +# Copyright (c) 2022-2025 Arjuna Technologies, Newcastle upon Tyne. All rights reserved. # # This program and the accompanying materials # are made available under the terms of the GNU Public License v3.0. @@ -18,7 +19,7 @@ connect.studies.dataset.cnsim(list("LAB_TSC")) # Tests # -context("ds.cbind::arg::test errors") +# context("ds.cbind::arg::test errors") test_that("cbind_erros", { ds.asList(x='D$LAB_TSC', newobj="as_list") diff --git a/tests/testthat/test-arg-ds.changeRefGroup.R b/tests/testthat/test-arg-ds.changeRefGroup.R index 1baffe404..91a0fe24c 100644 --- a/tests/testthat/test-arg-ds.changeRefGroup.R +++ b/tests/testthat/test-arg-ds.changeRefGroup.R @@ -1,5 +1,6 @@ #------------------------------------------------------------------------------- # Copyright (c) 2018-2022 University of Newcastle upon Tyne. All rights reserved. +# Copyright (c) 2022-2025 Arjuna Technologies, Newcastle upon Tyne. All rights reserved. # # This program and the accompanying materials # are made available under the terms of the GNU Public License v3.0. @@ -18,7 +19,7 @@ connect.studies.dataset.cnsim(list("DIS_AMI", "LAB_TSC")) # Tests # -context("ds.changeRefGroup::arg::test errors") +# context("ds.changeRefGroup::arg::test errors") test_that("changeRefGroup_erros", { expect_error(ds.changeRefGroup(), "Please provide the name of a vector of type factor!") expect_error(ds.changeRefGroup(x="D$DIS_AMI"), " You must indicate a reference level - set the parameter 'ref'.") diff --git a/tests/testthat/test-arg-ds.class.R b/tests/testthat/test-arg-ds.class.R index c7240c7b0..c0bf5c7dd 100644 --- a/tests/testthat/test-arg-ds.class.R +++ b/tests/testthat/test-arg-ds.class.R @@ -1,5 +1,6 @@ #------------------------------------------------------------------------------- # Copyright (c) 2018-2022 University of Newcastle upon Tyne. All rights reserved. +# Copyright (c) 2022-2025 Arjuna Technologies, Newcastle upon Tyne. All rights reserved. # # This program and the accompanying materials # are made available under the terms of the GNU Public License v3.0. @@ -18,7 +19,7 @@ connect.studies.dataset.cnsim(list("LAB_TSC")) # Tests # -context("ds.class::arg::test errors") +# context("ds.class::arg::test errors") test_that("class_erros", { expect_error(ds.class(), "Please provide the name of the input object!", fixed=TRUE) }) diff --git a/tests/testthat/test-arg-ds.colnames.R b/tests/testthat/test-arg-ds.colnames.R index bbbaa5e97..39ce9b87a 100644 --- a/tests/testthat/test-arg-ds.colnames.R +++ b/tests/testthat/test-arg-ds.colnames.R @@ -1,5 +1,6 @@ #------------------------------------------------------------------------------- # Copyright (c) 2019-2022 University of Newcastle upon Tyne. All rights reserved. +# Copyright (c) 2022-2025 Arjuna Technologies, Newcastle upon Tyne. All rights reserved. # # This program and the accompanying materials # are made available under the terms of the GNU Public License v3.0. @@ -18,7 +19,7 @@ connect.studies.dataset.cnsim(list("LAB_TSC", "LAB_TRIG")) # Tests # -context("ds.colnames::arg::test errors") +# context("ds.colnames::arg::test errors") test_that("simple colnames errors", { expect_error(ds.colnames(), "") }) diff --git a/tests/testthat/test-arg-ds.completeCases.R b/tests/testthat/test-arg-ds.completeCases.R index a13856380..8bb997338 100644 --- a/tests/testthat/test-arg-ds.completeCases.R +++ b/tests/testthat/test-arg-ds.completeCases.R @@ -1,5 +1,6 @@ #------------------------------------------------------------------------------- # Copyright (c) 2018-2022 University of Newcastle upon Tyne. All rights reserved. +# Copyright (c) 2022-2025 Arjuna Technologies, Newcastle upon Tyne. All rights reserved. # # This program and the accompanying materials # are made available under the terms of the GNU Public License v3.0. @@ -18,7 +19,7 @@ connect.studies.dataset.cnsim(list("LAB_TSC")) # Tests # -context("ds.completeCases::arg::test errors") +# context("ds.completeCases::arg::test errors") test_that("completeCases_errors", { res <- ds.completeCases() expect_equal(res, "Error: x1 must be a character string naming a serverside data.frame, matrix or vector", fixed = TRUE) diff --git a/tests/testthat/test-arg-ds.cor.R b/tests/testthat/test-arg-ds.cor.R index 9f728e1a0..47b5a5abb 100644 --- a/tests/testthat/test-arg-ds.cor.R +++ b/tests/testthat/test-arg-ds.cor.R @@ -1,5 +1,6 @@ #------------------------------------------------------------------------------- # Copyright (c) 2018-2022 University of Newcastle upon Tyne. All rights reserved. +# Copyright (c) 2022-2025 Arjuna Technologies, Newcastle upon Tyne. All rights reserved. # # This program and the accompanying materials # are made available under the terms of the GNU Public License v3.0. @@ -18,7 +19,7 @@ connect.studies.dataset.cnsim(list("LAB_TSC", "LAB_TRIG")) # Tests # -context("ds.cor::arg::test errors") +# context("ds.cor::arg::test errors") test_that("cor_erros", { expect_error(ds.cor(), 'x=NULL. Please provide the name of a matrix or dataframe or the names of two numeric vectors!', fixed=TRUE) expect_error(ds.cor(x='D$LAB_TSC'), 'If x is a numeric vector, y must be a numeric vector!', fixed=TRUE) diff --git a/tests/testthat/test-arg-ds.corTest.R b/tests/testthat/test-arg-ds.corTest.R index ac80a40cc..76adc6f15 100644 --- a/tests/testthat/test-arg-ds.corTest.R +++ b/tests/testthat/test-arg-ds.corTest.R @@ -1,5 +1,6 @@ #------------------------------------------------------------------------------- # Copyright (c) 2018-2022 University of Newcastle upon Tyne. All rights reserved. +# Copyright (c) 2022-2025 Arjuna Technologies, Newcastle upon Tyne. All rights reserved. # # This program and the accompanying materials # are made available under the terms of the GNU Public License v3.0. @@ -18,7 +19,7 @@ connect.studies.dataset.survival(list("survtime", "time.id")) # Tests # -context("ds.corTest::arg") +# context("ds.corTest::arg") test_that("simple arg test", { expect_error(ds.corTest(), "x=NULL. Please provide the names of the 1st numeric vector!", fixed=TRUE) diff --git a/tests/testthat/test-arg-ds.cov.R b/tests/testthat/test-arg-ds.cov.R index 0958c65ad..29330c9de 100644 --- a/tests/testthat/test-arg-ds.cov.R +++ b/tests/testthat/test-arg-ds.cov.R @@ -1,5 +1,6 @@ #------------------------------------------------------------------------------- # Copyright (c) 2018-2022 University of Newcastle upon Tyne. All rights reserved. +# Copyright (c) 2022-2025 Arjuna Technologies, Newcastle upon Tyne. All rights reserved. # # This program and the accompanying materials # are made available under the terms of the GNU Public License v3.0. @@ -18,7 +19,7 @@ connect.studies.dataset.cnsim(list("LAB_TSC", "LAB_TRIG")) # Tests # -context("ds.cov::arg::test errors") +# context("ds.cov::arg::test errors") test_that("cov_erros", { expect_error(ds.cov(), 'x=NULL. Please provide the name of a matrix or dataframe or the names of two numeric vectors!', fixed=TRUE) expect_error(ds.cov(x='D$LAB_TSC'), 'If x is a numeric vector, y must be a numeric vector!', fixed=TRUE) diff --git a/tests/testthat/test-arg-ds.dataFrame.R b/tests/testthat/test-arg-ds.dataFrame.R index 9d76b7beb..33fa65cf6 100644 --- a/tests/testthat/test-arg-ds.dataFrame.R +++ b/tests/testthat/test-arg-ds.dataFrame.R @@ -1,5 +1,6 @@ #------------------------------------------------------------------------------- # Copyright (c) 2018-2022 University of Newcastle upon Tyne. All rights reserved. +# Copyright (c) 2022-2025 Arjuna Technologies, Newcastle upon Tyne. All rights reserved. # # This program and the accompanying materials # are made available under the terms of the GNU Public License v3.0. @@ -18,7 +19,7 @@ connect.studies.dataset.cnsim(list("LAB_TSC")) # Tests # -context("ds.dataFrame::arg::test errors") +# context("ds.dataFrame::arg::test errors") test_that("dataframe_erros", { expect_error(ds.dataFrame(), "Please provide the name of the list that holds the input vectors!", fixed=TRUE) diff --git a/tests/testthat/test-arg-ds.dataFrameFill.R b/tests/testthat/test-arg-ds.dataFrameFill.R index 0e71d2e56..2eb77e4f1 100644 --- a/tests/testthat/test-arg-ds.dataFrameFill.R +++ b/tests/testthat/test-arg-ds.dataFrameFill.R @@ -1,5 +1,6 @@ #------------------------------------------------------------------------------- # Copyright (c) 2018-2022 University of Newcastle upon Tyne. All rights reserved. +# Copyright (c) 2022-2025 Arjuna Technologies, Newcastle upon Tyne. All rights reserved. # # This program and the accompanying materials # are made available under the terms of the GNU Public License v3.0. @@ -18,7 +19,7 @@ connect.studies.dataset.cnsim(list("LAB_TSC")) # Tests # -context("ds.dataFrameFill::arg::test errors") +# context("ds.dataFrameFill::arg::test errors") test_that("dataFrameFill_erros", { expect_error(ds.dataFrameFill(), "Please provide the name of the data.frame to be filled as a character string: eg 'xxx'", fixed=TRUE) expect_error(ds.dataFrameFill("NonDF"), "The input object NonDF is not defined in sim1, sim2, sim3!", fixed=TRUE) diff --git a/tests/testthat/test-arg-ds.dataFrameSort.R b/tests/testthat/test-arg-ds.dataFrameSort.R index 65a1c2cfe..52061313f 100644 --- a/tests/testthat/test-arg-ds.dataFrameSort.R +++ b/tests/testthat/test-arg-ds.dataFrameSort.R @@ -1,5 +1,6 @@ #------------------------------------------------------------------------------- # Copyright (c) 2018-2022 University of Newcastle upon Tyne. All rights reserved. +# Copyright (c) 2022-2025 Arjuna Technologies, Newcastle upon Tyne. All rights reserved. # # This program and the accompanying materials # are made available under the terms of the GNU Public License v3.0. @@ -18,7 +19,7 @@ connect.studies.dataset.cnsim(list("LAB_TSC", "GENDER")) # Tests # -context("ds.dataFrameSort::arg::no args") +# context("ds.dataFrameSort::arg::no args") test_that("dataFrameSort_noargs", { expect_error(ds.dataFrameSort(), "There are some DataSHIELD errors, list them with datashield.errors()", fixed=TRUE) @@ -30,7 +31,7 @@ test_that("dataFrameSort_noargs", { expect_match(res.errors$sim3, "* Error in strsplit\\(df.name, split = \"\"\\) : non-character argument*") }) -context("ds.dataFrameSort::arg::sorted dataframe, of factors") +# context("ds.dataFrameSort::arg::sorted dataframe, of factors") test_that("dataFrameSort_factors", { myvectors <- c('D$LAB_TSC', 'D$GENDER') ds.dataFrame(x=myvectors, newobj="unsorted_df") diff --git a/tests/testthat/test-arg-ds.dataFrameSubset.R b/tests/testthat/test-arg-ds.dataFrameSubset.R index 4bd414e6e..53ec07e39 100644 --- a/tests/testthat/test-arg-ds.dataFrameSubset.R +++ b/tests/testthat/test-arg-ds.dataFrameSubset.R @@ -1,6 +1,7 @@ #------------------------------------------------------------------------------- # Copyright (c) 2018-2022 University of Newcastle upon Tyne. All rights reserved. +# Copyright (c) 2022-2025 Arjuna Technologies, Newcastle upon Tyne. All rights reserved. # # This program and the accompanying materials # are made available under the terms of the GNU Public License v3.0. @@ -13,7 +14,7 @@ # Set up # -context("ds.dataFrameSubset::arg::setup") +# context("ds.dataFrameSubset::arg::setup") connect.studies.dataset.cnsim(list("LAB_TSC")) @@ -25,27 +26,27 @@ test_that("setup", { # Tests # -context("ds.dataFrameSubset::arg::missing 'ds.name' arg errors") +# context("ds.dataFrameSubset::arg::missing 'ds.name' arg errors") test_that("dataFrameSubset_erros", { expect_error(ds.dataFrameSubset(), "Please provide the name of the data.frame to be subsetted as a character string: eg 'xxx'", fixed=TRUE) }) -context("ds.dataFrameSubset::arg::missing 'V1' arg error") +# context("ds.dataFrameSubset::arg::missing 'V1' arg error") test_that("dataFrameSubset_erros", { expect_error(ds.dataFrameSubset(df.name="D"), "Please provide the name of the column or scalar that holds V1 as a character string: eg 'xxx' or '3'", fixed=TRUE) }) -context("ds.dataFrameSubset::arg::missing 'V2' arg error") +# context("ds.dataFrameSubset::arg::missing 'V2' arg error") test_that("dataFrameSubset_erros", { expect_error(ds.dataFrameSubset(df.name="D", V1.name="LAB_TSC"), "Please provide the name of the column or scalar that holds V2 as a character string: eg 'xxx' or '3'", fixed=TRUE) }) -context("ds.dataFrameSubset::arg::missing 'Boolean.operator' arg error") +# context("ds.dataFrameSubset::arg::missing 'Boolean.operator' arg error") test_that("dataFrameSubset_erros", { expect_error(ds.dataFrameSubset(df.name="D", V1.name="LAB_TSC", V2.name="LAB_TSC"), "Unless you are only subsetting columns, please provide a Boolean operator in character format: eg '==' or '>=' or '<' or '!='. However, if either keep.cols or rm.cols is non-null because you want to subset columns and you specify both V1.name and V2.name as NULL (or 'ONES') and Boolean.operator as NULL,ds.dataFrameSubset will subset out the specified columns but will keep all rows.", fixed=TRUE) }) -context("ds.dataFrameSubset::arg::missing 'df.name' value server-side") +# context("ds.dataFrameSubset::arg::missing 'df.name' value server-side") test_that("dataFrameSubset_erros", { expect_error(ds.dataFrameSubset(df.name="M", V1.name="A", V2.name="B", Boolean.operator="=/="), "There are some DataSHIELD errors, list them with datashield.errors()", fixed=TRUE) @@ -57,7 +58,7 @@ test_that("dataFrameSubset_erros", { expect_match(res.errors$sim3, "* object 'M' not found*") }) -context("ds.dataFrameSubset::arg::missing 'V1' value server-side") +# context("ds.dataFrameSubset::arg::missing 'V1' value server-side") test_that("dataFrameSubset_erros", { expect_error(ds.dataFrameSubset(df.name="D", V1.name="A", V2.name="B", Boolean.operator="=/="), "There are some DataSHIELD errors, list them with datashield.errors()", fixed=TRUE) @@ -69,7 +70,7 @@ test_that("dataFrameSubset_erros", { expect_match(res.errors$sim3, "* Error in eval\\(parse\\(text = V1.name\\), envir = parent.frame\\(\\)\\) : \\n object 'A' not found*") }) -context("ds.dataFrameSubset::arg::missing 'V2' value server-side") +# context("ds.dataFrameSubset::arg::missing 'V2' value server-side") test_that("dataFrameSubset_erros", { expect_error(ds.dataFrameSubset(df.name="D", V1.name="D$LAB_TSC", V2.name="B", Boolean.operator="=/="), "There are some DataSHIELD errors, list them with datashield.errors()", fixed=TRUE) @@ -81,7 +82,7 @@ test_that("dataFrameSubset_erros", { expect_match(res.errors$sim3, "* Error in eval\\(parse\\(text = V2.name\\), envir = parent.frame\\(\\)\\) : \\n object 'B' not found*") }) -context("ds.dataFrameSubset::arg::invalid 'Boolean.operator' value server-side") +# context("ds.dataFrameSubset::arg::invalid 'Boolean.operator' value server-side") test_that("dataFrameSubset_erros", { expect_error(ds.dataFrameSubset(df.name="D", V1.name="D$LAB_TSC", V2.name="D$LAB_TSC", Boolean.operator="=/="), "There are some DataSHIELD errors, list them with datashield.errors()", fixed=TRUE) @@ -97,7 +98,7 @@ test_that("dataFrameSubset_erros", { # Shutdown # -context("ds.dataFrameSubset::arg::shutdown") +# context("ds.dataFrameSubset::arg::shutdown") test_that("shutdown", { ds_expect_variables(c("D")) @@ -109,4 +110,4 @@ disconnect.studies.dataset.cnsim() # Done # -context("ds.dataFrameSubset::arg::done") +# context("ds.dataFrameSubset::arg::done") diff --git a/tests/testthat/test-arg-ds.dim.R b/tests/testthat/test-arg-ds.dim.R index 8ee681985..27b4e8bd8 100644 --- a/tests/testthat/test-arg-ds.dim.R +++ b/tests/testthat/test-arg-ds.dim.R @@ -1,5 +1,6 @@ #------------------------------------------------------------------------------- # Copyright (c) 2018-2022 University of Newcastle upon Tyne. All rights reserved. +# Copyright (c) 2022-2025 Arjuna Technologies, Newcastle upon Tyne. All rights reserved. # # This program and the accompanying materials # are made available under the terms of the GNU Public License v3.0. @@ -18,7 +19,7 @@ connect.studies.dataset.cnsim(list("LAB_TSC")) # Tests # -context("ds.dim::arg::test errors") +# context("ds.dim::arg::test errors") test_that("dim_erros", { expect_error(ds.dim(), "Please provide the name of a data.frame or matrix!", fixed=TRUE) expect_error(ds.dim(x="F", checks = TRUE), "The input object must be a table structure!", fixed=TRUE) diff --git a/tests/testthat/test-arg-ds.exists.R b/tests/testthat/test-arg-ds.exists.R index 7e920395f..8ae2070d3 100644 --- a/tests/testthat/test-arg-ds.exists.R +++ b/tests/testthat/test-arg-ds.exists.R @@ -1,5 +1,6 @@ #------------------------------------------------------------------------------- # Copyright (c) 2019-2022 University of Newcastle upon Tyne. All rights reserved. +# Copyright (c) 2022-2025 Arjuna Technologies, Newcastle upon Tyne. All rights reserved. # # This program and the accompanying materials # are made available under the terms of the GNU Public License v3.0. @@ -18,7 +19,7 @@ connect.studies.dataset.cnsim(list("LAB_TSC")) # Tests # -context("ds.exists::arg::test errors") +# context("ds.exists::arg::test errors") test_that("simple exists errors", { expect_error(ds.exists(), "Please provide the name of the input object!") }) diff --git a/tests/testthat/test-arg-ds.exp.R b/tests/testthat/test-arg-ds.exp.R index d3a6d1ef9..c851bba34 100644 --- a/tests/testthat/test-arg-ds.exp.R +++ b/tests/testthat/test-arg-ds.exp.R @@ -1,5 +1,6 @@ #------------------------------------------------------------------------------- # Copyright (c) 2018-2022 University of Newcastle upon Tyne. All rights reserved. +# Copyright (c) 2022-2025 Arjuna Technologies, Newcastle upon Tyne. All rights reserved. # # This program and the accompanying materials # are made available under the terms of the GNU Public License v3.0. @@ -18,7 +19,7 @@ connect.studies.dataset.cnsim(list("LAB_TSC")) # Tests # -context("ds.exp::arg::test errors") +# context("ds.exp::arg::test errors") test_that("exp_erros", { expect_error(ds.exp(), "Please provide the name of the input object!", fixed=TRUE) }) diff --git a/tests/testthat/test-arg-ds.foobar.R b/tests/testthat/test-arg-ds.foobar.R index 05cbde701..19f959f28 100644 --- a/tests/testthat/test-arg-ds.foobar.R +++ b/tests/testthat/test-arg-ds.foobar.R @@ -1,5 +1,6 @@ #------------------------------------------------------------------------------- # Copyright (c) 2019-2022 University of Newcastle upon Tyne. All rights reserved. +# Copyright (c) 2022-2025 Arjuna Technologies, Newcastle upon Tyne. All rights reserved. # # This program and the accompanying materials # are made available under the terms of the GNU Public License v3.0. @@ -12,7 +13,7 @@ # Set up # -context("ds.foobar::arg::setup") +# context("ds.foobar::arg::setup") connect.studies.dataset.cnsim(list("LAB_TSC")) @@ -24,14 +25,13 @@ test_that("setup", { # Tests # -context("ds.foobar::arg::aggregate") +# context("ds.foobar::arg::aggregate") test_that("NULL connections", { calltext <- call("fooBarDS") if (ds.test_env$driver == "ArmadilloDriver") { - expect_error(datashield.aggregate(conns=NULL, expr=calltext), "no applicable method for `@` applied to an object of class \"NULL\"", fixed=TRUE) -# expect_error(datashield.aggregate(conns=NULL, expr=calltext), "trying to get slot \"name\" from an object of a basic class (\"NULL\") with no slots", fixed=TRUE) + expect_error(datashield.aggregate(conns=NULL, expr=calltext), "unable to find an inherited method for function 'dsIsAsync' for signature 'conn = \"NULL\"'", fixed=TRUE) } else if (ds.test_env$driver == "OpalDriver") { - expect_error(datashield.aggregate(conns=NULL, expr=calltext), "no applicable method for `@` applied to an object of class \"NULL\"", fixed=TRUE) + expect_error(datashield.aggregate(conns=NULL, expr=calltext), "unable to find an inherited method for function 'dsIsAsync' for signature 'conn = \"NULL\"'", fixed=TRUE) } else { fail(message = "Unknown driver type", info = ds.test_env$driver) } @@ -40,7 +40,7 @@ test_that("NULL connections", { expect_length(errs, 0) }) -context("ds.foobar::arg::aggregate") +# context("ds.foobar::arg::aggregate") test_that("NULL expr", { calltext <- call("fooBarDS") expect_error(expect_warning(datashield.aggregate(conns=ds.test_env$connections, expr=NULL), "'x' is NULL so the result will be NULL", fixed = TRUE), "replacement has length zero", fixed = TRUE) @@ -49,7 +49,7 @@ test_that("NULL expr", { expect_length(errs, 0) }) -context("ds.foobar::arg::aggregate") +# context("ds.foobar::arg::aggregate") test_that("non existent aggregate foobarDS", { calltext <- call("fooBarDS") expect_error(datashield.aggregate(conns=ds.test_env$connections, expr=calltext)) @@ -65,14 +65,13 @@ test_that("non existent aggregate foobarDS", { expect_true(errs$sim3 %in% c("Command 'fooBarDS()' failed on 'sim3': No such DataSHIELD 'AGGREGATE' method with name: fooBarDS", "[Client error: (400) Bad Request] No such DataSHIELD 'AGGREGATE' method with name: fooBarDS", "Bad request: No such DataSHIELD 'AGGREGATE' method with name: fooBarDS")) }) -context("ds.foobar::arg::assign") +# context("ds.foobar::arg::assign") test_that("NULL connections", { calltext <- call("fooBarDS") if (ds.test_env$driver == "ArmadilloDriver") { - expect_error(datashield.assign(conns=NULL, symbol="new_obj", value=calltext), "no applicable method for `@` applied to an object of class \"NULL\"", fixed=TRUE) -# expect_error(datashield.assign(conns=NULL, symbol="new_obj", value=calltext), "trying to get slot \"name\" from an object of a basic class (\"NULL\") with no slots", fixed=TRUE) + expect_error(datashield.assign(conns=NULL, symbol="new_obj", value=calltext), "unable to find an inherited method for function 'dsIsAsync' for signature 'conn = \"NULL\"'", fixed=TRUE) } else if (ds.test_env$driver == "OpalDriver") { - expect_error(datashield.assign(conns=NULL, symbol="new_obj", value=calltext), "no applicable method for `@` applied to an object of class \"NULL\"", fixed=TRUE) + expect_error(datashield.assign(conns=NULL, symbol="new_obj", value=calltext), "unable to find an inherited method for function 'dsIsAsync' for signature 'conn = \"NULL\"'", fixed=TRUE) } else { fail(message = "Unknown driver type", info = ds.test_env$driver) } @@ -89,7 +88,7 @@ test_that("NULL connections", { # expect_length(res, 0) #}) -context("ds.foobar::arg::assign") +# context("ds.foobar::arg::assign") test_that("NULL value", { calltext <- call("fooBarDS") expect_error(datashield.assign(conns=ds.test_env$connections, symbol="new_obj", value=NULL), "Not a valid table name", fixed=TRUE) @@ -98,7 +97,7 @@ test_that("NULL value", { expect_length(errs, 0) }) -context("ds.foobar::arg::assign") +# context("ds.foobar::arg::assign") test_that("non existent assign foobarDS", { calltext <- call("fooBarDS") expect_error(datashield.assign(conns=ds.test_env$connections, symbol="new_obj", value=calltext)) @@ -117,7 +116,7 @@ test_that("non existent assign foobarDS", { # Tear down # -context("ds.foobar::arg::shutdown") +# context("ds.foobar::arg::shutdown") test_that("shutdown", { ds_expect_variables(c("D")) @@ -125,4 +124,4 @@ test_that("shutdown", { disconnect.studies.dataset.cnsim() -context("ds.foobar::arg::done") +# context("ds.foobar::arg::done") diff --git a/tests/testthat/test-arg-ds.gamlss.R b/tests/testthat/test-arg-ds.gamlss.R index 7a4ec4737..c24f41efb 100644 --- a/tests/testthat/test-arg-ds.gamlss.R +++ b/tests/testthat/test-arg-ds.gamlss.R @@ -1,5 +1,6 @@ #------------------------------------------------------------------------------- # Copyright (c) 2018-2022 University of Newcastle upon Tyne. All rights reserved. +# Copyright (c) 2022-2025 Arjuna Technologies, Newcastle upon Tyne. All rights reserved. # # This program and the accompanying materials # are made available under the terms of the GNU Public License v3.0. @@ -18,7 +19,7 @@ connect.studies.dataset.gamlss(list("e3_bw", "e3_gac_None")) # Tests # -context("ds.gamlss::arg::test errors") +# context("ds.gamlss::arg::test errors") test_that("gamlss_errors", { expect_error(ds.gamlss(), " Please provide a valid formula!", fixed=TRUE) expect_error(ds.gamlss(formula="e3_bw ~ e3_gac_None", method="RG"), "Argument 'method' must be either 'RS', 'CG' or 'mixed'", fixed=TRUE) diff --git a/tests/testthat/test-arg-ds.glm.R b/tests/testthat/test-arg-ds.glm.R index 0724e206b..fbf1a880f 100644 --- a/tests/testthat/test-arg-ds.glm.R +++ b/tests/testthat/test-arg-ds.glm.R @@ -1,5 +1,6 @@ #------------------------------------------------------------------------------- # Copyright (c) 2018-2022 University of Newcastle upon Tyne. All rights reserved. +# Copyright (c) 2022-2025 Arjuna Technologies, Newcastle upon Tyne. All rights reserved. # # This program and the accompanying materials # are made available under the terms of the GNU Public License v3.0. @@ -18,7 +19,7 @@ connect.studies.dataset.cnsim(list("LAB_TSC")) # Tests # -context("ds.glm::arg::test errors") +# context("ds.glm::arg::test errors") test_that("glm_errors", { expect_error(ds.glm(), " Please provide a valid regression formula!", fixed=TRUE) expect_error(ds.glm("D$LAB_TSC~D$LAB_TSC"), " Please provide a valid 'family' argument!", fixed=TRUE) diff --git a/tests/testthat/test-arg-ds.glmPredict.R b/tests/testthat/test-arg-ds.glmPredict.R index 579fa5b54..52c70b5c1 100644 --- a/tests/testthat/test-arg-ds.glmPredict.R +++ b/tests/testthat/test-arg-ds.glmPredict.R @@ -1,5 +1,6 @@ #------------------------------------------------------------------------------- # Copyright (c) 2018-2022 University of Newcastle upon Tyne. All rights reserved. +# Copyright (c) 2022-2025 Arjuna Technologies, Newcastle upon Tyne. All rights reserved. # # This program and the accompanying materials # are made available under the terms of the GNU Public License v3.0. @@ -18,14 +19,14 @@ connect.studies.dataset.cnsim(list("LAB_TSC", "LAB_TRIG", "DIS_AMI", "DIS_DIAB", # Tests # -context("ds.glmPredict::arg::test _glmname_ arg is correct object") +# context("ds.glmPredict::arg::test _glmname_ arg is correct object") test_that("glmPredict_errors", { expect_error(ds.glmPredict(), " is not set, please specify it as a character string containing the name of a valid glm class object on the serverside", fixed=TRUE) expect_error(ds.glmPredict("ABC"), "The input object ABC is not defined in sim1, sim2, sim3!", fixed=TRUE) }) -context("ds.glmPredict::arg::setting up glm obj for further testing") +# context("ds.glmPredict::arg::setting up glm obj for further testing") test_that("glmPredict_errors", { #glm.obj <- ds.glmSLMA('D$LAB_TSC~D$LAB_TSC', family="gaussian", newobj="gaussian.glmslma.obj") #glmSLMA.res <- ds.glmSLMA('D$DIS_DIAB~D$LAB_TRIG', family="binomial", newobj="binomial.glmslma.obj") @@ -37,7 +38,7 @@ test_that("glmPredict_errors", { expect_equal(glmSLMA.res$validity.check, " appears valid in all sources") }) -context("ds.glmPredict::arg::test _newdataname_ arg is correct object") +# context("ds.glmPredict::arg::test _newdataname_ arg is correct object") test_that("glmPredict_errors", { expect_error(ds.glmPredict("gaussian.glmslma.obj", newdataname = "help"),"There are some DataSHIELD errors, list them with datashield.errors()", fixed=TRUE) # TODO: "some DataSHIELD errors" is unhelpful and needs improvement @@ -46,13 +47,13 @@ test_that("glmPredict_errors", { expect_true(all(c("sim1","sim2","sim3") %in% names(datashield.errors()))) }) -context("ds.glmPredict::arg::test _output.type_ arg is correct object") +# context("ds.glmPredict::arg::test _output.type_ arg is correct object") test_that("glmPredict_errors", { expect_error(ds.glmPredict("gaussian.glmslma.obj", newdataname = NULL, output.type = NULL), "missing value where TRUE/FALSE needed", fixed=TRUE) expect_error(ds.glmPredict("gaussian.glmslma.obj", newdataname = NULL, output.type = 'blah'), " is not correctly set, please specify it as one of three character strings: 'link', 'response', or 'terms'", fixed=TRUE) }) -context("ds.glmPredict::arg::test _se.fit_ arg is correct object") +# context("ds.glmPredict::arg::test _se.fit_ arg is correct object") test_that("glmPredict_errors", { expect_error(ds.glmPredict("gaussian.glmslma.obj", newdataname = NULL, output.type = "response", se.fit = "1"), "There are some DataSHIELD errors, list them with datashield.errors()", fixed = TRUE) @@ -66,12 +67,12 @@ test_that("glmPredict_errors", { # res <- ds.glmPredict("gaussian.glmslma.obj", newdataname = NULL, output.type = "response", se.fit = FALSE, dispersion = "thereisnothingontheservercalledthis") #}) -context("ds.glmPredict::arg::test _terms_ arg is correct object") +# context("ds.glmPredict::arg::test _terms_ arg is correct object") test_that("glmPredict_errors", { expect_error(ds.glmPredict("gaussian.glmslma.obj", newdataname = NULL, output.type = "terms", se.fit = FALSE, dispersion = NULL, terms="thereisnothingontheservercalledthis2"), "There are some DataSHIELD errors, list them with datashield.errors()", fixed = TRUE) }) -context("ds.glmPredict::arg::test _na.action_ arg is correct object") +# context("ds.glmPredict::arg::test _na.action_ arg is correct object") test_that("glmPredict_errors", { expect_error(ds.glmPredict("gaussian.glmslma.obj", newdataname = NULL, output.type = "response", se.fit = FALSE, dispersion = NULL, terms=NULL, na.action= "na.other"), " is not correctly set, please specify it as one of four character strings: 'na.fail', 'na.omit', 'na.exclude' or 'na.pass'", fixed = TRUE) }) diff --git a/tests/testthat/test-arg-ds.glmSLMA.R b/tests/testthat/test-arg-ds.glmSLMA.R index ce4dbe735..4180f91af 100644 --- a/tests/testthat/test-arg-ds.glmSLMA.R +++ b/tests/testthat/test-arg-ds.glmSLMA.R @@ -1,5 +1,6 @@ #------------------------------------------------------------------------------- # Copyright (c) 2018-2022 University of Newcastle upon Tyne. All rights reserved. +# Copyright (c) 2022-2025 Arjuna Technologies, Newcastle upon Tyne. All rights reserved. # # This program and the accompanying materials # are made available under the terms of the GNU Public License v3.0. @@ -18,7 +19,7 @@ connect.studies.dataset.cnsim(list("LAB_TSC")) # Tests # -context("ds.glmSLMA::arg::test errors") +# context("ds.glmSLMA::arg::test errors") test_that("glmSLMA_errors", { expect_error(ds.glmSLMA(), " Please provide a valid regression formula!", fixed=TRUE) diff --git a/tests/testthat/test-arg-ds.glmerSLMA.R b/tests/testthat/test-arg-ds.glmerSLMA.R index 84662f7f2..36c80bb5b 100644 --- a/tests/testthat/test-arg-ds.glmerSLMA.R +++ b/tests/testthat/test-arg-ds.glmerSLMA.R @@ -1,5 +1,6 @@ #------------------------------------------------------------------------------- # Copyright (c) 2019-2022 University of Newcastle upon Tyne. All rights reserved. +# Copyright (c) 2022-2025 Arjuna Technologies, Newcastle upon Tyne. All rights reserved. # # This program and the accompanying materials # are made available under the terms of the GNU Public License v3.0. @@ -12,7 +13,7 @@ # Set up # -context("ds.glmerSLMA::arg::setup") +# context("ds.glmerSLMA::arg::setup") connect.studies.dataset.cluster.int(list("incid_rate", "trtGrp", "Male", "idDoctor", "idSurgery")) @@ -24,7 +25,7 @@ test_that("setup", { # Test # -context("ds.glmerSLMA::arg::testing") +# context("ds.glmerSLMA::arg::testing") test_that("simple glmerSLMA tesing (mis)use of arguments", { expect_error(ds.glmerSLMA(formula = 'incid_rate ~ trtGrp + Male + (1|idDoctor)', dataName = 'D'), " Please provide a valid 'family' argument!", fixed=TRUE) @@ -53,7 +54,7 @@ test_that("simple glmerSLMA tesing (mis)use of arguments", { # Shutdown # -context("ds.glmerSLMA::arg::shutdown") +# context("ds.glmerSLMA::arg::shutdown") test_that("setup", { ds_expect_variables(c("D", "offset", "weights")) @@ -65,4 +66,4 @@ disconnect.studies.dataset.cluster.int() # Done # -context("ds.glmerSLMA::arg::done") +# context("ds.glmerSLMA::arg::done") diff --git a/tests/testthat/test-arg-ds.isNA.R b/tests/testthat/test-arg-ds.isNA.R index 27c9bffcb..433857a75 100644 --- a/tests/testthat/test-arg-ds.isNA.R +++ b/tests/testthat/test-arg-ds.isNA.R @@ -1,5 +1,6 @@ #------------------------------------------------------------------------------- # Copyright (c) 2018-2022 University of Newcastle upon Tyne. All rights reserved. +# Copyright (c) 2022-2025 Arjuna Technologies, Newcastle upon Tyne. All rights reserved. # # This program and the accompanying materials # are made available under the terms of the GNU Public License v3.0. @@ -18,7 +19,7 @@ connect.studies.dataset.cnsim(list("LAB_HDL")) # Tests # -context("ds.isNA::arg::errors") +# context("ds.isNA::arg::errors") test_that("isNA errors", { expect_error(ds.isNA(), "Please provide the name of the input vector!", fixed=TRUE) }) diff --git a/tests/testthat/test-arg-ds.isValid.R b/tests/testthat/test-arg-ds.isValid.R index 65d843cc7..37fbf21a5 100644 --- a/tests/testthat/test-arg-ds.isValid.R +++ b/tests/testthat/test-arg-ds.isValid.R @@ -1,5 +1,6 @@ #------------------------------------------------------------------------------- # Copyright (c) 2018-2022 University of Newcastle upon Tyne. All rights reserved. +# Copyright (c) 2022-2025 Arjuna Technologies, Newcastle upon Tyne. All rights reserved. # # This program and the accompanying materials # are made available under the terms of the GNU Public License v3.0. @@ -18,7 +19,7 @@ connect.studies.dataset.cnsim(list("LAB_HDL")) # Tests # -context("ds.isValid::arg::errors") +# context("ds.isValid::arg::errors") test_that("isValid errors", { expect_error(ds.isValid(), "Please provide the name of the input vector!", fixed=TRUE) expect_error(ds.isValid("D$NOT_THERE"), "The input object D$NOT_THERE is not defined in sim1, sim2, sim3!", fixed=TRUE) diff --git a/tests/testthat/test-arg-ds.kurtosis.R b/tests/testthat/test-arg-ds.kurtosis.R index db80a0788..0d8118e12 100644 --- a/tests/testthat/test-arg-ds.kurtosis.R +++ b/tests/testthat/test-arg-ds.kurtosis.R @@ -1,5 +1,6 @@ #------------------------------------------------------------------------------- # Copyright (c) 2018-2022 University of Newcastle upon Tyne. All rights reserved. +# Copyright (c) 2022-2025 Arjuna Technologies, Newcastle upon Tyne. All rights reserved. # # This program and the accompanying materials # are made available under the terms of the GNU Public License v3.0. @@ -12,7 +13,7 @@ # Set up # -context("ds.kurtosis::arg::setup") +# context("ds.kurtosis::arg::setup") connect.studies.dataset.cnsim(list("LAB_TSC")) @@ -24,7 +25,7 @@ test_that("setup", { # Tests # -context("ds.kurtosis::arg::test errors") +# context("ds.kurtosis::arg::test errors") test_that("kurtosis_erros", { expect_error(ds.kurtosis(), "Please provide the name of the input vector!", fixed=TRUE) expect_error(ds.kurtosis(x='D$LAB_TSC', type='datashield'), "Function argument \"type\" has to be either \"both\", \"combine\" or \"split\"", fixed=TRUE) @@ -36,7 +37,7 @@ test_that("kurtosis_erros", { # Done # -context("ds.kurtosis::arg::shutdown") +# context("ds.kurtosis::arg::shutdown") test_that("shutdown", { ds_expect_variables(c("D")) @@ -44,4 +45,4 @@ test_that("shutdown", { disconnect.studies.dataset.cnsim() -context("ds.kurtosis::arg::done") +# context("ds.kurtosis::arg::done") diff --git a/tests/testthat/test-arg-ds.length.R b/tests/testthat/test-arg-ds.length.R index 87d5f3b3c..06ce3a7a5 100644 --- a/tests/testthat/test-arg-ds.length.R +++ b/tests/testthat/test-arg-ds.length.R @@ -1,5 +1,6 @@ #------------------------------------------------------------------------------- # Copyright (c) 2018-2022 University of Newcastle upon Tyne. All rights reserved. +# Copyright (c) 2022-2025 Arjuna Technologies, Newcastle upon Tyne. All rights reserved. # # This program and the accompanying materials # are made available under the terms of the GNU Public License v3.0. @@ -18,7 +19,7 @@ connect.studies.dataset.cnsim(list("LAB_TSC")) # Tests # -context("ds.length::arg::test errors") +# context("ds.length::arg::test errors") test_that("length_erros", { ds.asMatrix(x='D$LAB_TSC', newobj="not_a_numeric") diff --git a/tests/testthat/test-arg-ds.levels.R b/tests/testthat/test-arg-ds.levels.R index 6f94c4ec9..cf6bf974b 100644 --- a/tests/testthat/test-arg-ds.levels.R +++ b/tests/testthat/test-arg-ds.levels.R @@ -1,5 +1,6 @@ #------------------------------------------------------------------------------- # Copyright (c) 2019-2022 University of Newcastle upon Tyne. All rights reserved. +# Copyright (c) 2022-2025 Arjuna Technologies, Newcastle upon Tyne. All rights reserved. # # This program and the accompanying materials # are made available under the terms of the GNU Public License v3.0. @@ -18,7 +19,7 @@ connect.studies.dataset.cnsim(list("LAB_TSC")) # Tests # -context("ds.levels::arg") +# context("ds.levels::arg") test_that("simple levels", { expect_error(ds.levels(), "Please provide the name of the input vector!", fixed=TRUE) expect_error(ds.levels("LAB_TSC"), "The input object LAB_TSC is not defined in sim1, sim2, sim3!", fixed=TRUE) diff --git a/tests/testthat/test-arg-ds.lexis.R b/tests/testthat/test-arg-ds.lexis.R index 681598e07..52d1657df 100644 --- a/tests/testthat/test-arg-ds.lexis.R +++ b/tests/testthat/test-arg-ds.lexis.R @@ -1,6 +1,6 @@ #------------------------------------------------------------------------------- # Copyright (c) 2018-2022 University of Newcastle upon Tyne. All rights reserved. -# Copyright (c) 2022 Arjuna Technologies, Newcastle upon Tyne. All rights reserved. +# Copyright (c) 2022-2025 Arjuna Technologies, Newcastle upon Tyne. All rights reserved. # # This program and the accompanying materials # are made available under the terms of the GNU Public License v3.0. @@ -19,12 +19,12 @@ connect.studies.dataset.cnsim(list("LAB_TSC")) # Tests # -context("ds.lexis::arg::test errors") +# context("ds.lexis::arg::test errors") test_that("lexis_erros", { expect_error(ds.lexis(), "Please provide the name of the column that holds the subject IDs!", fixed=TRUE) }) -context("ds.lexis::arg::test intervalWidth") +# context("ds.lexis::arg::test intervalWidth") test_that("simple lexis", { expect_error(ds.lexis(data='D', intervalWidth = NA, idCol = 'D$id', entryCol = 'D$starttime', exitCol = 'D$endtime', statusCol = 'D$cens', variables = c('D$age.60'), expandDF = 'EM.new'), "Please provide a (non-zero) single numeric value or vector to identify the survival time intervals", fixed = TRUE) expect_error(ds.lexis(data='D', intervalWidth = NULL, idCol = 'D$id', entryCol = 'D$starttime', exitCol = 'D$endtime', statusCol = 'D$cens', variables = c('D$age.60'), expandDF = 'EM.new'), "Please provide a (non-zero) single numeric value or vector to identify the survival time intervals", fixed = TRUE) diff --git a/tests/testthat/test-arg-ds.list.R b/tests/testthat/test-arg-ds.list.R index ffbcb7496..b2bc229d6 100644 --- a/tests/testthat/test-arg-ds.list.R +++ b/tests/testthat/test-arg-ds.list.R @@ -1,5 +1,6 @@ #------------------------------------------------------------------------------- # Copyright (c) 2019-2022 University of Newcastle upon Tyne. All rights reserved. +# Copyright (c) 2022-2025 Arjuna Technologies, Newcastle upon Tyne. All rights reserved. # # This program and the accompanying materials # are made available under the terms of the GNU Public License v3.0. @@ -18,7 +19,7 @@ connect.studies.dataset.cnsim(list("LAB_TSC")) # Tests # -context("ds.list::arg::test errors") +# context("ds.list::arg::test errors") test_that("simple ds.list errors", { expect_error(ds.list(), "x=NULL. Please provide the names of the objects to coerce into a list!") }) diff --git a/tests/testthat/test-arg-ds.lmerSLMA.R b/tests/testthat/test-arg-ds.lmerSLMA.R index bd229260b..d5f6510da 100644 --- a/tests/testthat/test-arg-ds.lmerSLMA.R +++ b/tests/testthat/test-arg-ds.lmerSLMA.R @@ -1,5 +1,6 @@ #------------------------------------------------------------------------------- # Copyright (c) 2019-2022 University of Newcastle upon Tyne. All rights reserved. +# Copyright (c) 2022-2025 Arjuna Technologies, Newcastle upon Tyne. All rights reserved. # # This program and the accompanying materials # are made available under the terms of the GNU Public License v3.0. @@ -12,7 +13,7 @@ # Set up # -context("ds.lmerSLMA::arg::setup") +# context("ds.lmerSLMA::arg::setup") connect.studies.dataset.cluster.int(list("incid_rate", "trtGrp", "Male", "idDoctor", "BMI", "idSurgery")) @@ -24,7 +25,7 @@ test_that("setup", { # Tests # -context("ds.lmerSLMA::arg") +# context("ds.lmerSLMA::arg") test_that("simple lmerSLMA tesing (mis)use of arguments", { res <- ds.lmerSLMA(formula = 'incid_rate ~ trtGrp + Male', dataName = 'D') expect_equal(res$study1$errorMessage, "No random effects terms specified in formula", fixed=TRUE) @@ -50,7 +51,7 @@ test_that("simple lmerSLMA tesing (mis)use of arguments", { # Shutdown # -context("ds.lmerSLMA::arg::shutdown") +# context("ds.lmerSLMA::arg::shutdown") test_that("shutdown", { ds_expect_variables(c("D", "offset", "offset.to.use", "weights", "weights.to.use")) @@ -62,4 +63,4 @@ disconnect.studies.dataset.cluster.int() # Done # -context("ds.lmerSLMA::arg::done") +# context("ds.lmerSLMA::arg::done") diff --git a/tests/testthat/test-arg-ds.log.R b/tests/testthat/test-arg-ds.log.R index d2510c08f..b51cdf7d4 100644 --- a/tests/testthat/test-arg-ds.log.R +++ b/tests/testthat/test-arg-ds.log.R @@ -1,5 +1,6 @@ #------------------------------------------------------------------------------- # Copyright (c) 2018-2022 University of Newcastle upon Tyne. All rights reserved. +# Copyright (c) 2022-2025 Arjuna Technologies, Newcastle upon Tyne. All rights reserved. # # This program and the accompanying materials # are made available under the terms of the GNU Public License v3.0. @@ -18,7 +19,7 @@ connect.studies.dataset.cnsim(list("LAB_TSC")) # Tests # -context("ds.log::arg::test errors") +# context("ds.log::arg::test errors") test_that("log_erros", { expect_error(ds.log(), "Please provide the name of the input vector!", fixed=TRUE) }) diff --git a/tests/testthat/test-arg-ds.look.R b/tests/testthat/test-arg-ds.look.R index f1d7e6951..705660be7 100644 --- a/tests/testthat/test-arg-ds.look.R +++ b/tests/testthat/test-arg-ds.look.R @@ -1,5 +1,6 @@ #------------------------------------------------------------------------------- # Copyright (c) 2018-2022 University of Newcastle upon Tyne. All rights reserved. +# Copyright (c) 2022-2025 Arjuna Technologies, Newcastle upon Tyne. All rights reserved. # # This program and the accompanying materials # are made available under the terms of the GNU Public License v3.0. @@ -18,7 +19,7 @@ connect.studies.dataset.cnsim(list("LAB_TSC")) # Tests # -context("ds.look::arg::test errors") +# context("ds.look::arg::test errors") test_that("look_erros", { expect_error(expect_warning(ds.look(checks=TRUE), "'ds.look' is deprecated.", fixed = TRUE), " missing, please give an expression/function in inverted commas\n", fixed=TRUE) }) diff --git a/tests/testthat/test-arg-ds.ls.R b/tests/testthat/test-arg-ds.ls.R index 9509a527f..bf24b112d 100644 --- a/tests/testthat/test-arg-ds.ls.R +++ b/tests/testthat/test-arg-ds.ls.R @@ -1,5 +1,6 @@ #------------------------------------------------------------------------------- # Copyright (c) 2019-2022 University of Newcastle upon Tyne. All rights reserved. +# Copyright (c) 2022-2025 Arjuna Technologies, Newcastle upon Tyne. All rights reserved. # # This program and the accompanying materials # are made available under the terms of the GNU Public License v3.0. @@ -12,7 +13,7 @@ # Set up # -context("ds.ls::arg::setup") +# context("ds.ls::arg::setup") connect.studies.dataset.cnsim(list("LAB_TSC", "LAB_TRIG")) @@ -24,9 +25,9 @@ test_that("setup", { # Tests # -context("ds.ls::arg") +# context("ds.ls::arg") test_that("containing escape sequence", { - res1 <- ds.ls(search.filter="_:A:_Enviroment") + res1 <- ds.ls(search.filter="_:A:_Environment") expect_length(res1, 1) expect_equal(res1, "Warning: Code replacing wildcard (i.e. '*') is '_:A:_' but this appears in your original search filter string - please respecify") @@ -36,7 +37,7 @@ test_that("containing escape sequence", { expect_length(res2, 1) expect_equal(res2, "Warning: Code replacing wildcard (i.e. '*') is '_:A:_' but this appears in your original search filter string - please respecify") - res3 <- ds.ls(search.filter="Enviroment_:A:_") + res3 <- ds.ls(search.filter="Environment_:A:_") expect_length(res3, 1) expect_equal(res3, "Warning: Code replacing wildcard (i.e. '*') is '_:A:_' but this appears in your original search filter string - please respecify") @@ -46,7 +47,7 @@ test_that("containing escape sequence", { # Shutdown # -context("ds.ls::arg::shutdown") +# context("ds.ls::arg::shutdown") test_that("shutdown", { ds_expect_variables(c("D")) @@ -58,4 +59,4 @@ disconnect.studies.dataset.cnsim() # Done # -context("ds.ls::arg::done") +# context("ds.ls::arg::done") diff --git a/tests/testthat/test-arg-ds.make.R b/tests/testthat/test-arg-ds.make.R index c71f5b399..170b6f113 100644 --- a/tests/testthat/test-arg-ds.make.R +++ b/tests/testthat/test-arg-ds.make.R @@ -1,5 +1,6 @@ #------------------------------------------------------------------------------- # Copyright (c) 2018-2022 University of Newcastle upon Tyne. All rights reserved. +# Copyright (c) 2022-2025 Arjuna Technologies, Newcastle upon Tyne. All rights reserved. # # This program and the accompanying materials # are made available under the terms of the GNU Public License v3.0. @@ -18,8 +19,8 @@ connect.studies.dataset.cnsim(list("LAB_TSC")) # Tests # -context("ds.make::arg::test errors") -test_that("make_errors", { +# context("ds.make::arg::test errors") +test_that("make_erros", { expect_error(ds.make(), "Please give the name of object to assign or an expression to evaluate and assign.!\n", fixed=TRUE) }) diff --git a/tests/testthat/test-arg-ds.matrix.R b/tests/testthat/test-arg-ds.matrix.R index 2201a4f40..c6cf9089e 100644 --- a/tests/testthat/test-arg-ds.matrix.R +++ b/tests/testthat/test-arg-ds.matrix.R @@ -1,5 +1,6 @@ #------------------------------------------------------------------------------- # Copyright (c) 2018-2022 University of Newcastle upon Tyne. All rights reserved. +# Copyright (c) 2022-2025 Arjuna Technologies, Newcastle upon Tyne. All rights reserved. # # This program and the accompanying materials # are made available under the terms of the GNU Public License v3.0. @@ -18,7 +19,7 @@ connect.studies.dataset.cnsim(list("LAB_TSC")) # Tests # -context("ds.matrix::arg::test errors") +# context("ds.matrix::arg::test errors") test_that("matrix_erros", { res <- ds.matrix(mdata=NULL) diff --git a/tests/testthat/test-arg-ds.matrixDet.R b/tests/testthat/test-arg-ds.matrixDet.R index 37d633fa9..c598d81b7 100644 --- a/tests/testthat/test-arg-ds.matrixDet.R +++ b/tests/testthat/test-arg-ds.matrixDet.R @@ -1,5 +1,6 @@ #------------------------------------------------------------------------------- # Copyright (c) 2018-2022 University of Newcastle upon Tyne. All rights reserved. +# Copyright (c) 2022-2025 Arjuna Technologies, Newcastle upon Tyne. All rights reserved. # # This program and the accompanying materials # are made available under the terms of the GNU Public License v3.0. @@ -18,7 +19,7 @@ connect.studies.dataset.cnsim(list("LAB_TSC")) # Tests # -context("ds.matrixDet::arg::test errors") +# context("ds.matrixDet::arg::test errors") test_that("matrixDet_erros", { res <- ds.matrixDet() diff --git a/tests/testthat/test-arg-ds.matrixDet.report.R b/tests/testthat/test-arg-ds.matrixDet.report.R index 6bb0bc6c3..d76b92392 100644 --- a/tests/testthat/test-arg-ds.matrixDet.report.R +++ b/tests/testthat/test-arg-ds.matrixDet.report.R @@ -1,5 +1,6 @@ #------------------------------------------------------------------------------- # Copyright (c) 2019-2022 University of Newcastle upon Tyne. All rights reserved. +# Copyright (c) 2022-2025 Arjuna Technologies, Newcastle upon Tyne. All rights reserved. # # This program and the accompanying materials # are made available under the terms of the GNU Public License v3.0. @@ -18,7 +19,7 @@ connect.studies.dataset.cnsim(list("LAB_TSC")) # Tests # -context("ds.matrixDet.report::arg::test errors") +# context("ds.matrixDet.report::arg::test errors") test_that("ds.matixDet.report erros", { res <- ds.matrixDet.report(M1=NULL) diff --git a/tests/testthat/test-arg-ds.matrixDiag.R b/tests/testthat/test-arg-ds.matrixDiag.R index e022d23cf..0dc152ff2 100644 --- a/tests/testthat/test-arg-ds.matrixDiag.R +++ b/tests/testthat/test-arg-ds.matrixDiag.R @@ -1,5 +1,6 @@ #------------------------------------------------------------------------------- # Copyright (c) 2018-2022 University of Newcastle upon Tyne. All rights reserved. +# Copyright (c) 2022-2025 Arjuna Technologies, Newcastle upon Tyne. All rights reserved. # # This program and the accompanying materials # are made available under the terms of the GNU Public License v3.0. @@ -18,7 +19,7 @@ connect.studies.dataset.cnsim(list("LAB_TSC")) # Tests # -context("ds.matrixDiag::arg::test errors") +# context("ds.matrixDiag::arg::test errors") test_that("matrixDiag_erros", { res <- ds.matrixDiag() diff --git a/tests/testthat/test-arg-ds.matrixDimnames.R b/tests/testthat/test-arg-ds.matrixDimnames.R index 02a1f33b5..c6da09344 100644 --- a/tests/testthat/test-arg-ds.matrixDimnames.R +++ b/tests/testthat/test-arg-ds.matrixDimnames.R @@ -1,5 +1,6 @@ #------------------------------------------------------------------------------- # Copyright (c) 2018-2022 University of Newcastle upon Tyne. All rights reserved. +# Copyright (c) 2022-2025 Arjuna Technologies, Newcastle upon Tyne. All rights reserved. # # This program and the accompanying materials # are made available under the terms of the GNU Public License v3.0. @@ -18,7 +19,7 @@ connect.studies.dataset.cnsim(list("LAB_TSC")) # Tests # -context("ds.matrixDimnames::arg::test errors") +# context("ds.matrixDimnames::arg::test errors") test_that("matrixDimnames_erros", { res <- ds.matrixDimnames() diff --git a/tests/testthat/test-arg-ds.matrixInvert.R b/tests/testthat/test-arg-ds.matrixInvert.R index 3718d6d07..dfed18dd6 100644 --- a/tests/testthat/test-arg-ds.matrixInvert.R +++ b/tests/testthat/test-arg-ds.matrixInvert.R @@ -1,5 +1,6 @@ #------------------------------------------------------------------------------- # Copyright (c) 2018-2022 University of Newcastle upon Tyne. All rights reserved. +# Copyright (c) 2022-2025 Arjuna Technologies, Newcastle upon Tyne. All rights reserved. # # This program and the accompanying materials # are made available under the terms of the GNU Public License v3.0. @@ -18,7 +19,7 @@ connect.studies.dataset.cnsim(list("LAB_TSC")) # Tests # -context("ds.matrixInvert::arg::test errors") +# context("ds.matrixInvert::arg::test errors") test_that("matrixInvert_erros", { res <- ds.matrixInvert() diff --git a/tests/testthat/test-arg-ds.matrixMult.R b/tests/testthat/test-arg-ds.matrixMult.R index 1ab873494..95564e0d5 100644 --- a/tests/testthat/test-arg-ds.matrixMult.R +++ b/tests/testthat/test-arg-ds.matrixMult.R @@ -1,5 +1,6 @@ #------------------------------------------------------------------------------- # Copyright (c) 2018-2022 University of Newcastle upon Tyne. All rights reserved. +# Copyright (c) 2022-2025 Arjuna Technologies, Newcastle upon Tyne. All rights reserved. # # This program and the accompanying materials # are made available under the terms of the GNU Public License v3.0. @@ -18,7 +19,7 @@ connect.studies.dataset.cnsim(list("LAB_TSC")) # Tests # -context("ds.matrixMult::arg::test errors") +# context("ds.matrixMult::arg::test errors") test_that("matrixMult_erros", { res <- ds.matrixMult() diff --git a/tests/testthat/test-arg-ds.matrixTranspose.R b/tests/testthat/test-arg-ds.matrixTranspose.R index ff94f60f0..d78c69041 100644 --- a/tests/testthat/test-arg-ds.matrixTranspose.R +++ b/tests/testthat/test-arg-ds.matrixTranspose.R @@ -1,5 +1,6 @@ #------------------------------------------------------------------------------- # Copyright (c) 2018-2022 University of Newcastle upon Tyne. All rights reserved. +# Copyright (c) 2022-2025 Arjuna Technologies, Newcastle upon Tyne. All rights reserved. # # This program and the accompanying materials # are made available under the terms of the GNU Public License v3.0. @@ -18,7 +19,7 @@ connect.studies.dataset.cnsim(list("LAB_TSC")) # Tests # -context("ds.matrixTranspose::arg::test errors") +# context("ds.matrixTranspose::arg::test errors") test_that("matrixTranspose_erros", { res <- ds.matrixTranspose() diff --git a/tests/testthat/test-arg-ds.mean.R b/tests/testthat/test-arg-ds.mean.R index b28fdcbde..96ef958ba 100644 --- a/tests/testthat/test-arg-ds.mean.R +++ b/tests/testthat/test-arg-ds.mean.R @@ -1,5 +1,6 @@ #------------------------------------------------------------------------------- # Copyright (c) 2018-2022 University of Newcastle upon Tyne. All rights reserved. +# Copyright (c) 2022-2025 Arjuna Technologies, Newcastle upon Tyne. All rights reserved. # # This program and the accompanying materials # are made available under the terms of the GNU Public License v3.0. @@ -18,7 +19,7 @@ connect.studies.dataset.cnsim(list("LAB_TSC")) # Tests # -context("ds.mean::arg::test errors") +# context("ds.mean::arg::test errors") test_that("mean_erros", { ds.asCharacter(x='D$LAB_TSC', newobj="not_a_numeric") diff --git a/tests/testthat/test-arg-ds.meanByClass.R b/tests/testthat/test-arg-ds.meanByClass.R index b829e05b9..c4de0a22b 100644 --- a/tests/testthat/test-arg-ds.meanByClass.R +++ b/tests/testthat/test-arg-ds.meanByClass.R @@ -1,5 +1,6 @@ #------------------------------------------------------------------------------- # Copyright (c) 2019-2022 University of Newcastle upon Tyne. All rights reserved. +# Copyright (c) 2022-2025 Arjuna Technologies, Newcastle upon Tyne. All rights reserved. # # This program and the accompanying materials # are made available under the terms of the GNU Public License v3.0. @@ -18,7 +19,7 @@ connect.studies.dataset.cnsim(list("LAB_TSC","LAB_HDL","GENDER","DIS_DIAB","PM_B # Tests # -context("ds.meanByClass::arg::test errors") +# context("ds.meanByClass::arg::test errors") test_that("meanByClass_erros", { ds.asCharacter(x='D$GENDER', newobj="not_a_numeric") ds.asCharacter(x='D$GENDER', newobj="not_a_factor") diff --git a/tests/testthat/test-arg-ds.meanSdGp.R b/tests/testthat/test-arg-ds.meanSdGp.R index bacc72410..bac7b2c46 100644 --- a/tests/testthat/test-arg-ds.meanSdGp.R +++ b/tests/testthat/test-arg-ds.meanSdGp.R @@ -1,5 +1,6 @@ #------------------------------------------------------------------------------- # Copyright (c) 2018-2022 University of Newcastle upon Tyne. All rights reserved. +# Copyright (c) 2022-2025 Arjuna Technologies, Newcastle upon Tyne. All rights reserved. # # This program and the accompanying materials # are made available under the terms of the GNU Public License v3.0. @@ -18,7 +19,7 @@ connect.studies.dataset.cnsim(list("LAB_TSC")) # Tests # -context("ds.meanSdGp::arg::test errors") +# context("ds.meanSdGp::arg::test errors") test_that("meanSdGp_erros", { expect_error(ds.meanSdGp(), "Please provide the name of the input vector!", fixed=TRUE) }) diff --git a/tests/testthat/test-arg-ds.merge.R b/tests/testthat/test-arg-ds.merge.R index 5f6ccf385..4bb0bb8b4 100644 --- a/tests/testthat/test-arg-ds.merge.R +++ b/tests/testthat/test-arg-ds.merge.R @@ -1,5 +1,6 @@ #------------------------------------------------------------------------------- # Copyright (c) 2018-2022 University of Newcastle upon Tyne. All rights reserved. +# Copyright (c) 2022-2025 Arjuna Technologies, Newcastle upon Tyne. All rights reserved. # # This program and the accompanying materials # are made available under the terms of the GNU Public License v3.0. @@ -18,7 +19,7 @@ connect.studies.dataset.cnsim(list("LAB_TSC")) # Tests # -context("ds.merge::arg::test errors") +# context("ds.merge::arg::test errors") test_that("merge_erros", { expect_error(ds.merge(), "Please provide the name (eg 'name1') of first dataframe to be merged (called x) ", fixed=TRUE) expect_error(ds.merge(x.name="A"), "Please provide the name (eg 'name2') of second dataframe to be merged (called y) ", fixed=TRUE) diff --git a/tests/testthat/test-arg-ds.message.R b/tests/testthat/test-arg-ds.message.R index 960e9811d..ea55ca136 100644 --- a/tests/testthat/test-arg-ds.message.R +++ b/tests/testthat/test-arg-ds.message.R @@ -1,5 +1,6 @@ #------------------------------------------------------------------------------- # Copyright (c) 2019-2022 University of Newcastle upon Tyne. All rights reserved. +# Copyright (c) 2022-2025 Arjuna Technologies, Newcastle upon Tyne. All rights reserved. # # This program and the accompanying materials # are made available under the terms of the GNU Public License v3.0. @@ -18,7 +19,7 @@ connect.studies.dataset.cnsim(list("LAB_TSC")) # Tests # -context("ds.message::arg") +# context("ds.message::arg") test_that("request message for NULL", { expect_error(expect_warning(ds.message(NULL), "'ds.message' is deprecated.", fixed = TRUE), "Please provide the name of the studyside list object that holds the message\n in character format ie: 'object.name' in inverted commas", fixed=TRUE) }) diff --git a/tests/testthat/test-arg-ds.metadata.R b/tests/testthat/test-arg-ds.metadata.R index 6c05ee0a7..b31209f9a 100644 --- a/tests/testthat/test-arg-ds.metadata.R +++ b/tests/testthat/test-arg-ds.metadata.R @@ -1,5 +1,6 @@ #------------------------------------------------------------------------------- # Copyright (c) 2018-2022 University of Newcastle upon Tyne. All rights reserved. +# Copyright (c) 2022-2025 Arjuna Technologies, Newcastle upon Tyne. All rights reserved. # # This program and the accompanying materials # are made available under the terms of the GNU Public License v3.0. @@ -12,7 +13,7 @@ # Set up # -context("ds.metadata::arg::setup") +# context("ds.metadata::arg::setup") connect.studies.dataset.cnsim(list('LAB_TSC', 'LAB_TRIG', 'LAB_HDL', 'LAB_GLUC_ADJUSTED', 'PM_BMI_CONTINUOUS', 'DIS_CVA', 'MEDI_LPD', 'DIS_DIAB', 'DIS_AMI', 'GENDER', 'PM_BMI_CATEGORICAL')) @@ -24,7 +25,7 @@ test_that("setup", { # Tests # -context("ds.metadata::arg") +# context("ds.metadata::arg") test_that("missing variable", { expect_error(ds.metadata(x='E'), "The input object E is not defined in sim1, sim2, sim3!", fixed = TRUE) }) @@ -41,7 +42,7 @@ test_that("missing column", { # Tear down # -context("ds.metadata::arg::shutdown") +# context("ds.metadata::arg::shutdown") test_that("shutdown", { ds_expect_variables(c("D")) @@ -49,4 +50,4 @@ test_that("shutdown", { disconnect.studies.dataset.cnsim() -context("ds.metadata::arg::done") +# context("ds.metadata::arg::done") diff --git a/tests/testthat/test-arg-ds.mice.R b/tests/testthat/test-arg-ds.mice.R index 4c2c21d33..a90c9c166 100644 --- a/tests/testthat/test-arg-ds.mice.R +++ b/tests/testthat/test-arg-ds.mice.R @@ -1,5 +1,6 @@ #------------------------------------------------------------------------------- # Copyright (c) 2018-2022 University of Newcastle upon Tyne. All rights reserved. +# Copyright (c) 2022-2025 Arjuna Technologies, Newcastle upon Tyne. All rights reserved. # # This program and the accompanying materials # are made available under the terms of the GNU Public License v3.0. @@ -18,7 +19,7 @@ connect.studies.dataset.cnsim(list("LAB_TSC")) # Tests # -context("ds.mice::arg::test errors") +# context("ds.mice::arg::test errors") test_that("mice_errors", { expect_error(ds.mice(), "Please provide the name of the dataframe or matrix that contains the incomplete data!", fixed=TRUE) }) diff --git a/tests/testthat/test-arg-ds.names.R b/tests/testthat/test-arg-ds.names.R index 1c7fb10ae..f8c049106 100644 --- a/tests/testthat/test-arg-ds.names.R +++ b/tests/testthat/test-arg-ds.names.R @@ -1,5 +1,6 @@ #------------------------------------------------------------------------------- # Copyright (c) 2019-2022 University of Newcastle upon Tyne. All rights reserved. +# Copyright (c) 2022-2025 Arjuna Technologies, Newcastle upon Tyne. All rights reserved. # # This program and the accompanying materials # are made available under the terms of the GNU Public License v3.0. @@ -18,7 +19,7 @@ connect.studies.dataset.cnsim(list("LAB_TSC")) # Tests # -context("ds.names::arg::test errors") +# context("ds.names::arg::test errors") test_that("simple ds.names errors", { expect_error(ds.names(), "Please provide the name of the input list!", fixed=TRUE) diff --git a/tests/testthat/test-arg-ds.ns.R b/tests/testthat/test-arg-ds.ns.R index b63c944a2..56fb58f5a 100644 --- a/tests/testthat/test-arg-ds.ns.R +++ b/tests/testthat/test-arg-ds.ns.R @@ -1,5 +1,6 @@ #------------------------------------------------------------------------------- # Copyright (c) 2019-2022 University of Newcastle upon Tyne. All rights reserved. +# Copyright (c) 2022-2025 Arjuna Technologies, Newcastle upon Tyne. All rights reserved. # # This program and the accompanying materials # are made available under the terms of the GNU Public License v3.0. @@ -12,7 +13,7 @@ # Set up # -context("ds.ns::arg::setup") +# context("ds.ns::arg::setup") connect.studies.dataset.cnsim(list("PM_BMI_CONTINUOUS")) @@ -24,7 +25,7 @@ test_that("setup", { # Tests # -context("ds.ns::arg::test errors") +# context("ds.ns::arg::test errors") test_that("ns_errors", { expect_error(ds.ns(), "argument \"x\" is missing, with no default", fixed=TRUE) expect_error(ds.qlspline(x=NULL), "Please provide the name of the input variable x!", fixed=TRUE) @@ -34,7 +35,7 @@ test_that("ns_errors", { # Done # -context("ds.ns::arg::shutdown") +# context("ds.ns::arg::shutdown") test_that("shutdown", { ds_expect_variables(c("D")) @@ -42,4 +43,4 @@ test_that("shutdown", { disconnect.studies.dataset.cnsim() -context("ds.ns::arg::done") +# context("ds.ns::arg::done") diff --git a/tests/testthat/test-arg-ds.numNA.R b/tests/testthat/test-arg-ds.numNA.R index 62d1af6d9..be436303a 100644 --- a/tests/testthat/test-arg-ds.numNA.R +++ b/tests/testthat/test-arg-ds.numNA.R @@ -1,5 +1,6 @@ #------------------------------------------------------------------------------- # Copyright (c) 2019-2022 University of Newcastle upon Tyne. All rights reserved. +# Copyright (c) 2022-2025 Arjuna Technologies, Newcastle upon Tyne. All rights reserved. # # This program and the accompanying materials # are made available under the terms of the GNU Public License v3.0. @@ -18,7 +19,7 @@ connect.studies.dataset.cnsim(list("LAB_TSC")) # Tests # -context("ds.numNA::arg::test errors") +# context("ds.numNA::arg::test errors") test_that("simple ds.numNA errors", { expect_error(ds.numNA(), "Please provide the name of a vector!") }) diff --git a/tests/testthat/test-arg-ds.qlspline.R b/tests/testthat/test-arg-ds.qlspline.R index 697b2898e..c7ff7650a 100644 --- a/tests/testthat/test-arg-ds.qlspline.R +++ b/tests/testthat/test-arg-ds.qlspline.R @@ -1,5 +1,6 @@ #------------------------------------------------------------------------------- # Copyright (c) 2019-2022 University of Newcastle upon Tyne. All rights reserved. +# Copyright (c) 2022-2025 Arjuna Technologies, Newcastle upon Tyne. All rights reserved. # # This program and the accompanying materials # are made available under the terms of the GNU Public License v3.0. @@ -12,7 +13,7 @@ # Set up # -context("ds.qlspline::arg::setup") +# context("ds.qlspline::arg::setup") connect.studies.dataset.cnsim(list("PM_BMI_CONTINUOUS")) @@ -24,7 +25,7 @@ test_that("setup", { # Tests # -context("ds.qlspline::arg::test errors") +# context("ds.qlspline::arg::test errors") test_that("qlspline_errors", { expect_error(ds.qlspline(), "argument \"x\" is missing, with no default", fixed=TRUE) expect_error(ds.qlspline(x=NULL), "Please provide the name of the input variable x!", fixed=TRUE) @@ -36,7 +37,7 @@ test_that("qlspline_errors", { # Done # -context("ds.qlspline::arg::shutdown") +# context("ds.qlspline::arg::shutdown") test_that("shutdown", { ds_expect_variables(c("D")) @@ -44,4 +45,4 @@ test_that("shutdown", { disconnect.studies.dataset.cnsim() -context("ds.qlspline::arg::done") +# context("ds.qlspline::arg::done") diff --git a/tests/testthat/test-arg-ds.quantileMean.R b/tests/testthat/test-arg-ds.quantileMean.R index 2f94db2cc..4d1587628 100644 --- a/tests/testthat/test-arg-ds.quantileMean.R +++ b/tests/testthat/test-arg-ds.quantileMean.R @@ -1,5 +1,6 @@ #------------------------------------------------------------------------------- # Copyright (c) 2018-2022 University of Newcastle upon Tyne. All rights reserved. +# Copyright (c) 2022-2025 Arjuna Technologies, Newcastle upon Tyne. All rights reserved. # # This program and the accompanying materials # are made available under the terms of the GNU Public License v3.0. @@ -18,7 +19,7 @@ connect.studies.dataset.cnsim(list('LAB_HDL')) # Tests # -context("ds.quantileMean::arg::test errors") +# context("ds.quantileMean::arg::test errors") ds.asCharacter(x='D$LAB_HDL', newobj="not_a_numeric") test_that("quantileMean_erros", { expect_error(ds.quantileMean(), "Please provide the name of the input vector!", fixed=TRUE) diff --git a/tests/testthat/test-arg-ds.rBinom.R b/tests/testthat/test-arg-ds.rBinom.R index e031196a6..8d4100bde 100644 --- a/tests/testthat/test-arg-ds.rBinom.R +++ b/tests/testthat/test-arg-ds.rBinom.R @@ -1,5 +1,6 @@ #------------------------------------------------------------------------------- # Copyright (c) 2018-2022 University of Newcastle upon Tyne. All rights reserved. +# Copyright (c) 2022-2025 Arjuna Technologies, Newcastle upon Tyne. All rights reserved. # # This program and the accompanying materials # are made available under the terms of the GNU Public License v3.0. @@ -18,7 +19,7 @@ connect.studies.dataset.cnsim(list("LAB_TSC")) # Tests # -context("ds.rBinom::arg::test errors") +# context("ds.rBinom::arg::test errors") test_that("rBinom_erros", { error.message <- ds.rBinom(seed.as.integer='Value') diff --git a/tests/testthat/test-arg-ds.rNorm.R b/tests/testthat/test-arg-ds.rNorm.R index 0f3cb82c5..d4ec8075b 100644 --- a/tests/testthat/test-arg-ds.rNorm.R +++ b/tests/testthat/test-arg-ds.rNorm.R @@ -1,5 +1,6 @@ #------------------------------------------------------------------------------- # Copyright (c) 2018-2022 University of Newcastle upon Tyne. All rights reserved. +# Copyright (c) 2022-2025 Arjuna Technologies, Newcastle upon Tyne. All rights reserved. # # This program and the accompanying materials # are made available under the terms of the GNU Public License v3.0. @@ -18,7 +19,7 @@ connect.studies.dataset.cnsim(list("LAB_TSC")) # Tests # -context("ds.rNorm::arg::test errors") +# context("ds.rNorm::arg::test errors") test_that("rNorm_erros", { error.message <- ds.rNorm(seed.as.integer='Value') diff --git a/tests/testthat/test-arg-ds.rPois.R b/tests/testthat/test-arg-ds.rPois.R index 047064f97..707ca3813 100644 --- a/tests/testthat/test-arg-ds.rPois.R +++ b/tests/testthat/test-arg-ds.rPois.R @@ -1,5 +1,6 @@ #------------------------------------------------------------------------------- # Copyright (c) 2018-2022 University of Newcastle upon Tyne. All rights reserved. +# Copyright (c) 2022-2025 Arjuna Technologies, Newcastle upon Tyne. All rights reserved. # # This program and the accompanying materials # are made available under the terms of the GNU Public License v3.0. @@ -18,7 +19,7 @@ connect.studies.dataset.cnsim(list("LAB_TSC")) # Tests # -context("ds.rPois::arg::test errors") +# context("ds.rPois::arg::test errors") test_that("rPois_erros", { error.message <- ds.rPois(seed.as.integer='Value') diff --git a/tests/testthat/test-arg-ds.rUnif.R b/tests/testthat/test-arg-ds.rUnif.R index bfe839e64..be046e8e5 100644 --- a/tests/testthat/test-arg-ds.rUnif.R +++ b/tests/testthat/test-arg-ds.rUnif.R @@ -1,5 +1,6 @@ #------------------------------------------------------------------------------- # Copyright (c) 2018-2022 University of Newcastle upon Tyne. All rights reserved. +# Copyright (c) 2022-2025 Arjuna Technologies, Newcastle upon Tyne. All rights reserved. # # This program and the accompanying materials # are made available under the terms of the GNU Public License v3.0. @@ -18,7 +19,7 @@ connect.studies.dataset.cnsim(list("LAB_TSC")) # Tests # -context("ds.rUnif::arg::test errors") +# context("ds.rUnif::arg::test errors") test_that("rUnif_erros", { error.message <- ds.rUnif(seed.as.integer='Value') diff --git a/tests/testthat/test-arg-ds.ranksSecure.R b/tests/testthat/test-arg-ds.ranksSecure.R index 18778ccaf..fc6b99e1f 100644 --- a/tests/testthat/test-arg-ds.ranksSecure.R +++ b/tests/testthat/test-arg-ds.ranksSecure.R @@ -1,5 +1,6 @@ #------------------------------------------------------------------------------- # Copyright (c) 2019-2022 University of Newcastle upon Tyne. All rights reserved. +# Copyright (c) 2022-2025 Arjuna Technologies, Newcastle upon Tyne. All rights reserved. # # This program and the accompanying materials # are made available under the terms of the GNU Public License v3.0. @@ -12,7 +13,7 @@ # Set up # -context("ds.ranksSecure::arg::setup") +# context("ds.ranksSecure::arg::setup") connect.all.datasets() @@ -24,7 +25,7 @@ test_that("setup", { # Tests # -context("ds.ranksSecure::arg::missing variable") +# context("ds.ranksSecure::arg::missing variable") test_that("missing variable", { expect_error(ds.ranksSecure("LAB_MISSING"), "There are some DataSHIELD errors, list them with datashield.errors()", fixed = TRUE) @@ -36,7 +37,7 @@ test_that("missing variable", { expect_match(res.errors$study3, "* object 'LAB_MISSING' not found") }) -context("ds.ranksSecure::arg::NULL variable") +# context("ds.ranksSecure::arg::NULL variable") test_that("NULL variable", { DSI::datashield.assign.expr(conns = ds.test_env$connections, symbol = "LAB_NULL", expr = "NULL") @@ -57,7 +58,7 @@ test_that("NULL variable", { expect_match(res.errors$study3, "* Error in stats::complete.cases\\(input.var\\) : \n no input has determined the number of cases") }) -context("ds.ranksSecure::arg::'text' variable") +# context("ds.ranksSecure::arg::'text' variable") test_that("'text' variable", { expect_error(ds.ranksSecure("D$CHARACTER"), "There are some DataSHIELD errors, list them with datashield.errors()", fixed = TRUE) @@ -69,12 +70,12 @@ test_that("'text' variable", { expect_match(res.errors$study3, "* Error in \\(1 - h\\) \\* qs\\[i\\] : non-numeric argument to binary operator") }) -context("ds.ranksSecure::arg::'logical' variable") +# context("ds.ranksSecure::arg::'logical' variable") test_that("'logical' variable", { expect_error(ds.ranksSecure("D$LOGICAL"), "FAILED: one of the extreme quantile estimates is NA probably because of a cluster of values at one end of the range of possible values. Try setting a narrower range of quantile values via the argument", fixed = TRUE) }) -context("ds.ranksSecure::arg::'integer factor' variable") +# context("ds.ranksSecure::arg::'integer factor' variable") test_that("'integer factor' variable", { expect_error(expect_warning(ds.ranksSecure("D$INTEGER_FACTOR"), "no non-missing arguments to max; returning -Inf", fixed = TRUE), "There are some DataSHIELD errors, list them with datashield.errors()", fixed = TRUE) @@ -90,7 +91,7 @@ test_that("'integer factor' variable", { # Done # -context("ds.ranksSecure::arg::shutdown") +# context("ds.ranksSecure::arg::shutdown") test_that("setup", { ds_expect_variables(c("D", "LAB_NULL", "input.mean.sd.df", "min.max.df", "summary.ranks.df", "testvar.ranks")) @@ -98,4 +99,4 @@ test_that("setup", { disconnect.all.datasets() -context("ds.ranksSecure::arg::done") +# context("ds.ranksSecure::arg::done") diff --git a/tests/testthat/test-arg-ds.rbind.R b/tests/testthat/test-arg-ds.rbind.R index e25b36a19..3a4ed9f27 100644 --- a/tests/testthat/test-arg-ds.rbind.R +++ b/tests/testthat/test-arg-ds.rbind.R @@ -1,5 +1,6 @@ #------------------------------------------------------------------------------- # Copyright (c) 2018-2022 University of Newcastle upon Tyne. All rights reserved. +# Copyright (c) 2022-2025 Arjuna Technologies, Newcastle upon Tyne. All rights reserved. # # This program and the accompanying materials # are made available under the terms of the GNU Public License v3.0. @@ -18,7 +19,7 @@ connect.studies.dataset.cnsim(list("LAB_TSC")) # Tests # -context("ds.rbind::arg::test errors") +# context("ds.rbind::arg::test errors") test_that("rbind_erros", { expect_error(ds.rbind(), "Please provide a vector of character strings holding the name of the input elements!", fixed=TRUE) }) diff --git a/tests/testthat/test-arg-ds.reShape.R b/tests/testthat/test-arg-ds.reShape.R index f38f9ab7c..ed8e8102b 100644 --- a/tests/testthat/test-arg-ds.reShape.R +++ b/tests/testthat/test-arg-ds.reShape.R @@ -1,5 +1,6 @@ #------------------------------------------------------------------------------- # Copyright (c) 2018-2022 University of Newcastle upon Tyne. All rights reserved. +# Copyright (c) 2022-2025 Arjuna Technologies, Newcastle upon Tyne. All rights reserved. # # This program and the accompanying materials # are made available under the terms of the GNU Public License v3.0. @@ -18,7 +19,7 @@ connect.studies.dataset.cnsim(list("LAB_TSC")) # Tests # -context("ds.reShape::arg::test errors") +# context("ds.reShape::arg::test errors") test_that("reShape_erros", { expect_error(ds.reShape(), "Please provide the name of the list that holds the input vectors!", fixed=TRUE) expect_error(ds.reShape(data.name="test", sep=TRUE), "'sep' must be a character string", fixed=TRUE) diff --git a/tests/testthat/test-arg-ds.recodeLevels.R b/tests/testthat/test-arg-ds.recodeLevels.R index 597b6e9ce..88b4b36e5 100644 --- a/tests/testthat/test-arg-ds.recodeLevels.R +++ b/tests/testthat/test-arg-ds.recodeLevels.R @@ -1,5 +1,6 @@ #------------------------------------------------------------------------------- # Copyright (c) 2018-2022 University of Newcastle upon Tyne. All rights reserved. +# Copyright (c) 2022-2025 Arjuna Technologies, Newcastle upon Tyne. All rights reserved. # # This program and the accompanying materials # are made available under the terms of the GNU Public License v3.0. @@ -18,7 +19,7 @@ connect.studies.dataset.cnsim(list("PM_BMI_CATEGORICAL", "LAB_TSC")) # Tests # -context("ds.recodeLevels::arg::test errors") +# context("ds.recodeLevels::arg::test errors") test_that("recodeLevels_erros", { expect_error(expect_warning(ds.recodeLevels(), "'ds.recodeLevels' is deprecated.", fixed = TRUE), " End of process!", fixed=TRUE) expect_error(expect_warning(ds.recodeLevels(x='D$PM_BMI_CATEGORICAL'), "'ds.recodeLevels' is deprecated.", fixed = TRUE), " End of process!", fixed=TRUE) diff --git a/tests/testthat/test-arg-ds.recodeValues.R b/tests/testthat/test-arg-ds.recodeValues.R index a5b747dc4..74a2da507 100644 --- a/tests/testthat/test-arg-ds.recodeValues.R +++ b/tests/testthat/test-arg-ds.recodeValues.R @@ -1,5 +1,6 @@ #------------------------------------------------------------------------------- # Copyright (c) 2018-2022 University of Newcastle upon Tyne. All rights reserved. +# Copyright (c) 2022-2025 Arjuna Technologies, Newcastle upon Tyne. All rights reserved. # # This program and the accompanying materials # are made available under the terms of the GNU Public License v3.0. @@ -18,7 +19,7 @@ connect.studies.dataset.cnsim(list("LAB_TSC")) # Tests # -context("ds.recodeValues::arg::test errors") +# context("ds.recodeValues::arg::test errors") test_that("recodeValues_erros", { expect_error(ds.recodeValues(), "Please provide the name of the variable to be recoded: eg 'xxx'", fixed=TRUE) expect_error(ds.recodeValues('D$LAB_TSC'), "Please provide a vector in the 'values2replace.vector' argument specifying\n the values to be replaced eg c(1,7)", fixed=TRUE) diff --git a/tests/testthat/test-arg-ds.rep.R b/tests/testthat/test-arg-ds.rep.R index 0ac3a0dfb..f9c2ec6ba 100644 --- a/tests/testthat/test-arg-ds.rep.R +++ b/tests/testthat/test-arg-ds.rep.R @@ -1,5 +1,6 @@ #------------------------------------------------------------------------------- # Copyright (c) 2018-2022 University of Newcastle upon Tyne. All rights reserved. +# Copyright (c) 2022-2025 Arjuna Technologies, Newcastle upon Tyne. All rights reserved. # # This program and the accompanying materials # are made available under the terms of the GNU Public License v3.0. @@ -12,7 +13,7 @@ # Set up # -context("ds.rep::arg::setup") +# context("ds.rep::arg::setup") connect.studies.dataset.survival(list("survtime", "time.id", "female")) @@ -20,7 +21,7 @@ connect.studies.dataset.survival(list("survtime", "time.id", "female")) # Tests # -context("ds.rep::arg::test errors") +# context("ds.rep::arg::test errors") test_that("ds.rep erros", { res <- ds.rep() @@ -32,8 +33,8 @@ test_that("ds.rep erros", { # Done # -context("ds.rep::arg::shutdown") +# context("ds.rep::arg::shutdown") disconnect.studies.dataset.survival() -context("ds.rep::arg::done") +# context("ds.rep::arg::done") diff --git a/tests/testthat/test-arg-ds.replaceNA.R b/tests/testthat/test-arg-ds.replaceNA.R index b768a93fa..acd8c7b7e 100644 --- a/tests/testthat/test-arg-ds.replaceNA.R +++ b/tests/testthat/test-arg-ds.replaceNA.R @@ -1,5 +1,6 @@ #------------------------------------------------------------------------------- # Copyright (c) 2019-2022 University of Newcastle upon Tyne. All rights reserved. +# Copyright (c) 2022-2025 Arjuna Technologies, Newcastle upon Tyne. All rights reserved. # # This program and the accompanying materials # are made available under the terms of the GNU Public License v3.0. @@ -18,7 +19,7 @@ connect.studies.dataset.cnsim(list("LAB_TSC")) # Tests # -context("ds.replaceNA::arg::test errors") +# context("ds.replaceNA::arg::test errors") test_that("simple ds.replaceNA errors", { expect_error(ds.replaceNA(), "Please provide the name of a vector!", fixed=TRUE) expect_error(ds.replaceNA(x="D$LAB_TSC"), "Please provide a list of replacement values!", fixed=TRUE) diff --git a/tests/testthat/test-arg-ds.rm.R b/tests/testthat/test-arg-ds.rm.R index ee4f5e3fb..bb674bca1 100644 --- a/tests/testthat/test-arg-ds.rm.R +++ b/tests/testthat/test-arg-ds.rm.R @@ -1,5 +1,6 @@ #------------------------------------------------------------------------------- # Copyright (c) 2018-2022 University of Newcastle upon Tyne. All rights reserved. +# Copyright (c) 2022-2025 Arjuna Technologies, Newcastle upon Tyne. All rights reserved. # # This program and the accompanying materials # are made available under the terms of the GNU Public License v3.0. @@ -18,7 +19,7 @@ connect.studies.dataset.survival(list("survtime", "time.id", "female")) # Tests # -context("ds.rm::arg::test errors") +# context("ds.rm::arg::test errors") test_that("ds.rm erros", { expect_error(ds.rm(), "Please provide the names of the objects to be deleted (eg 'object.name') as the x.names argument", fixed=TRUE) diff --git a/tests/testthat/test-arg-ds.rowColCalc.R b/tests/testthat/test-arg-ds.rowColCalc.R index 9fc14230f..76b8604bb 100644 --- a/tests/testthat/test-arg-ds.rowColCalc.R +++ b/tests/testthat/test-arg-ds.rowColCalc.R @@ -1,5 +1,6 @@ #------------------------------------------------------------------------------- # Copyright (c) 2018-2022 University of Newcastle upon Tyne. All rights reserved. +# Copyright (c) 2022-2025 Arjuna Technologies, Newcastle upon Tyne. All rights reserved. # # This program and the accompanying materials # are made available under the terms of the GNU Public License v3.0. @@ -18,7 +19,7 @@ connect.studies.dataset.cnsim(list("LAB_TSC", "LAB_HDL")) # Tests # -context("ds.rowColCalc::arg::test errors") +# context("ds.rowColCalc::arg::test errors") test_that("rowColCalc_errors", { expect_error(ds.rowColCalc(), "Please provide the name of a data.frame or matrix!", fixed=TRUE) expect_error(ds.rowColCalc(x='D', newobj="rsum_hdl_tsc"), "'operation' = NULL. Please set it to 'rowSums', 'colSums', 'rowMeans' or 'colMeans'", fixed=TRUE) diff --git a/tests/testthat/test-arg-ds.sample.R b/tests/testthat/test-arg-ds.sample.R index 0d14e79f4..f84f4c3e7 100644 --- a/tests/testthat/test-arg-ds.sample.R +++ b/tests/testthat/test-arg-ds.sample.R @@ -1,5 +1,6 @@ #------------------------------------------------------------------------------- # Copyright (c) 2018-2022 University of Newcastle upon Tyne. All rights reserved. +# Copyright (c) 2022-2025 Arjuna Technologies, Newcastle upon Tyne. All rights reserved. # # This program and the accompanying materials # are made available under the terms of the GNU Public License v3.0. @@ -12,7 +13,7 @@ # Set up # -context("ds.sample::arg::setup") +# context("ds.sample::arg::setup") connect.studies.dataset.cnsim(list("LAB_TSC", "LAB_TRIG")) @@ -20,7 +21,7 @@ connect.studies.dataset.cnsim(list("LAB_TSC", "LAB_TRIG")) # Tests # -context("ds.sample::arg::test errors") +# context("ds.sample::arg::test errors") test_that("cov_erros", { res1 <- ds.sample() expect_equal(res1, 'Error: x must denote a character string naming the serverside object to be sampled or an integer N denoting permute 1:N', fixed=TRUE) @@ -34,7 +35,7 @@ test_that("cov_erros", { # Shutdown # -context("ds.sample::arg::shutdown") +# context("ds.sample::arg::shutdown") disconnect.studies.dataset.cnsim() @@ -42,4 +43,4 @@ disconnect.studies.dataset.cnsim() # Done # -context("ds.sample::arg::done") +# context("ds.sample::arg::done") diff --git a/tests/testthat/test-arg-ds.seq.R b/tests/testthat/test-arg-ds.seq.R index 7ba77b7b0..3d047e7e4 100644 --- a/tests/testthat/test-arg-ds.seq.R +++ b/tests/testthat/test-arg-ds.seq.R @@ -1,5 +1,6 @@ #------------------------------------------------------------------------------- # Copyright (c) 2018-2022 University of Newcastle upon Tyne. All rights reserved. +# Copyright (c) 2022-2025 Arjuna Technologies, Newcastle upon Tyne. All rights reserved. # # This program and the accompanying materials # are made available under the terms of the GNU Public License v3.0. @@ -18,7 +19,7 @@ connect.studies.dataset.cnsim(list("LAB_TSC")) # Tests # -context("ds.seq::arg::test errors") +# context("ds.seq::arg::test errors") test_that("seq_erros", { expect_error(ds.seq(FROM.value.char="Test"), "object 'Test' not found", fixed=TRUE) }) diff --git a/tests/testthat/test-arg-ds.setSeed.R b/tests/testthat/test-arg-ds.setSeed.R index 441275817..1bf41b5ca 100644 --- a/tests/testthat/test-arg-ds.setSeed.R +++ b/tests/testthat/test-arg-ds.setSeed.R @@ -1,5 +1,6 @@ #------------------------------------------------------------------------------- # Copyright (c) 2018-2022 University of Newcastle upon Tyne. All rights reserved. +# Copyright (c) 2022-2025 Arjuna Technologies, Newcastle upon Tyne. All rights reserved. # # This program and the accompanying materials # are made available under the terms of the GNU Public License v3.0. @@ -18,7 +19,7 @@ connect.studies.dataset.cnsim(list("LAB_TSC")) # Tests # -context("ds.setSeed::arg::test errors") +# context("ds.setSeed::arg::test errors") test_that("setSeed_erros", { res <- ds.setSeed(seed.as.integer="Test") diff --git a/tests/testthat/test-arg-ds.skewness.R b/tests/testthat/test-arg-ds.skewness.R index cc1751a69..6a9440cc7 100644 --- a/tests/testthat/test-arg-ds.skewness.R +++ b/tests/testthat/test-arg-ds.skewness.R @@ -1,5 +1,6 @@ #------------------------------------------------------------------------------- # Copyright (c) 2018-2022 University of Newcastle upon Tyne. All rights reserved. +# Copyright (c) 2022-2025 Arjuna Technologies, Newcastle upon Tyne. All rights reserved. # # This program and the accompanying materials # are made available under the terms of the GNU Public License v3.0. @@ -12,7 +13,7 @@ # Set up # -context("ds.skewness::arg::setup") +# context("ds.skewness::arg::setup") connect.studies.dataset.cnsim(list("LAB_TSC")) @@ -24,7 +25,7 @@ test_that("setup", { # Tests # -context("ds.skewness::arg::test errors") +# context("ds.skewness::arg::test errors") test_that("skewness_erros", { expect_error(ds.skewness(), "Please provide the name of the input vector!", fixed=TRUE) expect_error(ds.skewness(x='D$LAB_TSC', type='datashield'), "Function argument \"type\" has to be either \"both\", \"combine\" or \"split\"", fixed=TRUE) @@ -36,7 +37,7 @@ test_that("skewness_erros", { # Done # -context("ds.skewness::arg::shutdown") +# context("ds.skewness::arg::shutdown") test_that("shutdown", { ds_expect_variables(c("D")) @@ -44,4 +45,4 @@ test_that("shutdown", { disconnect.studies.dataset.cnsim() -context("ds.skewness::arg::done") +# context("ds.skewness::arg::done") diff --git a/tests/testthat/test-arg-ds.subsetByClass.R b/tests/testthat/test-arg-ds.subsetByClass.R new file mode 100644 index 000000000..9645b195e --- /dev/null +++ b/tests/testthat/test-arg-ds.subsetByClass.R @@ -0,0 +1,32 @@ +#------------------------------------------------------------------------------- +# Copyright (c) 2019-2022 University of Newcastle upon Tyne. All rights reserved. +# Copyright (c) 2022-2025 Arjuna Technologies, Newcastle upon Tyne. All rights reserved. +# +# This program and the accompanying materials +# are made available under the terms of the GNU Public License v3.0. +# +# You should have received a copy of the GNU General Public License +# along with this program. If not, see . +#------------------------------------------------------------------------------- + +# +# Set up +# + +connect.studies.dataset.cnsim(list("LAB_TSC")) + +# +# Tests +# + +# context("ds.subsetByClass::arg::test errors") +test_that("subsetByClass_erros", { + expect_error(expect_warning(ds.subsetByClass(), "'ds.subsetByClass' is deprecated.", fixed = TRUE), "Please provide the name of the input data frame or factor!", fixed=TRUE) + expect_error(expect_warning(ds.subsetByClass(x='D$LAB_TSC'), "'ds.subsetByClass' is deprecated.", fixed = TRUE), "The object to subset from must be a 'data.frame' or a 'factor'.", fixed=TRUE) +}) + +# +# Tear down +# + +disconnect.studies.dataset.cnsim() diff --git a/tests/testthat/test-arg-ds.summary.R b/tests/testthat/test-arg-ds.summary.R index 5a2aa982c..e3d386568 100644 --- a/tests/testthat/test-arg-ds.summary.R +++ b/tests/testthat/test-arg-ds.summary.R @@ -1,5 +1,6 @@ #------------------------------------------------------------------------------- # Copyright (c) 2018-2022 University of Newcastle upon Tyne. All rights reserved. +# Copyright (c) 2022-2025 Arjuna Technologies, Newcastle upon Tyne. All rights reserved. # # This program and the accompanying materials # are made available under the terms of the GNU Public License v3.0. @@ -18,7 +19,7 @@ connect.studies.dataset.cnsim(list("LAB_TSC")) # Tests # -context("ds.summary::arg::test errors") +# context("ds.summary::arg::test errors") test_that("summary_erros", { expect_error(ds.summary(), "Please provide the name of the input vector!", fixed=TRUE) }) diff --git a/tests/testthat/test-arg-ds.table.R b/tests/testthat/test-arg-ds.table.R index b18ff9497..094cf97ce 100644 --- a/tests/testthat/test-arg-ds.table.R +++ b/tests/testthat/test-arg-ds.table.R @@ -1,5 +1,6 @@ #------------------------------------------------------------------------------- # Copyright (c) 2018-2022 University of Newcastle upon Tyne. All rights reserved. +# Copyright (c) 2022-2025 Arjuna Technologies, Newcastle upon Tyne. All rights reserved. # # This program and the accompanying materials # are made available under the terms of the GNU Public License v3.0. @@ -18,14 +19,14 @@ connect.studies.dataset.cnsim(list("DIS_CVA", "DIS_AMI", "LAB_TSC", "LAB_HDL")) # Tests # -context("ds.table::arg::test rvar has value") +# context("ds.table::arg::test rvar has value") test_that("table rvar has value", { res <- ds.table() expect_equal(res, "Error: rvar must have a value which is a character string naming the row variable for the table", fixed=TRUE) }) -context("ds.table::arg::test rvar is not a variable") +# context("ds.table::arg::test rvar is not a variable") test_that("table rvar is not a variable", { expect_error(ds.table(rvar="D$NOT_VARIABLE"), "The input object D$NOT_VARIABLE is not defined in sim1, sim2, sim3!", fixed = TRUE) @@ -34,14 +35,14 @@ test_that("table rvar is not a variable", { expect_length(res.errors, 0) }) -context("ds.table::arg::test cvar has value") +# context("ds.table::arg::test cvar has value") test_that("table cvar has value", { res <- ds.table(rvar="D$LAB_TSC", cvar=30) expect_equal(res, "Error: if cvar is not null, it must have a value which is a character string naming the column variable for the table", fixed=TRUE) }) -context("ds.table::arg::test cvar is not a variable") +# context("ds.table::arg::test cvar is not a variable") test_that("table cvar is not a variable", { expect_error(ds.table(rvar="D$DIS_CVA", cvar="D$NOT_VARIABLE"), "The input object D$NOT_VARIABLE is not defined in sim1, sim2, sim3!", fixed = TRUE) @@ -50,14 +51,14 @@ test_that("table cvar is not a variable", { expect_length(res.errors, 0) }) -context("ds.table::arg::test stvar has value") +# context("ds.table::arg::test stvar has value") test_that("table stvar has value", { res <- ds.table(rvar="D$LAB_TSC", cvar=NULL, stvar=25) expect_equal(res, "Error: if stvar is not null, it must have a value which is a character string naming the variable coding separate tables for the table", fixed=TRUE) }) -context("ds.table::arg::test stvar is not a variable") +# context("ds.table::arg::test stvar is not a variable") test_that("table stvar is not a variable", { expect_error(ds.table(rvar="D$DIS_CVA", cvar="D$DIS_AMI", stvar="D$NOT_VARIABLE"), "The input object D$NOT_VARIABLE is not defined in sim1, sim2, sim3!", fixed = TRUE) @@ -66,12 +67,12 @@ test_that("table stvar is not a variable", { expect_length(res.errors, 0) }) -context("ds.table::arg::test stvar has CORRECT value") +# context("ds.table::arg::test stvar has CORRECT value") test_that("table useNA has value", { expect_error(ds.table(rvar="D$LAB_TSC", cvar=NULL, stvar=NULL, useNA = c("BEN")), "useNA must be either 'no' or 'always'.", fixed = TRUE) }) -context("ds.table::arg::test force.nfilter has value") +# context("ds.table::arg::test force.nfilter has value") test_that("table force.nfilter has value", { expect_error(ds.table(rvar="D$LAB_TSC", cvar=NULL, stvar=NULL, useNA = c("ifany"), force.nfilter =30), "useNA must be either 'no' or 'always'.", fixed = TRUE) }) diff --git a/tests/testthat/test-arg-ds.table1D.R b/tests/testthat/test-arg-ds.table1D.R index b0bf5e6d1..56c17dd4e 100644 --- a/tests/testthat/test-arg-ds.table1D.R +++ b/tests/testthat/test-arg-ds.table1D.R @@ -1,5 +1,6 @@ #------------------------------------------------------------------------------- # Copyright (c) 2018-2022 University of Newcastle upon Tyne. All rights reserved. +# Copyright (c) 2022-2025 Arjuna Technologies, Newcastle upon Tyne. All rights reserved. # # This program and the accompanying materials # are made available under the terms of the GNU Public License v3.0. @@ -18,7 +19,7 @@ connect.studies.dataset.cnsim(list("DIS_CVA","GENDER")) # Tests # -context("ds.table1D::arg::test errors") +# context("ds.table1D::arg::test errors") test_that("table1D_erros", { expect_error(expect_warning(ds.table1D(), "'ds.table1D' is deprecated.", fixed = TRUE), "Please provide the name of the input vector!", fixed=TRUE) expect_error(expect_warning(ds.table1D(x='D$GENDER', type="datashield"), "'ds.table1D' is deprecated.", fixed = TRUE), "Function argument 'type' has to be either 'combine' or 'split'", fixed=TRUE) diff --git a/tests/testthat/test-arg-ds.table2D.R b/tests/testthat/test-arg-ds.table2D.R index 35fa39dba..e7b0623ee 100644 --- a/tests/testthat/test-arg-ds.table2D.R +++ b/tests/testthat/test-arg-ds.table2D.R @@ -1,5 +1,6 @@ #------------------------------------------------------------------------------- # Copyright (c) 2018-2022 University of Newcastle upon Tyne. All rights reserved. +# Copyright (c) 2022-2025 Arjuna Technologies, Newcastle upon Tyne. All rights reserved. # # This program and the accompanying materials # are made available under the terms of the GNU Public License v3.0. @@ -18,7 +19,7 @@ connect.studies.dataset.cnsim(list("LAB_TSC")) # Tests # -context("ds.table2D::arg::test errors") +# context("ds.table2D::arg::test errors") test_that("table2D_erros", { expect_error(expect_warning(ds.table2D(), "'ds.table2D' is deprecated.", fixed = TRUE), "Please provide the name of the x vector!", fixed=TRUE) }) diff --git a/tests/testthat/test-arg-ds.tapply.R b/tests/testthat/test-arg-ds.tapply.R index 243de56e0..5ac42edf5 100644 --- a/tests/testthat/test-arg-ds.tapply.R +++ b/tests/testthat/test-arg-ds.tapply.R @@ -1,5 +1,6 @@ #------------------------------------------------------------------------------- # Copyright (c) 2018-2022 University of Newcastle upon Tyne. All rights reserved. +# Copyright (c) 2022-2025 Arjuna Technologies, Newcastle upon Tyne. All rights reserved. # # This program and the accompanying materials # are made available under the terms of the GNU Public License v3.0. @@ -18,7 +19,7 @@ connect.studies.dataset.cnsim(list("LAB_TSC", "GENDER")) # Tests # -context("ds.tapply::arg::test errors") +# context("ds.tapply::arg::test errors") test_that("tapply_erros", { res1 <- ds.tapply() diff --git a/tests/testthat/test-arg-ds.tapply.assign.R b/tests/testthat/test-arg-ds.tapply.assign.R index 787628d19..14ea83890 100644 --- a/tests/testthat/test-arg-ds.tapply.assign.R +++ b/tests/testthat/test-arg-ds.tapply.assign.R @@ -1,5 +1,6 @@ #------------------------------------------------------------------------------- # Copyright (c) 2018-2022 University of Newcastle upon Tyne. All rights reserved. +# Copyright (c) 2022-2025 Arjuna Technologies, Newcastle upon Tyne. All rights reserved. # # This program and the accompanying materials # are made available under the terms of the GNU Public License v3.0. @@ -18,7 +19,7 @@ connect.studies.dataset.cnsim(list("LAB_TSC", "GENDER")) # Tests # -context("ds.tapply.assign::arg::test errors") +# context("ds.tapply.assign::arg::test errors") test_that("tapply_erros", { res1 <- ds.tapply.assign() diff --git a/tests/testthat/test-arg-ds.testObjExists.R b/tests/testthat/test-arg-ds.testObjExists.R index c2f657810..bf01cc77a 100644 --- a/tests/testthat/test-arg-ds.testObjExists.R +++ b/tests/testthat/test-arg-ds.testObjExists.R @@ -1,5 +1,6 @@ #------------------------------------------------------------------------------- # Copyright (c) 2018-2022 University of Newcastle upon Tyne. All rights reserved. +# Copyright (c) 2022-2025 Arjuna Technologies, Newcastle upon Tyne. All rights reserved. # # This program and the accompanying materials # are made available under the terms of the GNU Public License v3.0. @@ -18,7 +19,7 @@ connect.studies.dataset.cnsim(list("LAB_TSC")) # Tests # -context("ds.testObjExists::arg::test errors") +# context("ds.testObjExists::arg::test errors") test_that("testObjExists_erros", { res <- ds.testObjExists() diff --git a/tests/testthat/test-arg-ds.unList.R b/tests/testthat/test-arg-ds.unList.R index bddb5e06d..2d3aa4877 100644 --- a/tests/testthat/test-arg-ds.unList.R +++ b/tests/testthat/test-arg-ds.unList.R @@ -1,5 +1,6 @@ #------------------------------------------------------------------------------- # Copyright (c) 2018-2022 University of Newcastle upon Tyne. All rights reserved. +# Copyright (c) 2022-2025 Arjuna Technologies, Newcastle upon Tyne. All rights reserved. # # This program and the accompanying materials # are made available under the terms of the GNU Public License v3.0. @@ -18,7 +19,7 @@ connect.studies.dataset.cnsim(list("LAB_TSC")) # Tests # -context("ds.unList::arg::test errors") +# context("ds.unList::arg::test errors") test_that("unList_erros", { expect_error(ds.unList(), "Please provide the name of the input vector!", fixed=TRUE) }) diff --git a/tests/testthat/test-arg-ds.unique.R b/tests/testthat/test-arg-ds.unique.R index bd619015e..a0e112a59 100644 --- a/tests/testthat/test-arg-ds.unique.R +++ b/tests/testthat/test-arg-ds.unique.R @@ -1,5 +1,6 @@ #------------------------------------------------------------------------------- # Copyright (c) 2019-2022 University of Newcastle upon Tyne. All rights reserved. +# Copyright (c) 2022-2025 Arjuna Technologies, Newcastle upon Tyne. All rights reserved. # # This program and the accompanying materials # are made available under the terms of the GNU Public License v3.0. @@ -18,12 +19,12 @@ connect.studies.dataset.cnsim(list("LAB_TSC")) # Tests # -context("ds.unique::arg::no arguments") +# context("ds.unique::arg::no arguments") test_that("simple ds.unique no arguments", { expect_error(ds.unique(), "x.name=NULL. Please provide the names of the objects to de-duplicated!", fixed = TRUE) }) -context("ds.unique::arg::NULL arguments") +# context("ds.unique::arg::NULL arguments") test_that("simple ds.unique NULL arguments", { expect_error(ds.unique(NULL), "x.name=NULL. Please provide the names of the objects to de-duplicated!", fixed = TRUE) }) diff --git a/tests/testthat/test-arg-ds.var.R b/tests/testthat/test-arg-ds.var.R index 71c2d89e8..8ececd0d0 100644 --- a/tests/testthat/test-arg-ds.var.R +++ b/tests/testthat/test-arg-ds.var.R @@ -1,5 +1,6 @@ #------------------------------------------------------------------------------- # Copyright (c) 2018-2022 University of Newcastle upon Tyne. All rights reserved. +# Copyright (c) 2022-2025 Arjuna Technologies, Newcastle upon Tyne. All rights reserved. # # This program and the accompanying materials # are made available under the terms of the GNU Public License v3.0. @@ -18,7 +19,7 @@ connect.studies.dataset.cnsim(list("LAB_TSC")) # Tests # -context("ds.var::arg::test errors") +# context("ds.var::arg::test errors") test_that("var_erros", { ds.asCharacter(x='D$LAB_TSC', newobj="not_a_numeric") diff --git a/tests/testthat/test-arg-ds.vectorCalc.R b/tests/testthat/test-arg-ds.vectorCalc.R index 7a572365b..4c331b869 100644 --- a/tests/testthat/test-arg-ds.vectorCalc.R +++ b/tests/testthat/test-arg-ds.vectorCalc.R @@ -1,5 +1,6 @@ #------------------------------------------------------------------------------- # Copyright (c) 2018-2022 University of Newcastle upon Tyne. All rights reserved. +# Copyright (c) 2022-2025 Arjuna Technologies, Newcastle upon Tyne. All rights reserved. # # This program and the accompanying materials # are made available under the terms of the GNU Public License v3.0. @@ -18,7 +19,7 @@ connect.studies.dataset.survival(list("survtime")) # Tests # -context("ds.vectorCalc::arg::test errors") +# context("ds.vectorCalc::arg::test errors") test_that("ds.vectorCalc erros", { expect_error(expect_warning(ds.vectorCalc(), "'ds.vectorCalc' is deprecated.\nUse 'ds.make' instead.", fixed = TRUE), "x=NULL. Please provide the names of the objects to combine!", fixed=TRUE) diff --git a/tests/testthat/test-datachk-ANTHRO.R b/tests/testthat/test-datachk-ANTHRO.R index 2789755fa..41a53637d 100644 --- a/tests/testthat/test-datachk-ANTHRO.R +++ b/tests/testthat/test-datachk-ANTHRO.R @@ -1,5 +1,6 @@ #------------------------------------------------------------------------------- # Copyright (c) 2019-2022 University of Newcastle upon Tyne. All rights reserved. +# Copyright (c) 2022-2025 Arjuna Technologies, Newcastle upon Tyne. All rights reserved. # # This program and the accompanying materials # are made available under the terms of the GNU Public License v3.0. @@ -12,7 +13,7 @@ # Set up # -context("ANTHRO::datachk::setup") +# context("ANTHRO::datachk::setup") connect.studies.dataset.anthro(list('age', 'sex', 'weight', 'height', 'muac')) @@ -24,7 +25,7 @@ test_that("setup", { # Tests # -context("ANTHRO::datachk") +# context("ANTHRO::datachk") test_that("Check ANTHRO dataset", { res.class <- ds.class(x='D') expect_length(res.class, 3) @@ -159,7 +160,7 @@ test_that("Check ANTHRO dataset", { # Tear down # -context("ANTHRO::datachk::shutdown") +# context("ANTHRO::datachk::shutdown") test_that("shutdown", { ds_expect_variables(c("D")) @@ -171,4 +172,4 @@ disconnect.studies.dataset.anthro() # Done # -context("ANTHRO::datachk::done") +# context("ANTHRO::datachk::done") diff --git a/tests/testthat/test-datachk-CLUSTER_INT.R b/tests/testthat/test-datachk-CLUSTER_INT.R index 8fc7deff2..d86eddd1a 100644 --- a/tests/testthat/test-datachk-CLUSTER_INT.R +++ b/tests/testthat/test-datachk-CLUSTER_INT.R @@ -1,5 +1,6 @@ #------------------------------------------------------------------------------- # Copyright (c) 2019-2022 University of Newcastle upon Tyne. All rights reserved. +# Copyright (c) 2022-2025 Arjuna Technologies, Newcastle upon Tyne. All rights reserved. # # This program and the accompanying materials # are made available under the terms of the GNU Public License v3.0. @@ -12,7 +13,7 @@ # Set up # -context("CLUSTER_INT::datachk::setup") +# context("CLUSTER_INT::datachk::setup") connect.studies.dataset.cluster.int(list("idSurgery", "trtGrp", "intSurgery", "nDoctors", "idDoctor", "intDoctor", "nPatients", "Male", "age", "BMI", "diabetes", "incid_rate", "private")) @@ -24,7 +25,7 @@ test_that("setup", { # Tests # -context("CLUSTER_INT::datachk") +# context("CLUSTER_INT::datachk") test_that("Check CLUSTER INT dataset", { res.class <- ds.class(x='D') expect_length(res.class, 3) @@ -319,7 +320,7 @@ test_that("Check CLUSTER INT dataset", { # Tear down # -context("CLUSTER_INT::datachk::shutdown") +# context("CLUSTER_INT::datachk::shutdown") test_that("shutdown", { ds_expect_variables(c("D")) @@ -327,4 +328,4 @@ test_that("shutdown", { disconnect.studies.dataset.cluster.int() -context("CLUSTER_INT::datachk::done") +# context("CLUSTER_INT::datachk::done") diff --git a/tests/testthat/test-datachk-CLUSTER_SLO.R b/tests/testthat/test-datachk-CLUSTER_SLO.R index 3c61c9cb7..842a5d409 100644 --- a/tests/testthat/test-datachk-CLUSTER_SLO.R +++ b/tests/testthat/test-datachk-CLUSTER_SLO.R @@ -1,5 +1,6 @@ #------------------------------------------------------------------------------- # Copyright (c) 2019-2022 University of Newcastle upon Tyne. All rights reserved. +# Copyright (c) 2022-2025 Arjuna Technologies, Newcastle upon Tyne. All rights reserved. # # This program and the accompanying materials # are made available under the terms of the GNU Public License v3.0. @@ -12,7 +13,7 @@ # Set up # -context("CLUSTER_SLO::datachk::setup") +# context("CLUSTER_SLO::datachk::setup") connect.studies.dataset.cluster.slo(list("idSurgery", "trtGrp", "intSurgery", "nDoctors", "idDoctor", "intDoctor", "sloDoctor", "nPatients", "Male", "age", "BMI", "private", "diabetes", "incid_rate")) @@ -24,7 +25,7 @@ test_that("setup", { # Tests # -context("CLUSTER_SLO::datachk") +# context("CLUSTER_SLO::datachk") test_that("Check CLUSTER SLO dataset", { res.class <- ds.class(x='D') expect_length(res.class, 3) @@ -319,7 +320,7 @@ test_that("Check CLUSTER SLO dataset", { # Tear down # -context("CLUSTER_SLO::datachk::shutdown") +# context("CLUSTER_SLO::datachk::shutdown") test_that("shutdown", { ds_expect_variables(c("D")) @@ -327,4 +328,4 @@ test_that("shutdown", { disconnect.studies.dataset.cluster.slo() -context("CLUSTER_SLO::datachk::done") +# context("CLUSTER_SLO::datachk::done") diff --git a/tests/testthat/test-datachk-CNSIM.R b/tests/testthat/test-datachk-CNSIM.R index 7296f51b7..afdfc8214 100644 --- a/tests/testthat/test-datachk-CNSIM.R +++ b/tests/testthat/test-datachk-CNSIM.R @@ -1,5 +1,6 @@ #------------------------------------------------------------------------------- # Copyright (c) 2019-2022 University of Newcastle upon Tyne. All rights reserved. +# Copyright (c) 2022-2025 Arjuna Technologies, Newcastle upon Tyne. All rights reserved. # # This program and the accompanying materials # are made available under the terms of the GNU Public License v3.0. @@ -12,7 +13,7 @@ # Set up # -context("CNSIM::datachk::setup") +# context("CNSIM::datachk::setup") connect.studies.dataset.cnsim(list('LAB_TSC', 'LAB_TRIG', 'LAB_HDL', 'LAB_GLUC_ADJUSTED', 'PM_BMI_CONTINUOUS', 'DIS_CVA', 'MEDI_LPD', 'DIS_DIAB', 'DIS_AMI', 'GENDER', 'PM_BMI_CATEGORICAL')) @@ -24,7 +25,7 @@ test_that("setup", { # Tests # -context("CNSIM::datachk") +# context("CNSIM::datachk") test_that("Check CNSIM dataset", { res.class <- ds.class(x='D') expect_length(res.class, 3) @@ -378,7 +379,7 @@ test_that("Check CNSIM dataset", { # Tear down # -context("CNSIM::datachk::shutdown") +# context("CNSIM::datachk::shutdown") test_that("shutdown", { ds_expect_variables(c("D")) @@ -386,4 +387,4 @@ test_that("shutdown", { disconnect.studies.dataset.cnsim() -context("CNSIM::datachk::done") +# context("CNSIM::datachk::done") diff --git a/tests/testthat/test-datachk-DISCORDANT.R b/tests/testthat/test-datachk-DISCORDANT.R index bb6c06a21..5254897b2 100644 --- a/tests/testthat/test-datachk-DISCORDANT.R +++ b/tests/testthat/test-datachk-DISCORDANT.R @@ -1,5 +1,6 @@ #------------------------------------------------------------------------------- # Copyright (c) 2019-2022 University of Newcastle upon Tyne. All rights reserved. +# Copyright (c) 2022-2025 Arjuna Technologies, Newcastle upon Tyne. All rights reserved. # # This program and the accompanying materials # are made available under the terms of the GNU Public License v3.0. @@ -12,7 +13,7 @@ # Set up # -context("DISCORDANT::datachk::setup") +# context("DISCORDANT::datachk::setup") connect.discordant.dataset.simple(list('A', 'B', 'C')) @@ -24,7 +25,7 @@ test_that("setup", { # Tests # -context("DISCORDANT::datachk") +# context("DISCORDANT::datachk") test_that("Check DISCORDANT dataset", { res.class <- ds.class(x='D') expect_length(res.class, 3) @@ -123,7 +124,7 @@ test_that("Check DISCORDANT dataset", { # Tear down # -context("DISCORDANT::datachk::shutdown") +# context("DISCORDANT::datachk::shutdown") test_that("shutdown", { ds_expect_variables(c("D")) @@ -135,4 +136,4 @@ disconnect.discordant.dataset.simple() # Done # -context("DISCORDANT::datachk::done") +# context("DISCORDANT::datachk::done") diff --git a/tests/testthat/test-datachk-DNSIM.R b/tests/testthat/test-datachk-DNSIM.R index 73421dba4..f3a9e75c7 100644 --- a/tests/testthat/test-datachk-DNSIM.R +++ b/tests/testthat/test-datachk-DNSIM.R @@ -1,5 +1,6 @@ #------------------------------------------------------------------------------- # Copyright (c) 2019-2022 University of Newcastle upon Tyne. All rights reserved. +# Copyright (c) 2022-2025 Arjuna Technologies, Newcastle upon Tyne. All rights reserved. # # This program and the accompanying materials # are made available under the terms of the GNU Public License v3.0. @@ -12,7 +13,7 @@ # Set up # -context("DASIM::datachk::setup") +# context("DASIM::datachk::setup") connect.studies.dataset.dasim(list('LAB_TSC', 'LAB_TRIG', 'LAB_HDL', 'LAB_GLUC_FASTING', 'PM_BMI_CONTINUOUS', 'DIS_CVA', 'DIS_DIAB', 'DIS_AMI', 'GENDER', 'PM_BMI_CATEGORICAL')) @@ -24,7 +25,7 @@ test_that("setup", { # Tests # -context("DASIM::datachk") +# context("DASIM::datachk") test_that("Check DASIM dataset", { res.class <- ds.class(x='D') expect_length(res.class, 3) @@ -259,7 +260,7 @@ test_that("Check DASIM dataset", { # Tear down # -context("DASIM::datachk::shutdown") +# context("DASIM::datachk::shutdown") test_that("shutdown", { ds_expect_variables(c("D")) @@ -267,4 +268,4 @@ test_that("shutdown", { disconnect.studies.dataset.dasim() -context("DASIM::datachk::done") +# context("DASIM::datachk::done") diff --git a/tests/testthat/test-datachk-FACTOR_LEVELS.R b/tests/testthat/test-datachk-FACTOR_LEVELS.R index d1db51fec..927e1cab6 100644 --- a/tests/testthat/test-datachk-FACTOR_LEVELS.R +++ b/tests/testthat/test-datachk-FACTOR_LEVELS.R @@ -1,5 +1,6 @@ #------------------------------------------------------------------------------- # Copyright (c) 2019-2022 University of Newcastle upon Tyne. All rights reserved. +# Copyright (c) 2022-2025 Arjuna Technologies, Newcastle upon Tyne. All rights reserved. # # This program and the accompanying materials # are made available under the terms of the GNU Public License v3.0. @@ -12,7 +13,7 @@ # Set up # -context("FACTOR_LEVELS::datachk::setup") +# context("FACTOR_LEVELS::datachk::setup") connect.testing.dataset.factor_levels() @@ -24,7 +25,7 @@ test_that("setup", { # Tests # -context("FACTOR_LEVELS::datachk") +# context("FACTOR_LEVELS::datachk") test_that("Check FACTOR_LEVELS dataset", { res.class <- ds.class(x='D') expect_length(res.class, 3) @@ -259,7 +260,7 @@ test_that("Check FACTOR_LEVELS dataset", { # Tear down # -context("FACTOR_LEVELS::datachk::shutdown") +# context("FACTOR_LEVELS::datachk::shutdown") test_that("shutdown", { ds_expect_variables(c("D")) @@ -267,4 +268,4 @@ test_that("shutdown", { disconnect.testing.dataset.factor_levels() -context("FACTOR_LEVELS::datachk::done") +# context("FACTOR_LEVELS::datachk::done") diff --git a/tests/testthat/test-datachk-SURVIVAL_EXPAND_WITH_MISSING.R b/tests/testthat/test-datachk-SURVIVAL_EXPAND_WITH_MISSING.R index bc8c12bce..0d28eff58 100644 --- a/tests/testthat/test-datachk-SURVIVAL_EXPAND_WITH_MISSING.R +++ b/tests/testthat/test-datachk-SURVIVAL_EXPAND_WITH_MISSING.R @@ -1,5 +1,6 @@ #------------------------------------------------------------------------------- # Copyright (c) 2019-2022 University of Newcastle upon Tyne. All rights reserved. +# Copyright (c) 2022-2025 Arjuna Technologies, Newcastle upon Tyne. All rights reserved. # # This program and the accompanying materials # are made available under the terms of the GNU Public License v3.0. @@ -12,7 +13,7 @@ # Set up # -context("SURVIVAL_EXPAND_WITH_MISSING::datachk::setup") +# context("SURVIVAL_EXPAND_WITH_MISSING::datachk::setup") connect.studies.dataset.survival(list('id', 'study.id', 'time.id', 'starttime', 'endtime', 'survtime', 'cens', 'age.60', 'female', 'noise.56', 'pm10.16', 'bmi.26')) @@ -24,7 +25,7 @@ test_that("setup", { # Tests # -context("SURVIVAL_EXPAND_WITH_MISSING::datachk") +# context("SURVIVAL_EXPAND_WITH_MISSING::datachk") test_that("Check SURVIVAL_EXPAND_WITH_MISSING dataset", { res.class <- ds.class(x='D') expect_length(res.class, 3) @@ -279,7 +280,7 @@ test_that("Check SURVIVAL_EXPAND_WITH_MISSING dataset", { # Tear down # -context("SURVIVAL_EXPAND_WITH_MISSING::datachk::shutdown") +# context("SURVIVAL_EXPAND_WITH_MISSING::datachk::shutdown") test_that("shutdown", { ds_expect_variables(c("D")) @@ -291,4 +292,4 @@ disconnect.studies.dataset.survival() # Done # -context("SURVIVAL_EXPAND_WITH_MISSING::datachk::done") +# context("SURVIVAL_EXPAND_WITH_MISSING::datachk::done") diff --git a/tests/testthat/test-datachk-TESTING.R b/tests/testthat/test-datachk-TESTING.R index 5cc2332d0..f89d43643 100644 --- a/tests/testthat/test-datachk-TESTING.R +++ b/tests/testthat/test-datachk-TESTING.R @@ -1,5 +1,6 @@ #------------------------------------------------------------------------------- # Copyright (c) 2019-2022 University of Newcastle upon Tyne. All rights reserved. +# Copyright (c) 2022-2025 Arjuna Technologies, Newcastle upon Tyne. All rights reserved. # # This program and the accompanying materials # are made available under the terms of the GNU Public License v3.0. @@ -12,7 +13,7 @@ # Set up # -context("TESTING::datachk::setup") +# context("TESTING::datachk::setup") connect.all.datasets() @@ -24,7 +25,7 @@ test_that("setup", { # Tests # -context("TESTING::datachk") +# context("TESTING::datachk") test_that("Check TESTING dataset", { res.class <- ds.class(x='D') expect_length(res.class, 3) @@ -419,7 +420,7 @@ test_that("Check TESTING dataset", { # Tear down # -context("TESTING::datachk::shutdown") +# context("TESTING::datachk::shutdown") test_that("shutdown", { ds_expect_variables(c("D")) @@ -427,4 +428,4 @@ test_that("shutdown", { disconnect.all.datasets() -context("TESTING::datachk::done") +# context("TESTING::datachk::done") diff --git a/tests/testthat/test-disc-ds.cor.R b/tests/testthat/test-disc-ds.cor.R index eb61ada6f..88da21bbd 100644 --- a/tests/testthat/test-disc-ds.cor.R +++ b/tests/testthat/test-disc-ds.cor.R @@ -1,5 +1,6 @@ #------------------------------------------------------------------------------- # Copyright (c) 2018-2022 University of Newcastle upon Tyne. All rights reserved. +# Copyright (c) 2022-2025 Arjuna Technologies, Newcastle upon Tyne. All rights reserved. # # This program and the accompanying materials # are made available under the terms of the GNU Public License v3.0. @@ -12,7 +13,7 @@ # Set up # -context("ds.cor::disc::setup") +# context("ds.cor::disc::setup") connect.studies.dataset.cnsim(list("LAB_TSC", "LAB_TRIG", "LAB_HDL", "LAB_GLUC_ADJUSTED", "GENDER")) @@ -24,7 +25,7 @@ test_that("setup", { # Tests # -context("ds.cor::disc") +# context("ds.cor::disc") test_that("simple D3 setup", { ds.dataFrameSubset('D',V1.name = 'D$GENDER', V2.name = '0', Boolean.operator = '==', newobj='D1') ds.dataFrameSubset('D1',V1.name = 'D1$LAB_TSC', V2.name = '3.5', Boolean.operator = '<', newobj='D2') @@ -107,7 +108,7 @@ test_that("simple disc test, naAction='pairwise.complete', type='combine'", { # Done # -context("ds.cor::disc::shutdown") +# context("ds.cor::disc::shutdown") test_that("shutdown", { ds_expect_variables(c("D", "D1", "D2", "D3")) @@ -115,4 +116,4 @@ test_that("shutdown", { disconnect.studies.dataset.cnsim() -context("ds.cor::disc::done") +# context("ds.cor::disc::done") diff --git a/tests/testthat/test-disc-ds.cov.R b/tests/testthat/test-disc-ds.cov.R index 751d54bf9..2807a7b1c 100644 --- a/tests/testthat/test-disc-ds.cov.R +++ b/tests/testthat/test-disc-ds.cov.R @@ -1,5 +1,6 @@ #------------------------------------------------------------------------------- # Copyright (c) 2018-2022 University of Newcastle upon Tyne. All rights reserved. +# Copyright (c) 2022-2025 Arjuna Technologies, Newcastle upon Tyne. All rights reserved. # # This program and the accompanying materials # are made available under the terms of the GNU Public License v3.0. @@ -12,7 +13,7 @@ # Set up # -context("ds.cov::disc::setup") +# context("ds.cov::disc::setup") connect.studies.dataset.cnsim(list("LAB_TSC", "LAB_TRIG", "LAB_HDL", "LAB_GLUC_ADJUSTED", "GENDER")) @@ -24,7 +25,7 @@ test_that("setup", { # Tests # -context("ds.cov::disc") +# context("ds.cov::disc") test_that("simple D3 setup", { ds.dataFrameSubset('D',V1.name = 'D$GENDER', V2.name = '0', Boolean.operator = '==', newobj='D1') ds.dataFrameSubset('D1',V1.name = 'D1$LAB_TSC', V2.name = '3.5', Boolean.operator = '<', newobj='D2') @@ -106,7 +107,7 @@ test_that("simple disc test, naAction='pairwise.complete', type='combine'", { # Done # -context("ds.cov::disc::shutdown") +# context("ds.cov::disc::shutdown") test_that("shutdown", { ds_expect_variables(c("D", "D1", "D2", "D3")) @@ -114,4 +115,4 @@ test_that("shutdown", { disconnect.studies.dataset.survival() -context("ds.cov::disc::done") +# context("ds.cov::disc::done") diff --git a/tests/testthat/test-disc-ds.levels.R b/tests/testthat/test-disc-ds.levels.R index 6f00f1198..95d0c60b5 100644 --- a/tests/testthat/test-disc-ds.levels.R +++ b/tests/testthat/test-disc-ds.levels.R @@ -1,5 +1,6 @@ #------------------------------------------------------------------------------- # Copyright (c) 2019-2022 University of Newcastle upon Tyne. All rights reserved. +# Copyright (c) 2022-2025 Arjuna Technologies, Newcastle upon Tyne. All rights reserved. # # This program and the accompanying materials # are made available under the terms of the GNU Public License v3.0. @@ -12,7 +13,7 @@ # Set up # -context("ds.levels::disc::setup") +# context("ds.levels::disc::setup") connect.studies.dataset.cnsim(list("GENDER", "PM_BMI_CATEGORICAL")) @@ -23,7 +24,7 @@ test_that("setup", { # # Tests # -context("ds.levels::disc") +# context("ds.levels::disc") test_that("simple levels", { # res <- ds.levels("D$GENDER") @@ -51,7 +52,7 @@ test_that("simple levels", { # Done # -context("ds.levels::disc::shutdown") +# context("ds.levels::disc::shutdown") test_that("shutdown", { ds_expect_variables(c("D")) @@ -59,4 +60,4 @@ test_that("shutdown", { disconnect.studies.dataset.cnsim() -context("ds.levels::disc::done") +# context("ds.levels::disc::done") diff --git a/tests/testthat/test-disc-ds.mean.R b/tests/testthat/test-disc-ds.mean.R index f1b690c9d..cb8311d79 100644 --- a/tests/testthat/test-disc-ds.mean.R +++ b/tests/testthat/test-disc-ds.mean.R @@ -1,5 +1,6 @@ #------------------------------------------------------------------------------- # Copyright (c) 2018-2022 University of Newcastle upon Tyne. All rights reserved. +# Copyright (c) 2022-2025 Arjuna Technologies, Newcastle upon Tyne. All rights reserved. # # This program and the accompanying materials # are made available under the terms of the GNU Public License v3.0. @@ -18,7 +19,7 @@ connect.studies.dataset.cnsim(list("LAB_TSC", "LAB_TRIG")) # Tests # -context("ds.mean::disc::type=both") +# context("ds.mean::disc::type=both") test_that("mean values [both]", { # myvectors <- c("D$LAB_TSC", "D$LAB_TRIG") # ds.dataFrame(x=myvectors, newobj="unsubset_df") diff --git a/tests/testthat/test-disc-ds.meanByClass.R b/tests/testthat/test-disc-ds.meanByClass.R index 2b6147f8c..b1e7cedb6 100644 --- a/tests/testthat/test-disc-ds.meanByClass.R +++ b/tests/testthat/test-disc-ds.meanByClass.R @@ -1,5 +1,6 @@ #------------------------------------------------------------------------------- # Copyright (c) 2019-2022 University of Newcastle upon Tyne. All rights reserved. +# Copyright (c) 2022-2025 Arjuna Technologies, Newcastle upon Tyne. All rights reserved. # # This program and the accompanying materials # are made available under the terms of the GNU Public License v3.0. @@ -12,7 +13,7 @@ # Set up # -context("ds.meanByClass::disc::setup") +# context("ds.meanByClass::disc::setup") connect.studies.dataset.cnsim(list("LAB_TSC","LAB_HDL","GENDER","DIS_DIAB","PM_BMI_CATEGORICAL")) @@ -20,7 +21,7 @@ connect.studies.dataset.cnsim(list("LAB_TSC","LAB_HDL","GENDER","DIS_DIAB","PM_B # Tests # -context("ds.meanByClass::disc::test errors") +# context("ds.meanByClass::disc::test errors") test_that("meanByClass_erros", { # expect_error(ds.meanByClass(x='D', outvar='LAB_HDL', covar='GENDER', type='split'), 'Failed to get levels from study: FAILED: Result less than nfilter.subset', fixed=TRUE) }) @@ -29,7 +30,7 @@ test_that("meanByClass_erros", { # Tear down # -context("ds.meanByClass::disc::teardown") +# context("ds.meanByClass::disc::teardown") disconnect.studies.dataset.cnsim() @@ -37,4 +38,4 @@ disconnect.studies.dataset.cnsim() # Done # -context("ds.meanByClass::disc::done") +# context("ds.meanByClass::disc::done") diff --git a/tests/testthat/test-disc-ds.sample.R b/tests/testthat/test-disc-ds.sample.R index 08cc01c7f..ce74288a7 100644 --- a/tests/testthat/test-disc-ds.sample.R +++ b/tests/testthat/test-disc-ds.sample.R @@ -1,5 +1,6 @@ #------------------------------------------------------------------------------- # Copyright (c) 2018-2022 University of Newcastle upon Tyne. All rights reserved. +# Copyright (c) 2022-2025 Arjuna Technologies, Newcastle upon Tyne. All rights reserved. # # This program and the accompanying materials # are made available under the terms of the GNU Public License v3.0. @@ -12,7 +13,7 @@ # Set up # -context("ds.sample::disc::setup") +# context("ds.sample::disc::setup") connect.studies.dataset.cnsim(list("LAB_TSC", "LAB_TRIG")) @@ -20,7 +21,7 @@ connect.studies.dataset.cnsim(list("LAB_TSC", "LAB_TRIG")) # Tests # -context("ds.sample::disc::test disclosure") +# context("ds.sample::disc::test disclosure") test_that("cov_erros", { expect_error(ds.sample(x="This_line_is_very_very_very_very_very_very_long", size=1234, newobj="obj1"), "There are some DataSHIELD errors, list them with datashield.errors()", fixed = TRUE) res1.errors <- DSI::datashield.errors() @@ -64,7 +65,7 @@ test_that("cov_erros", { # Shutdown # -context("ds.sample::disc::shutdown") +# context("ds.sample::disc::shutdown") disconnect.studies.dataset.cnsim() @@ -72,4 +73,4 @@ disconnect.studies.dataset.cnsim() # Done # -context("ds.sample::disc::done") +# context("ds.sample::disc::done") diff --git a/tests/testthat/test-disc-ds.table.R b/tests/testthat/test-disc-ds.table.R index f82116940..b51a75f91 100644 --- a/tests/testthat/test-disc-ds.table.R +++ b/tests/testthat/test-disc-ds.table.R @@ -1,5 +1,6 @@ #------------------------------------------------------------------------------- # Copyright (c) 2018-2022 University of Newcastle upon Tyne. All rights reserved. +# Copyright (c) 2022-2025 Arjuna Technologies, Newcastle upon Tyne. All rights reserved. # # This program and the accompanying materials # are made available under the terms of the GNU Public License v3.0. @@ -13,7 +14,7 @@ # Set up - Phase 1 # -context("ds.table::disc::setup::phase 1") +# context("ds.table::disc::setup::phase 1") connect.all.datasets() @@ -25,7 +26,7 @@ test_that("setup", { # Tests - Phase 1 # -context("ds.table::disc::tests::phase 1::table.assign=FALSE") +# context("ds.table::disc::tests::phase 1::table.assign=FALSE") test_that("table disclosure table.assign=FALSE", { ds.asFactor(input.var.name="D$FACTOR_CHARACTER", newobj.name="factorCharacter") ds.asFactor(input.var.name="D$FACTOR_INTEGER", newobj.name="factorInteger") @@ -43,7 +44,7 @@ test_that("table disclosure table.assign=FALSE", { expect_equal(table.res$validity.message[4], "Study3: No errors reported from this study", fixed = TRUE) }) -context("ds.table::disc::tests::phase 1::table.assign=TRUE") +# context("ds.table::disc::tests::phase 1::table.assign=TRUE") test_that("table disclosure table.assign=TRUE", { ds.asFactor(input.var.name="D$FACTOR_CHARACTER", newobj.name="factorCharacter") ds.asFactor(input.var.name="D$FACTOR_INTEGER", newobj.name="factorInteger") @@ -55,7 +56,7 @@ test_that("table disclosure table.assign=TRUE", { expect_length(table.res, 0) }) -context("ds.table::disc::test rvar is big numeric") +# context("ds.table::disc::test rvar is big numeric") test_that("table rvar is big numeric", { expect_error(ds.table(rvar="D$NUMERIC"), "There are some DataSHIELD errors, list them with datashield.errors()", fixed = TRUE) @@ -71,7 +72,7 @@ test_that("table rvar is big numeric", { # Shutdown - Phase 1 # -context("ds.table::disc::shutdown::phase 1") +# context("ds.table::disc::shutdown::phase 1") test_that("setup", { ds_expect_variables(c("D", "factorCharacter", "factorInteger", "tablesource", "new_table2")) @@ -83,7 +84,7 @@ disconnect.all.datasets() # Set up - Phase 2 # -context("ds.table::disc::setup::phase 2") +# context("ds.table::disc::setup::phase 2") connect.studies.dataset.cnsim(list("GENDER", "DIS_AMI")) @@ -95,7 +96,7 @@ test_that("setup", { # Tests - Phase 2 # -context("ds.table::disc::tests::phase 2::table.assign=FALSE") +# context("ds.table::disc::tests::phase 2::table.assign=FALSE") test_that("table disclosure, table.assign=FALSE", { table.res <- ds.table(rvar='D$GENDER', cvar="D$DIS_AMI", table.assign=FALSE, newobj="new_table3") @@ -108,7 +109,7 @@ test_that("table disclosure, table.assign=FALSE", { expect_equal(table.res$error.message$sim3, "Failed: at least one cell has a non-zero count less than nfilter.tab i.e. 3", fixed = TRUE) }) -context("ds.table::disc::tests::phase 2::table.assign=TRUE") +# context("ds.table::disc::tests::phase 2::table.assign=TRUE") test_that("table disclosure, table.assign=TRUE", { table.res <- ds.table(rvar='D$GENDER', cvar="D$DIS_AMI", table.assign=TRUE, newobj="new_table4") @@ -119,7 +120,7 @@ test_that("table disclosure, table.assign=TRUE", { # Shutdown - Phase 2 # -context("ds.table::disc::shutdown::phase 2") +# context("ds.table::disc::shutdown::phase 2") test_that("setup", { ds_expect_variables(c("D", "new_table4")) @@ -131,4 +132,4 @@ disconnect.studies.dataset.cnsim() # Done # -context("ds.table::disc::done") +# context("ds.table::disc::done") diff --git a/tests/testthat/test-disc-ds.var.R b/tests/testthat/test-disc-ds.var.R index 08a445b92..39d6a506b 100644 --- a/tests/testthat/test-disc-ds.var.R +++ b/tests/testthat/test-disc-ds.var.R @@ -1,5 +1,6 @@ #------------------------------------------------------------------------------- # Copyright (c) 2018-2022 University of Newcastle upon Tyne. All rights reserved. +# Copyright (c) 2022-2025 Arjuna Technologies, Newcastle upon Tyne. All rights reserved. # # This program and the accompanying materials # are made available under the terms of the GNU Public License v3.0. @@ -18,7 +19,7 @@ connect.studies.dataset.cnsim(list("LAB_TSC", "LAB_TRIG")) # Tests # -context("ds.var::disc::type=both") +# context("ds.var::disc::type=both") test_that("var values [both]", { # myvectors <- c("D$LAB_TSC", "D$LAB_TRIG") # ds.dataFrame(x=myvectors, newobj="unsubset_df") diff --git a/tests/testthat/test-discctrl-ds.Boole.R b/tests/testthat/test-discctrl-ds.Boole.R index 80a5dc3d2..29591402e 100644 --- a/tests/testthat/test-discctrl-ds.Boole.R +++ b/tests/testthat/test-discctrl-ds.Boole.R @@ -1,6 +1,6 @@ #------------------------------------------------------------------------------- # Copyright (c) 2019-2022 University of Newcastle upon Tyne. All rights reserved. -# Copyright (c) 2022 Arjuna Technologies, Newcastle upon Tyne. All rights reserved. +# Copyright (c) 2022-2025 Arjuna Technologies, Newcastle upon Tyne. All rights reserved. # # This program and the accompanying materials # are made available under the terms of the GNU Public License v3.0. @@ -13,7 +13,7 @@ # Set up # -context("ds.Boole::discctrl::setup") +# context("ds.Boole::discctrl::setup") connect.studies.dataset.cnsim(list("LAB_TSC", "LAB_TRIG")) @@ -24,7 +24,7 @@ test_that("setup", { # # Tests # -context("ds.Boole::discctrl") +# context("ds.Boole::discctrl") test_that("simple rep", { expect_error(ds.Boole("D$LAB_TSC", "D$LAB_TRIG", "=="), "There are some DataSHIELD errors, list them with datashield.errors()", fixed = TRUE) @@ -43,7 +43,7 @@ test_that("simple rep", { # Done # -context("ds.Boole::discctrl::shutdown") +# context("ds.Boole::discctrl::shutdown") test_that("shutdown", { ds_expect_variables(c("D")) @@ -51,4 +51,4 @@ test_that("shutdown", { disconnect.studies.dataset.cnsim() -context("ds.Boole::discctrl::done") +# context("ds.Boole::discctrl::done") diff --git a/tests/testthat/test-discctrl-ds.c.R b/tests/testthat/test-discctrl-ds.c.R index da4a0caa6..e4bfb577e 100644 --- a/tests/testthat/test-discctrl-ds.c.R +++ b/tests/testthat/test-discctrl-ds.c.R @@ -1,5 +1,6 @@ #------------------------------------------------------------------------------- # Copyright (c) 2019-2022 University of Newcastle upon Tyne. All rights reserved. +# Copyright (c) 2022-2025 Arjuna Technologies, Newcastle upon Tyne. All rights reserved. # # This program and the accompanying materials # are made available under the terms of the GNU Public License v3.0. @@ -12,7 +13,7 @@ # Set up # -context("ds.c::discctrl::setup") +# context("ds.c::discctrl::setup") connect.studies.dataset.cnsim(list("GENDER", "PM_BMI_CATEGORICAL")) @@ -23,7 +24,7 @@ test_that("setup", { # # Tests # -context("ds.c::discctrl") +# context("ds.c::discctrl") test_that("simple c", { expect_error(ds.c("D$GENDER"), "There are some DataSHIELD errors, list them with datashield.errors()", fixed = TRUE) @@ -42,7 +43,7 @@ test_that("simple c", { # Done # -context("ds.c::discctrl::shutdown") +# context("ds.c::discctrl::shutdown") test_that("shutdown", { ds_expect_variables(c("D")) @@ -50,4 +51,4 @@ test_that("shutdown", { disconnect.studies.dataset.cnsim() -context("ds.c::discctrl::done") +# context("ds.c::discctrl::done") diff --git a/tests/testthat/test-discctrl-ds.cbind.R b/tests/testthat/test-discctrl-ds.cbind.R index a829185e6..b1b3b79c2 100644 --- a/tests/testthat/test-discctrl-ds.cbind.R +++ b/tests/testthat/test-discctrl-ds.cbind.R @@ -1,5 +1,6 @@ #------------------------------------------------------------------------------- # Copyright (c) 2019-2022 University of Newcastle upon Tyne. All rights reserved. +# Copyright (c) 2022-2025 Arjuna Technologies, Newcastle upon Tyne. All rights reserved. # # This program and the accompanying materials # are made available under the terms of the GNU Public License v3.0. @@ -12,7 +13,7 @@ # Set up # -context("ds.cbind::discctrl::setup") +# context("ds.cbind::discctrl::setup") connect.studies.dataset.cnsim(list("GENDER", "PM_BMI_CATEGORICAL")) @@ -23,7 +24,7 @@ test_that("setup", { # # Tests # -context("ds.cbind::discctrl") +# context("ds.cbind::discctrl") test_that("simple c", { expect_error(ds.cbind(x="D", DataSHIELD.checks=TRUE, datasources = ds.test_env$connections[1]), "There are some DataSHIELD errors, list them with datashield.errors()", fixed = TRUE) @@ -38,7 +39,7 @@ test_that("simple c", { # Done # -context("ds.cbind::discctrl::shutdown") +# context("ds.cbind::discctrl::shutdown") test_that("shutdown", { ds_expect_variables(c("D")) @@ -46,4 +47,4 @@ test_that("shutdown", { disconnect.studies.dataset.cnsim() -context("ds.cbind::discctrl::done") +# context("ds.cbind::discctrl::done") diff --git a/tests/testthat/test-discctrl-ds.dataFrame.R b/tests/testthat/test-discctrl-ds.dataFrame.R index fe153c0e0..fedde1566 100644 --- a/tests/testthat/test-discctrl-ds.dataFrame.R +++ b/tests/testthat/test-discctrl-ds.dataFrame.R @@ -1,5 +1,6 @@ #------------------------------------------------------------------------------- # Copyright (c) 2019-2022 University of Newcastle upon Tyne. All rights reserved. +# Copyright (c) 2022-2025 Arjuna Technologies, Newcastle upon Tyne. All rights reserved. # # This program and the accompanying materials # are made available under the terms of the GNU Public License v3.0. @@ -12,7 +13,7 @@ # Set up # -context("ds.dataFrame::discctrl::setup") +# context("ds.dataFrame::discctrl::setup") connect.studies.dataset.cnsim(list("GENDER", "PM_BMI_CATEGORICAL")) @@ -23,7 +24,7 @@ test_that("setup", { # # Tests # -context("ds.dataFrame::discctrl") +# context("ds.dataFrame::discctrl") test_that("simple c", { ds.assign('D$LAB_TSC', 'LAB_TSC') ds.assign('D$LAB_HDL', 'LAB_HDL') @@ -42,7 +43,7 @@ test_that("simple c", { # Done # -context("ds.dataFrame::discctrl::shutdown") +# context("ds.dataFrame::discctrl::shutdown") test_that("shutdown", { ds_expect_variables(c("D", "LAB_TSC", "LAB_HDL")) @@ -50,4 +51,4 @@ test_that("shutdown", { disconnect.studies.dataset.cnsim() -context("ds.dataFrame::discctrl::done") +# context("ds.dataFrame::discctrl::done") diff --git a/tests/testthat/test-discctrl-ds.dataFrameSort.R b/tests/testthat/test-discctrl-ds.dataFrameSort.R index 027c5d8ec..e85a55bd2 100644 --- a/tests/testthat/test-discctrl-ds.dataFrameSort.R +++ b/tests/testthat/test-discctrl-ds.dataFrameSort.R @@ -1,5 +1,6 @@ #------------------------------------------------------------------------------- # Copyright (c) 2019-2022 University of Newcastle upon Tyne. All rights reserved. +# Copyright (c) 2022-2025 Arjuna Technologies, Newcastle upon Tyne. All rights reserved. # # This program and the accompanying materials # are made available under the terms of the GNU Public License v3.0. @@ -12,7 +13,7 @@ # Set up # -context("ds.dataFrameSort::discctrl::setup") +# context("ds.dataFrameSort::discctrl::setup") connect.studies.dataset.cnsim(list("GENDER", "PM_BMI_CATEGORICAL")) @@ -23,7 +24,7 @@ test_that("setup", { # # Tests # -context("ds.dataFrameSort::discctrl") +# context("ds.dataFrameSort::discctrl") test_that("simple c", { expect_error(ds.dataFrameSort(df.name="D", sort.key.name="PM_BMI_CATEGORICAL", newobj="sorted_df"), "There are some DataSHIELD errors, list them with datashield.errors()", fixed = TRUE) @@ -42,7 +43,7 @@ test_that("simple c", { # Done # -context("ds.dataFrameSort::discctrl::shutdown") +# context("ds.dataFrameSort::discctrl::shutdown") test_that("shutdown", { ds_expect_variables(c("D")) @@ -50,4 +51,4 @@ test_that("shutdown", { disconnect.studies.dataset.cnsim() -context("ds.dataFrameSort::discctrl::done") +# context("ds.dataFrameSort::discctrl::done") diff --git a/tests/testthat/test-discctrl-ds.dataFrameSubset.R b/tests/testthat/test-discctrl-ds.dataFrameSubset.R index c43d0c800..155313cba 100644 --- a/tests/testthat/test-discctrl-ds.dataFrameSubset.R +++ b/tests/testthat/test-discctrl-ds.dataFrameSubset.R @@ -1,5 +1,6 @@ #------------------------------------------------------------------------------- # Copyright (c) 2019-2022 University of Newcastle upon Tyne. All rights reserved. +# Copyright (c) 2022-2025 Arjuna Technologies, Newcastle upon Tyne. All rights reserved. # # This program and the accompanying materials # are made available under the terms of the GNU Public License v3.0. @@ -12,7 +13,7 @@ # Set up # -context("ds.dataFrameSubset::discctrl::setup") +# context("ds.dataFrameSubset::discctrl::setup") connect.studies.dataset.cnsim(list("GENDER", "PM_BMI_CATEGORICAL")) @@ -23,7 +24,7 @@ test_that("setup", { # # Tests # -context("ds.dataFrameSubset::discctrl") +# context("ds.dataFrameSubset::discctrl") test_that("simple c", { expect_error(ds.dataFrameSubset(df.name="D", V1.name="D$LAB_TSC", V2.name="D$LAB_HDL", Boolean.operator="!=", newobj="subset_df"), "There are some DataSHIELD errors, list them with datashield.errors()", fixed = TRUE) @@ -42,7 +43,7 @@ test_that("simple c", { # Done # -context("ds.dataFrameSubset::discctrl::shutdown") +# context("ds.dataFrameSubset::discctrl::shutdown") test_that("shutdown", { ds_expect_variables(c("D")) @@ -50,4 +51,4 @@ test_that("shutdown", { disconnect.studies.dataset.cnsim() -context("ds.dataFrameSubset::discctrl::done") +# context("ds.dataFrameSubset::discctrl::done") diff --git a/tests/testthat/test-discctrl-ds.dmtC2S.R b/tests/testthat/test-discctrl-ds.dmtC2S.R index fb2099a72..95af08e9c 100644 --- a/tests/testthat/test-discctrl-ds.dmtC2S.R +++ b/tests/testthat/test-discctrl-ds.dmtC2S.R @@ -1,5 +1,6 @@ #------------------------------------------------------------------------------- # Copyright (c) 2019-2022 University of Newcastle upon Tyne. All rights reserved. +# Copyright (c) 2022-2025 Arjuna Technologies, Newcastle upon Tyne. All rights reserved. # # This program and the accompanying materials # are made available under the terms of the GNU Public License v3.0. @@ -12,7 +13,7 @@ # Set up # -context("ds.dmtC2S::discctrl::setup") +# context("ds.dmtC2S::discctrl::setup") connect.studies.dataset.cnsim(list("GENDER", "PM_BMI_CATEGORICAL")) @@ -23,7 +24,7 @@ test_that("setup", { # # Tests # -context("ds.dmtC2S::discctrl") +# context("ds.dmtC2S::discctrl") test_that("simple dmtC2S", { a <- data.frame(c(1, 2)) b <- data.frame(c(2, 3)) @@ -46,7 +47,7 @@ test_that("simple dmtC2S", { # Done # -context("ds.dmtC2S::discctrl::shutdown") +# context("ds.dmtC2S::discctrl::shutdown") test_that("shutdown", { ds_expect_variables(c("D")) @@ -54,4 +55,4 @@ test_that("shutdown", { disconnect.studies.dataset.cnsim() -context("ds.dmtC2S::discctrl::done") +# context("ds.dmtC2S::discctrl::done") diff --git a/tests/testthat/test-discctrl-ds.levels.R b/tests/testthat/test-discctrl-ds.levels.R index 05325f543..5690859f5 100644 --- a/tests/testthat/test-discctrl-ds.levels.R +++ b/tests/testthat/test-discctrl-ds.levels.R @@ -1,5 +1,6 @@ #------------------------------------------------------------------------------- # Copyright (c) 2019-2022 University of Newcastle upon Tyne. All rights reserved. +# Copyright (c) 2022-2025 Arjuna Technologies, Newcastle upon Tyne. All rights reserved. # # This program and the accompanying materials # are made available under the terms of the GNU Public License v3.0. @@ -12,7 +13,7 @@ # Set up # -context("ds.levels::discctrl::setup") +# context("ds.levels::discctrl::setup") connect.studies.dataset.cnsim(list("GENDER", "PM_BMI_CATEGORICAL")) @@ -23,7 +24,7 @@ test_that("setup", { # # Tests # -context("ds.levels::discctrl") +# context("ds.levels::discctrl") test_that("simple levels", { expect_error(ds.levels("D$GENDER"), "There are some DataSHIELD errors, list them with datashield.errors()", fixed = TRUE) @@ -42,7 +43,7 @@ test_that("simple levels", { # Done # -context("ds.levels::discctrl::shutdown") +# context("ds.levels::discctrl::shutdown") test_that("shutdown", { ds_expect_variables(c("D")) @@ -50,4 +51,4 @@ test_that("shutdown", { disconnect.studies.dataset.cnsim() -context("ds.levels::discctrl::done") +# context("ds.levels::discctrl::done") diff --git a/tests/testthat/test-discctrl-ds.ns.R b/tests/testthat/test-discctrl-ds.ns.R index c7c4a43df..8f57c17d2 100644 --- a/tests/testthat/test-discctrl-ds.ns.R +++ b/tests/testthat/test-discctrl-ds.ns.R @@ -1,6 +1,6 @@ #------------------------------------------------------------------------------- # Copyright (c) 2019-2022 University of Newcastle upon Tyne. All rights reserved. -# Copyright (c) 2022 Arjuna Technologies, Newcastle upon Tyne. All rights reserved. +# Copyright (c) 2022-2025 Arjuna Technologies, Newcastle upon Tyne. All rights reserved. # # This program and the accompanying materials # are made available under the terms of the GNU Public License v3.0. @@ -13,7 +13,7 @@ # Set up # -context("ds.ns::discctrl::setup") +# context("ds.ns::discctrl::setup") connect.studies.dataset.cnsim(list("LAB_TRIG", "PM_BMI_CONTINUOUS")) @@ -24,7 +24,7 @@ test_that("setup", { # # Tests # -context("ds.ns::discctrl") +# context("ds.ns::discctrl") test_that("ns", { expect_error(ds.ns(x="D$PM_BMI_CONTINUOUS", knots=c(8,9,10,12,25,35), newobj="nsDS", datasources=ds.test_env$connections), "There are some DataSHIELD errors, list them with datashield.errors()", fixed = TRUE) @@ -43,7 +43,7 @@ test_that("ns", { # Done # -context("ds.ns::discctrl::shutdown") +# context("ds.ns::discctrl::shutdown") test_that("shutdown", { ds_expect_variables(c("D")) @@ -51,4 +51,4 @@ test_that("shutdown", { disconnect.studies.dataset.cnsim() -context("ds.ns::discctrl::done") +# context("ds.ns::discctrl::done") diff --git a/tests/testthat/test-discctrl-ds.rBinom.R b/tests/testthat/test-discctrl-ds.rBinom.R index 19e2318ac..f8bc70d77 100644 --- a/tests/testthat/test-discctrl-ds.rBinom.R +++ b/tests/testthat/test-discctrl-ds.rBinom.R @@ -1,6 +1,6 @@ #------------------------------------------------------------------------------- # Copyright (c) 2019-2022 University of Newcastle upon Tyne. All rights reserved. -# Copyright (c) 2022 Arjuna Technologies, Newcastle upon Tyne. All rights reserved. +# Copyright (c) 2022-2025 Arjuna Technologies, Newcastle upon Tyne. All rights reserved. # # This program and the accompanying materials # are made available under the terms of the GNU Public License v3.0. @@ -13,7 +13,7 @@ # Set up # -context("ds.rBinom::discctrl::setup") +# context("ds.rBinom::discctrl::setup") connect.studies.dataset.cnsim(list("LAB_TSC")) @@ -24,7 +24,7 @@ test_that("setup", { # # Tests # -context("ds.rBinom::discctrl") +# context("ds.rBinom::discctrl") test_that("simple c", { expect_error(ds.rBinom(samp.size = 50, size = 50, prob = 0.25, newobj = "binom_dist", seed.as.integer = 27), "There are some DataSHIELD errors, list them with datashield.errors()", fixed = TRUE) @@ -39,7 +39,7 @@ test_that("simple c", { # Done # -context("ds.rBinom::discctrl::shutdown") +# context("ds.rBinom::discctrl::shutdown") test_that("shutdown", { ds_expect_variables(c("D")) @@ -47,4 +47,4 @@ test_that("shutdown", { disconnect.studies.dataset.cnsim() -context("ds.rBinom::discctrl::done") +# context("ds.rBinom::discctrl::done") diff --git a/tests/testthat/test-discctrl-ds.rNorm.R b/tests/testthat/test-discctrl-ds.rNorm.R index 997e3fadb..153d84e03 100644 --- a/tests/testthat/test-discctrl-ds.rNorm.R +++ b/tests/testthat/test-discctrl-ds.rNorm.R @@ -1,6 +1,6 @@ #------------------------------------------------------------------------------- # Copyright (c) 2019-2022 University of Newcastle upon Tyne. All rights reserved. -# Copyright (c) 2022 Arjuna Technologies, Newcastle upon Tyne. All rights reserved. +# Copyright (c) 2022-2025 Arjuna Technologies, Newcastle upon Tyne. All rights reserved. # # This program and the accompanying materials # are made available under the terms of the GNU Public License v3.0. @@ -13,7 +13,7 @@ # Set up # -context("ds.rNorm::discctrl::setup") +# context("ds.rNorm::discctrl::setup") connect.studies.dataset.cnsim(list("GENDER", "PM_BMI_CATEGORICAL")) @@ -24,7 +24,7 @@ test_that("setup", { # # Tests # -context("ds.rNorm::discctrl") +# context("ds.rNorm::discctrl") test_that("simple c", { expect_error(ds.rNorm(samp.size = 50, mean = 10, sd = 5, newobj = "norm_dist", seed.as.integer = 27), "There are some DataSHIELD errors, list them with datashield.errors()", fixed = TRUE) @@ -39,7 +39,7 @@ test_that("simple c", { # Done # -context("ds.rNorm::discctrl::shutdown") +# context("ds.rNorm::discctrl::shutdown") test_that("shutdown", { ds_expect_variables(c("D")) @@ -47,4 +47,4 @@ test_that("shutdown", { disconnect.studies.dataset.cnsim() -context("ds.rNorm::discctrl::done") +# context("ds.rNorm::discctrl::done") diff --git a/tests/testthat/test-discctrl-ds.rPois.R b/tests/testthat/test-discctrl-ds.rPois.R index 58b0667a0..b0176cedc 100644 --- a/tests/testthat/test-discctrl-ds.rPois.R +++ b/tests/testthat/test-discctrl-ds.rPois.R @@ -1,6 +1,6 @@ #------------------------------------------------------------------------------- # Copyright (c) 2019-2022 University of Newcastle upon Tyne. All rights reserved. -# Copyright (c) 2022 Arjuna Technologies, Newcastle upon Tyne. All rights reserved. +# Copyright (c) 2022-2025 Arjuna Technologies, Newcastle upon Tyne. All rights reserved. # # This program and the accompanying materials # are made available under the terms of the GNU Public License v3.0. @@ -13,7 +13,7 @@ # Set up # -context("ds.rPois::discctrl::setup") +# context("ds.rPois::discctrl::setup") connect.studies.dataset.cnsim(list("GENDER", "PM_BMI_CATEGORICAL")) @@ -24,7 +24,7 @@ test_that("setup", { # # Tests # -context("ds.rPois::discctrl") +# context("ds.rPois::discctrl") test_that("simple c", { expect_error(ds.rPois(samp.size = 50, lambda = 1, newobj = "pois_dist", seed.as.integer = 27), "There are some DataSHIELD errors, list them with datashield.errors()", fixed = TRUE) @@ -39,7 +39,7 @@ test_that("simple c", { # Done # -context("ds.rPois::discctrl::shutdown") +# context("ds.rPois::discctrl::shutdown") test_that("shutdown", { ds_expect_variables(c("D")) @@ -47,4 +47,4 @@ test_that("shutdown", { disconnect.studies.dataset.cnsim() -context("ds.rPois::discctrl::done") +# context("ds.rPois::discctrl::done") diff --git a/tests/testthat/test-discctrl-ds.rUnif.R b/tests/testthat/test-discctrl-ds.rUnif.R index f2fd5e476..7327f366f 100644 --- a/tests/testthat/test-discctrl-ds.rUnif.R +++ b/tests/testthat/test-discctrl-ds.rUnif.R @@ -1,6 +1,6 @@ #------------------------------------------------------------------------------- # Copyright (c) 2019-2022 University of Newcastle upon Tyne. All rights reserved. -# Copyright (c) 2022 Arjuna Technologies, Newcastle upon Tyne. All rights reserved. +# Copyright (c) 2022-2025 Arjuna Technologies, Newcastle upon Tyne. All rights reserved. # # This program and the accompanying materials # are made available under the terms of the GNU Public License v3.0. @@ -13,7 +13,7 @@ # Set up # -context("ds.rUnif::discctrl::setup") +# context("ds.rUnif::discctrl::setup") connect.studies.dataset.cnsim(list("GENDER", "PM_BMI_CATEGORICAL")) @@ -24,7 +24,7 @@ test_that("setup", { # # Tests # -context("ds.rUnif::discctrl") +# context("ds.rUnif::discctrl") test_that("simple c", { expect_error(ds.rUnif(samp.size = 50, min = 0, max = 1, newobj = "unif_dist", seed.as.integer = 27), "There are some DataSHIELD errors, list them with datashield.errors()", fixed = TRUE) @@ -39,7 +39,7 @@ test_that("simple c", { # Done # -context("ds.rUnif::discctrl::shutdown") +# context("ds.rUnif::discctrl::shutdown") test_that("shutdown", { ds_expect_variables(c("D")) @@ -47,4 +47,4 @@ test_that("shutdown", { disconnect.studies.dataset.cnsim() -context("ds.rUnif::discctrl::done") +# context("ds.rUnif::discctrl::done") diff --git a/tests/testthat/test-discctrl-ds.rbind.R b/tests/testthat/test-discctrl-ds.rbind.R index 28d3c0306..b80362070 100644 --- a/tests/testthat/test-discctrl-ds.rbind.R +++ b/tests/testthat/test-discctrl-ds.rbind.R @@ -1,5 +1,6 @@ #------------------------------------------------------------------------------- # Copyright (c) 2019-2022 University of Newcastle upon Tyne. All rights reserved. +# Copyright (c) 2022-2025 Arjuna Technologies, Newcastle upon Tyne. All rights reserved. # # This program and the accompanying materials # are made available under the terms of the GNU Public License v3.0. @@ -12,7 +13,7 @@ # Set up # -context("ds.rbind::discctrl::setup") +# context("ds.rbind::discctrl::setup") connect.studies.dataset.survival(list("survtime", "time.id", "female", "age.60")) @@ -23,7 +24,7 @@ test_that("setup", { # # Tests # -context("ds.rbind::discctrl") +# context("ds.rbind::discctrl") test_that("simple c", { expect_error(ds.rbind(c("D$survtime", "D$time.id", "D$female", "D$age.60"), newobj="rbind_newobj"), "There are some DataSHIELD errors, list them with datashield.errors()", fixed = TRUE) @@ -42,7 +43,7 @@ test_that("simple c", { # Done # -context("ds.rbind::discctrl::shutdown") +# context("ds.rbind::discctrl::shutdown") test_that("shutdown", { ds_expect_variables(c("D")) @@ -50,4 +51,4 @@ test_that("shutdown", { disconnect.studies.dataset.survival() -context("ds.rbind::discctrl::done") +# context("ds.rbind::discctrl::done") diff --git a/tests/testthat/test-discctrl-ds.reShape.R b/tests/testthat/test-discctrl-ds.reShape.R index 65f68eb6d..ec759b697 100644 --- a/tests/testthat/test-discctrl-ds.reShape.R +++ b/tests/testthat/test-discctrl-ds.reShape.R @@ -1,5 +1,6 @@ #------------------------------------------------------------------------------- # Copyright (c) 2019-2022 University of Newcastle upon Tyne. All rights reserved. +# Copyright (c) 2022-2025 Arjuna Technologies, Newcastle upon Tyne. All rights reserved. # # This program and the accompanying materials # are made available under the terms of the GNU Public License v3.0. @@ -12,7 +13,7 @@ # Set up # -context("ds.reShape::discctrl::setup") +# context("ds.reShape::discctrl::setup") connect.studies.dataset.survival(list("id", "study.id", "time.id", "cens", "age.60", "female")) @@ -23,7 +24,7 @@ test_that("setup", { # # Tests # -context("ds.reShape::discctrl") +# context("ds.reShape::discctrl") test_that("simple reShape", { expect_error(ds.reShape(data.name="D", v.names="age.60", timevar.name="time.id", idvar.name="id", direction="wide", newobj="reshape1_obj"), "There are some DataSHIELD errors, list them with datashield.errors()", fixed = TRUE) @@ -42,7 +43,7 @@ test_that("simple reShape", { # Done # -context("ds.reShape::discctrl::shutdown") +# context("ds.reShape::discctrl::shutdown") test_that("shutdown", { ds_expect_variables(c("D")) @@ -50,4 +51,4 @@ test_that("shutdown", { disconnect.studies.dataset.survival() -context("ds.reShape::discctrl::done") +# context("ds.reShape::discctrl::done") diff --git a/tests/testthat/test-discctrl-ds.recodeLevels.R b/tests/testthat/test-discctrl-ds.recodeLevels.R index 9f4ab0ca9..39551aa15 100644 --- a/tests/testthat/test-discctrl-ds.recodeLevels.R +++ b/tests/testthat/test-discctrl-ds.recodeLevels.R @@ -1,5 +1,6 @@ #------------------------------------------------------------------------------- # Copyright (c) 2019-2022 University of Newcastle upon Tyne. All rights reserved. +# Copyright (c) 2022-2025 Arjuna Technologies, Newcastle upon Tyne. All rights reserved. # # This program and the accompanying materials # are made available under the terms of the GNU Public License v3.0. @@ -12,7 +13,7 @@ # Set up # -context("ds.recodeLevels::discctrl::setup") +# context("ds.recodeLevels::discctrl::setup") connect.studies.dataset.cnsim(list("PM_BMI_CATEGORICAL")) @@ -23,7 +24,7 @@ test_that("setup", { # # Tests # -context("ds.recodeLevels::discctrl") +# context("ds.recodeLevels::discctrl") test_that("simple recodeLevels", { expect_error(expect_warning(ds.recodeLevels(x='D$PM_BMI_CATEGORICAL', newCategories=c('normal', 'overweight', 'obesity'), newobj='bmi_new'), "", fixed = TRUE), "There are some DataSHIELD errors, list them with datashield.errors()", fixed = TRUE) @@ -42,7 +43,7 @@ test_that("simple recodeLevels", { # Done # -context("ds.recodeLevels::discctrl::shutdown") +# context("ds.recodeLevels::discctrl::shutdown") test_that("shutdown", { ds_expect_variables(c("D")) @@ -50,4 +51,4 @@ test_that("shutdown", { disconnect.studies.dataset.cnsim() -context("ds.recodeLevels::discctrl::done") +# context("ds.recodeLevels::discctrl::done") diff --git a/tests/testthat/test-discctrl-ds.recodeValues.R b/tests/testthat/test-discctrl-ds.recodeValues.R index 71580510c..1bd6aa93e 100644 --- a/tests/testthat/test-discctrl-ds.recodeValues.R +++ b/tests/testthat/test-discctrl-ds.recodeValues.R @@ -1,5 +1,6 @@ #------------------------------------------------------------------------------- # Copyright (c) 2019-2022 University of Newcastle upon Tyne. All rights reserved. +# Copyright (c) 2022-2025 Arjuna Technologies, Newcastle upon Tyne. All rights reserved. # # This program and the accompanying materials # are made available under the terms of the GNU Public License v3.0. @@ -12,7 +13,7 @@ # Set up # -context("ds.rep::discctrl::setup") +# context("ds.rep::discctrl::setup") connect.studies.dataset.survival(list("survtime", "time.id", "female", "age.60")) @@ -23,7 +24,7 @@ test_that("setup", { # # Tests # -context("ds.rep::discctrl") +# context("ds.rep::discctrl") test_that("simple recodeValues", { expect_error(ds.recodeValues("D$survtime", values2replace.vector=c(0,1), new.values.vector=c(-10,10), newobj="recodevalues_newobj"), "There are some DataSHIELD errors, list them with datashield.errors()", fixed = TRUE) @@ -42,7 +43,7 @@ test_that("simple recodeValues", { # Done # -context("ds.rep::discctrl::shutdown") +# context("ds.rep::discctrl::shutdown") test_that("shutdown", { ds_expect_variables(c("D")) @@ -50,4 +51,4 @@ test_that("shutdown", { disconnect.studies.dataset.survival() -context("ds.rep::discctrl::done") +# context("ds.rep::discctrl::done") diff --git a/tests/testthat/test-discctrl-ds.rep.R b/tests/testthat/test-discctrl-ds.rep.R index feeb56c97..4828cc8ef 100644 --- a/tests/testthat/test-discctrl-ds.rep.R +++ b/tests/testthat/test-discctrl-ds.rep.R @@ -1,5 +1,6 @@ #------------------------------------------------------------------------------- # Copyright (c) 2019-2022 University of Newcastle upon Tyne. All rights reserved. +# Copyright (c) 2022-2025 Arjuna Technologies, Newcastle upon Tyne. All rights reserved. # # This program and the accompanying materials # are made available under the terms of the GNU Public License v3.0. @@ -12,7 +13,7 @@ # Set up # -context("ds.rep::discctrl::setup") +# context("ds.rep::discctrl::setup") connect.studies.dataset.survival(list("survtime", "time.id", "female", "age.60")) @@ -23,7 +24,7 @@ test_that("setup", { # # Tests # -context("ds.rep::discctrl") +# context("ds.rep::discctrl") test_that("simple rep", { expect_error(ds.rep("D$survtime"), "There are some DataSHIELD errors, list them with datashield.errors()", fixed = TRUE) @@ -42,7 +43,7 @@ test_that("simple rep", { # Done # -context("ds.rep::discctrl::shutdown") +# context("ds.rep::discctrl::shutdown") test_that("shutdown", { ds_expect_variables(c("D")) @@ -50,4 +51,4 @@ test_that("shutdown", { disconnect.studies.dataset.survival() -context("ds.rep::discctrl::done") +# context("ds.rep::discctrl::done") diff --git a/tests/testthat/test-discctrl-ds.sample.R b/tests/testthat/test-discctrl-ds.sample.R index 0991669ff..863112a49 100644 --- a/tests/testthat/test-discctrl-ds.sample.R +++ b/tests/testthat/test-discctrl-ds.sample.R @@ -1,6 +1,6 @@ #------------------------------------------------------------------------------- # Copyright (c) 2019-2022 University of Newcastle upon Tyne. All rights reserved. -# Copyright (c) 2022 Arjuna Technologies, Newcastle upon Tyne. All rights reserved. +# Copyright (c) 2022-2025 Arjuna Technologies, Newcastle upon Tyne. All rights reserved. # # This program and the accompanying materials # are made available under the terms of the GNU Public License v3.0. @@ -13,7 +13,7 @@ # Set up # -context("ds.sample::discctrl::setup") +# context("ds.sample::discctrl::setup") connect.studies.dataset.cnsim(list("GENDER", "PM_BMI_CATEGORICAL")) @@ -24,7 +24,7 @@ test_that("setup", { # # Tests # -context("ds.sample::discctrl") +# context("ds.sample::discctrl") test_that("simple c", { expect_error(ds.sample(x="D", size=20, seed.as.integer=27), "There are some DataSHIELD errors, list them with datashield.errors()", fixed = TRUE) @@ -39,7 +39,7 @@ test_that("simple c", { # Done # -context("ds.sample::discctrl::shutdown") +# context("ds.sample::discctrl::shutdown") test_that("shutdown", { ds_expect_variables(c("D")) @@ -47,4 +47,4 @@ test_that("shutdown", { disconnect.studies.dataset.cnsim() -context("ds.sample::discctrl::done") +# context("ds.sample::discctrl::done") diff --git a/tests/testthat/test-discctrl-ds.seq.R b/tests/testthat/test-discctrl-ds.seq.R index 5045b06ae..a74ba73a7 100644 --- a/tests/testthat/test-discctrl-ds.seq.R +++ b/tests/testthat/test-discctrl-ds.seq.R @@ -1,5 +1,6 @@ #------------------------------------------------------------------------------- # Copyright (c) 2019-2022 University of Newcastle upon Tyne. All rights reserved. +# Copyright (c) 2022-2025 Arjuna Technologies, Newcastle upon Tyne. All rights reserved. # # This program and the accompanying materials # are made available under the terms of the GNU Public License v3.0. @@ -12,7 +13,7 @@ # Set up # -context("ds.seq::discctrl::setup") +# context("ds.seq::discctrl::setup") connect.studies.dataset.survival(list("survtime", "time.id", "female", "age.60")) @@ -23,7 +24,7 @@ test_that("setup", { # # Tests # -context("ds.seq::discctrl") +# context("ds.seq::discctrl") test_that("simple rep", { expect_error(ds.seq(FROM.value.char="1", BY.value.char="1", LENGTH.OUT.value.char="10", ALONG.WITH.name=NULL, newobj="obj1"), "There are some DataSHIELD errors, list them with datashield.errors()", fixed = TRUE) @@ -42,7 +43,7 @@ test_that("simple rep", { # Done # -context("ds.seq::discctrl::shutdown") +# context("ds.seq::discctrl::shutdown") test_that("shutdown", { ds_expect_variables(c("D")) @@ -50,4 +51,4 @@ test_that("shutdown", { disconnect.studies.dataset.survival() -context("ds.seq::discctrl::done") +# context("ds.seq::discctrl::done") diff --git a/tests/testthat/test-discctrl-ds.setSeed.R b/tests/testthat/test-discctrl-ds.setSeed.R index 351859c29..f32371b6b 100644 --- a/tests/testthat/test-discctrl-ds.setSeed.R +++ b/tests/testthat/test-discctrl-ds.setSeed.R @@ -1,6 +1,6 @@ #------------------------------------------------------------------------------- # Copyright (c) 2019-2022 University of Newcastle upon Tyne. All rights reserved. -# Copyright (c) 2022 Arjuna Technologies, Newcastle upon Tyne. All rights reserved. +# Copyright (c) 2022-2025 Arjuna Technologies, Newcastle upon Tyne. All rights reserved. # # This program and the accompanying materials # are made available under the terms of the GNU Public License v3.0. @@ -13,7 +13,7 @@ # Set up # -context("ds.setSeed::discctrl::setup") +# context("ds.setSeed::discctrl::setup") connect.studies.dataset.cnsim(list("GENDER", "PM_BMI_CATEGORICAL")) @@ -24,7 +24,7 @@ test_that("setup", { # # Tests # -context("ds.setSeed::discctrl") +# context("ds.setSeed::discctrl") test_that("simple c", { expect_error(ds.setSeed(4321), "There are some DataSHIELD errors, list them with datashield.errors()", fixed = TRUE) @@ -43,7 +43,7 @@ test_that("simple c", { # Done # -context("ds.setSeed::discctrl::shutdown") +# context("ds.setSeed::discctrl::shutdown") test_that("shutdown", { ds_expect_variables(c("D")) @@ -51,4 +51,4 @@ test_that("shutdown", { disconnect.studies.dataset.cnsim() -context("ds.setSeed::discctrl::done") +# context("ds.setSeed::discctrl::done") diff --git a/tests/testthat/test-discctrl-ds.subset.R b/tests/testthat/test-discctrl-ds.subset.R new file mode 100644 index 000000000..6da2146d5 --- /dev/null +++ b/tests/testthat/test-discctrl-ds.subset.R @@ -0,0 +1,50 @@ +#------------------------------------------------------------------------------- +# Copyright (c) 2019-2022 University of Newcastle upon Tyne. All rights reserved. +# Copyright (c) 2022-2025 Arjuna Technologies, Newcastle upon Tyne. All rights reserved. +# +# This program and the accompanying materials +# are made available under the terms of the GNU Public License v3.0. +# +# You should have received a copy of the GNU General Public License +# along with this program. If not, see . +#------------------------------------------------------------------------------- + +# +# Set up +# + +# context("ds.subset::discctrl::setup") + +connect.studies.dataset.cnsim(list("DIS_DIAB","PM_BMI_CONTINUOUS","LAB_HDL", "GENDER")) + +test_that("setup", { + ds_expect_variables(c("D")) +}) + +# +# Tests +# +# context("ds.subset::discctrl") +test_that("simple subset", { + expect_error(expect_warning(ds.subset(datasources=ds.test_env$connections, subset='subD', x='D', rows=c(1:50), cols=c(1,2)), "", fixed = TRUE), "There are some DataSHIELD errors, list them with datashield.errors()", fixed = TRUE) + + res_errors <- DSI::datashield.errors() + + expect_length(res_errors, 1) + expect_length(res_errors$sim1, 1) + expect_equal(res_errors$sim1, "Command 'subsetDS(\"D\", FALSE, 1:50, c(1, 2))' failed on 'sim1': Error while evaluating 'is.null(base::assign('subD', value={dsBase::subsetDS(\"D\", FALSE, 1:50, dsBase::vectorDS(1, 2))}))' -> Error in checkPermissivePrivacyControlLevel() : \n BLOCKED: The server is running in 'non-permissive' mode which has caused this method to be blocked\n", fixed = TRUE) +}) + +# +# Done +# + +# context("ds.subset::discctrl::shutdown") + +test_that("shutdown", { + ds_expect_variables(c("D")) +}) + +disconnect.studies.dataset.cnsim() + +# context("ds.subset::discctrl::done") diff --git a/tests/testthat/test-discctrl-ds.subsetByClass.R b/tests/testthat/test-discctrl-ds.subsetByClass.R new file mode 100644 index 000000000..a767cd546 --- /dev/null +++ b/tests/testthat/test-discctrl-ds.subsetByClass.R @@ -0,0 +1,54 @@ +#------------------------------------------------------------------------------- +# Copyright (c) 2019-2022 University of Newcastle upon Tyne. All rights reserved. +# Copyright (c) 2022-2025 Arjuna Technologies, Newcastle upon Tyne. All rights reserved. +# +# This program and the accompanying materials +# are made available under the terms of the GNU Public License v3.0. +# +# You should have received a copy of the GNU General Public License +# along with this program. If not, see . +#------------------------------------------------------------------------------- + +# +# Set up +# + +# context("ds.subsetByClass::discctrl::setup") + +connect.studies.dataset.cnsim(list("LAB_TSC", "GENDER")) + +test_that("setup", { + ds_expect_variables(c("D")) +}) + +# +# Tests +# +# context("ds.subsetByClass::discctrl") +test_that("simple subsetByClass", { + expect_error(expect_warning(ds.subsetByClass(x='D', subsets='subclasses1'), "", fixed = TRUE), "There are some DataSHIELD errors, list them with datashield.errors()", fixed = TRUE) + + res_errors <- DSI::datashield.errors() + + expect_length(res_errors, 3) + expect_length(res_errors$sim1, 1) + expect_equal(res_errors$sim1, "Command 'subsetByClassDS('D')' failed on 'sim1': Error while evaluating 'is.null(base::assign('subclasses1', value={dsBase::subsetByClassDS('D')}))' -> Error in checkPermissivePrivacyControlLevel() : \n BLOCKED: The server is running in 'non-permissive' mode which has caused this method to be blocked\n", fixed = TRUE) + expect_length(res_errors$sim2, 1) + expect_equal(res_errors$sim2, "Command 'subsetByClassDS('D')' failed on 'sim2': Error while evaluating 'is.null(base::assign('subclasses1', value={dsBase::subsetByClassDS('D')}))' -> Error in checkPermissivePrivacyControlLevel() : \n BLOCKED: The server is running in 'non-permissive' mode which has caused this method to be blocked\n", fixed = TRUE) + expect_length(res_errors$sim3, 1) + expect_equal(res_errors$sim3, "Command 'subsetByClassDS('D')' failed on 'sim3': Error while evaluating 'is.null(base::assign('subclasses1', value={dsBase::subsetByClassDS('D')}))' -> Error in checkPermissivePrivacyControlLevel() : \n BLOCKED: The server is running in 'non-permissive' mode which has caused this method to be blocked\n", fixed = TRUE) +}) + +# +# Done +# + +# context("ds.subsetByClass::discctrl::shutdown") + +test_that("shutdown", { + ds_expect_variables(c("D")) +}) + +disconnect.studies.dataset.cnsim() + +# context("ds.subsetByClass::discctrl::done") diff --git a/tests/testthat/test-expt-ds.dataFrame.R b/tests/testthat/test-expt-ds.dataFrame.R index 0ec01ef2b..3660038c8 100644 --- a/tests/testthat/test-expt-ds.dataFrame.R +++ b/tests/testthat/test-expt-ds.dataFrame.R @@ -1,9 +1,20 @@ -context('ds.dataFrame::expt::setup') +#------------------------------------------------------------------------------- +# Copyright (c) 2018-2022 University of Newcastle upon Tyne. All rights reserved. +# Copyright (c) 2022-2025 Arjuna Technologies, Newcastle upon Tyne. All rights reserved. +# +# This program and the accompanying materials +# are made available under the terms of the GNU Public License v3.0. +# +# You should have received a copy of the GNU General Public License +# along with this program. If not, see . +#------------------------------------------------------------------------------- + +# context('ds.dataFrame::expt::setup') source('connection_to_datasets/init_testing_datasets.R') source('definition_tests/def-ds.data.frame.R') -context('ds.dataFrame::expt::one_column::single') +# context('ds.dataFrame::expt::one_column::single') test_that('numeric data', { connect.dataset.2() @@ -17,7 +28,7 @@ test_that('numeric data', .test.data.frame.creation(c('D$NEGATIVE_INTEGER'),'integer_7_df') }) -context('ds.dataFrame::expt::several_columns::single') +# context('ds.dataFrame::expt::several_columns::single') test_that('numeric data', { connect.dataset.2() @@ -25,7 +36,7 @@ test_that('numeric data', .test.data.frame.creation(c('D$INTEGER','D$NON_NEGATIVE_INTEGER','D$POSITIVE_INTEGER','D$NEGATIVE_INTEGER'),'integer_9_df') }) -context('ds.dataFrame::expt::one_column::multiple') +# context('ds.dataFrame::expt::one_column::multiple') test_that('numeric data', { connect.all.datasets() @@ -39,7 +50,7 @@ test_that('numeric data', .test.data.frame.creation(c('D$NEGATIVE_INTEGER'),'integer_16_df') }) -context('ds.dataFrame::expt::several_columns::single') +# context('ds.dataFrame::expt::several_columns::single') test_that('numeric data', { connect.all.datasets() @@ -47,7 +58,7 @@ test_that('numeric data', .test.data.frame.creation(c('D$INTEGER','D$NON_NEGATIVE_INTEGER','D$POSITIVE_INTEGER','D$NEGATIVE_INTEGER'),'integer_17_df') }) -context('ds.dataFrame::expt::one_column_from_objects::single') +# context('ds.dataFrame::expt::one_column_from_objects::single') test_that('numeric data', { connect.dataset.2() @@ -61,7 +72,7 @@ test_that('numeric data', .test.data.frame.from.objects('D$NEGATIVE_INTEGER','numeric_created','numeric_27_df') }) -context('ds.dataFrame::expt::object::multiple') +# context('ds.dataFrame::expt::object::multiple') test_that('numeric data', { connect.all.datasets() @@ -75,14 +86,14 @@ test_that('numeric data', .test.data.frame.from.objects('D$NEGATIVE_INTEGER','numeric_created','numeric_35_df') }) -context('ds.dataFrame::expt::several_objects::multiple') +# context('ds.dataFrame::expt::several_objects::multiple') test_that('several objects', { connect.all.datasets() .test.data.frame.from.different.objects('multiple_df') }) -context('ds.dataFrame::expt::non_numeric::multiple') +# context('ds.dataFrame::expt::non_numeric::multiple') test_that("non_numeric", { connect.all.datasets() @@ -93,7 +104,7 @@ test_that("non_numeric", .test.data.frame.from.objects('D$LOGICAL','boolean_created' ,'boolean_df') }) -context('ds.dataFrame::expt::non_numeric::multiple') +# context('ds.dataFrame::expt::non_numeric::multiple') { connect.dataset.2() .test.data.frame.creation(c('D$CHARACTER'),'character_df') @@ -103,6 +114,6 @@ context('ds.dataFrame::expt::non_numeric::multiple') .test.data.frame.from.objects('D$LOGICAL','boolean_created' ,'boolean_df') } -context('ds.dataFrame::expt::shutdown') +# context('ds.dataFrame::expt::shutdown') -context('ds.dataFrame::expt::done') +# context('ds.dataFrame::expt::done') diff --git a/tests/testthat/test-expt-ds.glmerSLMA.R b/tests/testthat/test-expt-ds.glmerSLMA.R index 0ce25e862..8c6fe40bc 100644 --- a/tests/testthat/test-expt-ds.glmerSLMA.R +++ b/tests/testthat/test-expt-ds.glmerSLMA.R @@ -1,5 +1,6 @@ #------------------------------------------------------------------------------- # Copyright (c) 2019-2022 University of Newcastle upon Tyne. All rights reserved. +# Copyright (c) 2022-2025 Arjuna Technologies, Newcastle upon Tyne. All rights reserved. # # This program and the accompanying materials # are made available under the terms of the GNU Public License v3.0. @@ -12,7 +13,7 @@ # Set up # -context("ds.glmerSLMA::expt::setup") +# context("ds.glmerSLMA::expt::setup") #source("connection_to_datasets/init_all_datasets.R") connect.studies.dataset.cluster.int(list('idChild','idSurgery','trtGrp','s0','nDoctors', 'idDoctor','c0','nPatients','Male','age','BMI', @@ -26,7 +27,7 @@ test_that("setup", { # Tests # -context("ds.glmerSLMA::expt::int::multiple") +# context("ds.glmerSLMA::expt::int::multiple") test_that("linear mixed model with 2 levels of hierarchy", { @@ -76,7 +77,7 @@ test_that("linear mixed model with 2 levels of hierarchy", # Shutdown # -context("ds.lmerSLMA::expt::shutdown") +# context("ds.lmerSLMA::expt::shutdown") disconnect.studies.dataset.cluster.int() @@ -84,4 +85,4 @@ disconnect.studies.dataset.cluster.int() # Done # -context("ds.lmerSLMA::expt::done") +# context("ds.lmerSLMA::expt::done") diff --git a/tests/testthat/test-expt-ds.lmerSLMA.R b/tests/testthat/test-expt-ds.lmerSLMA.R index 271381c6a..703a589dd 100644 --- a/tests/testthat/test-expt-ds.lmerSLMA.R +++ b/tests/testthat/test-expt-ds.lmerSLMA.R @@ -1,5 +1,6 @@ #------------------------------------------------------------------------------- # Copyright (c) 2019-2022 University of Newcastle upon Tyne. All rights reserved. +# Copyright (c) 2022-2025 Arjuna Technologies, Newcastle upon Tyne. All rights reserved. # # This program and the accompanying materials # are made available under the terms of the GNU Public License v3.0. @@ -12,7 +13,7 @@ # Set up # -context("ds.lmerSLMA::expt::setup") +# context("ds.lmerSLMA::expt::setup") #source("connection_to_datasets/init_all_datasets.R") connect.studies.dataset.cluster.int(list('idChild','idSurgery','trtGrp','s0','nDoctors', 'idDoctor','c0','nPatients','Male','age','BMI', @@ -27,7 +28,7 @@ test_that("setup", { # Tests # -context("ds.lmerSLMA::expt::int::multiple") +# context("ds.lmerSLMA::expt::int::multiple") test_that("linear mixed model with 2 levels of hierarchy", { @@ -79,4 +80,4 @@ test_that("linear mixed model with 2 levels of hierarchy", disconnect.studies.dataset.cluster.int() -context("ds.lmerSLMA::expt::done") +# context("ds.lmerSLMA::expt::done") diff --git a/tests/testthat/test-expt-ds.mean.R b/tests/testthat/test-expt-ds.mean.R index 8c6d6b44a..782a4acbe 100644 --- a/tests/testthat/test-expt-ds.mean.R +++ b/tests/testthat/test-expt-ds.mean.R @@ -1,5 +1,6 @@ #------------------------------------------------------------------------------- # Copyright (c) 2019-2022 University of Newcastle upon Tyne. All rights reserved. +# Copyright (c) 2022-2025 Arjuna Technologies, Newcastle upon Tyne. All rights reserved. # # This program and the accompanying materials # are made available under the terms of the GNU Public License v3.0. @@ -14,7 +15,7 @@ source("connection_to_datasets/init_testing_datasets.R") source("definition_tests/def-ds.mean.R") -context("ds.mean::expt::combine::multiple") +# context("ds.mean::expt::combine::multiple") test_that("combined data set", { connect.all.datasets() @@ -29,7 +30,7 @@ test_that("combined data set", .test.mean.combined('D$NEGATIVE_NUMERIC',ds.test_env$local.values[,'NEGATIVE_NUMERIC']) }) -context("ds.mean::expt::split::multiple") +# context("ds.mean::expt::split::multiple") test_that("split data set", { connect.all.datasets() @@ -44,7 +45,7 @@ test_that("split data set", .test.mean.split('D$NEGATIVE_NUMERIC',ds.test_env$local.values.1[,'NEGATIVE_NUMERIC'],ds.test_env$local.values.2[,'NEGATIVE_NUMERIC'],ds.test_env$local.values.3[,'NEGATIVE_NUMERIC']) }) -context("ds.mean::expt::single") +# context("ds.mean::expt::single") test_that("combined data set", { connect.dataset.1() @@ -58,7 +59,7 @@ test_that("combined data set", .test.mean.combined('D$NEGATIVE_NUMERIC',ds.test_env$local.values.1[,'NEGATIVE_NUMERIC']) }) -context("ds.mean::expt::large_values::single") +# context("ds.mean::expt::large_values::single") test_that("combined data set", { connect.dataset.1() @@ -72,7 +73,7 @@ test_that("combined data set", .test.mean.large('D$NEGATIVE_NUMERIC',ds.test_env$local.values.1[,'NEGATIVE_NUMERIC']) }) -context("ds.mean::expt::large_values::multiple") +# context("ds.mean::expt::large_values::multiple") test_that("combined data set", { connect.all.datasets() diff --git a/tests/testthat/test-expt-ds.reshape.R b/tests/testthat/test-expt-ds.reshape.R index 853d31af2..4e8f243b3 100644 --- a/tests/testthat/test-expt-ds.reshape.R +++ b/tests/testthat/test-expt-ds.reshape.R @@ -1,9 +1,20 @@ +#------------------------------------------------------------------------------- +# Copyright (c) 2018-2022 University of Newcastle upon Tyne. All rights reserved. +# Copyright (c) 2022-2025 Arjuna Technologies, Newcastle upon Tyne. All rights reserved. +# +# This program and the accompanying materials +# are made available under the terms of the GNU Public License v3.0. +# +# You should have received a copy of the GNU General Public License +# along with this program. If not, see . +#------------------------------------------------------------------------------- + source("connection_to_datasets/init_testing_datasets.R") source("definition_tests/def-ds.reshape.R") source("definition_tests/def-assign-stats.R") -context("ds.reShape::expt::multiple") +# context("ds.reShape::expt::multiple") test_that("copy and transform", { init.testing.datasets() diff --git a/tests/testthat/test-expt-ds.skewness.R b/tests/testthat/test-expt-ds.skewness.R index d43bdce86..268ac3a13 100644 --- a/tests/testthat/test-expt-ds.skewness.R +++ b/tests/testthat/test-expt-ds.skewness.R @@ -1,5 +1,6 @@ #------------------------------------------------------------------------------- # Copyright (c) 2019-2022 University of Newcastle upon Tyne. All rights reserved. +# Copyright (c) 2022-2025 Arjuna Technologies, Newcastle upon Tyne. All rights reserved. # # This program and the accompanying materials # are made available under the terms of the GNU Public License v3.0. @@ -13,7 +14,7 @@ source("connection_to_datasets/init_testing_datasets.R") source("definition_tests/def-ds.skewness.R") -context("ds.skewness::expt::combine::multiple") +# context("ds.skewness::expt::combine::multiple") test_that("combined data set", { @@ -28,7 +29,7 @@ test_that("combined data set", .test.skewness.combined('D$NEGATIVE_NUMERIC',ds.test_env$local.values[,'NEGATIVE_NUMERIC'], method = 1) }) -context("ds.skewness::expt::split::multiple") +# context("ds.skewness::expt::split::multiple") test_that("split data set", { connect.all.datasets() @@ -42,7 +43,7 @@ test_that("split data set", .test.skewness.split('D$NEGATIVE_NUMERIC',ds.test_env$local.values.1[,'NEGATIVE_NUMERIC'],ds.test_env$local.values.2[,'NEGATIVE_NUMERIC'],ds.test_env$local.values.3[,'NEGATIVE_NUMERIC'], method = 2) }) -context("ds.skewness::expt::single") +# context("ds.skewness::expt::single") test_that("combined data set", { connect.dataset.1() diff --git a/tests/testthat/test-expt-ds.var.R b/tests/testthat/test-expt-ds.var.R index e8a19fd4f..e4764f327 100644 --- a/tests/testthat/test-expt-ds.var.R +++ b/tests/testthat/test-expt-ds.var.R @@ -1,8 +1,19 @@ +#------------------------------------------------------------------------------- +# Copyright (c) 2018-2022 University of Newcastle upon Tyne. All rights reserved. +# Copyright (c) 2022-2025 Arjuna Technologies, Newcastle upon Tyne. All rights reserved. +# +# This program and the accompanying materials +# are made available under the terms of the GNU Public License v3.0. +# +# You should have received a copy of the GNU General Public License +# along with this program. If not, see . +#------------------------------------------------------------------------------- + source("connection_to_datasets/init_testing_datasets.R") source("definition_tests/def-ds.var.R") -context("ds.var::expt::multiple") +# context("ds.var::expt::multiple") test_that("combined data set", { connect.all.datasets() @@ -16,7 +27,7 @@ test_that("combined data set", .test.var.combined('D$NEGATIVE_NUMERIC',ds.test_env$local.values[,'NEGATIVE_NUMERIC']) }) -context("ds.var::expt::single") +# context("ds.var::expt::single") test_that("split data set", { connect.all.datasets() @@ -30,7 +41,7 @@ test_that("split data set", .test.var.split('D$NEGATIVE_NUMERIC',ds.test_env$local.values.1[,'NEGATIVE_NUMERIC'],ds.test_env$local.values.2[,'NEGATIVE_NUMERIC'],ds.test_env$local.values.3[,'NEGATIVE_NUMERIC']) }) -context("ds.var::expt::large_values::multiple") +# context("ds.var::expt::large_values::multiple") test_that("large values", { connect.all.datasets() @@ -44,7 +55,7 @@ test_that("large values", .test.variance.large('D$NEGATIVE_NUMERIC',ds.test_env$local.values[,'NEGATIVE_NUMERIC']) }) -context("ds.var::expt::large_values::single") +# context("ds.var::expt::large_values::single") test_that("large values", { connect.dataset.1() @@ -58,4 +69,3 @@ test_that("large values", .test.variance.large('D$NEGATIVE_NUMERIC',ds.test_env$local.values.1[,'NEGATIVE_NUMERIC']) }) - diff --git a/tests/testthat/test-expt_bug-ds.asFactor.R b/tests/testthat/test-expt_bug-ds.asFactor.R index 16ca08534..b7f26c9ee 100644 --- a/tests/testthat/test-expt_bug-ds.asFactor.R +++ b/tests/testthat/test-expt_bug-ds.asFactor.R @@ -1,7 +1,17 @@ -source("definition_tests/def-ds.asFactor.R") +#------------------------------------------------------------------------------- +# Copyright (c) 2019-2022 University of Newcastle upon Tyne. All rights reserved. +# Copyright (c) 2022-2025 Arjuna Technologies, Newcastle upon Tyne. All rights reserved. +# +# This program and the accompanying materials +# are made available under the terms of the GNU Public License v3.0. +# +# You should have received a copy of the GNU General Public License +# along with this program. If not, see . +#------------------------------------------------------------------------------- +source("definition_tests/def-ds.asFactor.R") -context("ds.asFactor::expt::multiple") +# context("ds.asFactor::expt::multiple") test_that("combined data set", { connect.all.datasets() @@ -16,7 +26,7 @@ test_that("combined data set", .test.find.factor('D$FACTOR_INTEGER', 'FACTOR_INT.f',ds.test_env$local.values,15) }) -context("ds.asFactor::expt::single") +# context("ds.asFactor::expt::single") test_that("single dataset ", { connect.dataset.1() diff --git a/tests/testthat/test-expt_bug-ds.dataFrameSort.R b/tests/testthat/test-expt_bug-ds.dataFrameSort.R index 7f4f065a3..522c28ca6 100644 --- a/tests/testthat/test-expt_bug-ds.dataFrameSort.R +++ b/tests/testthat/test-expt_bug-ds.dataFrameSort.R @@ -1,5 +1,6 @@ #------------------------------------------------------------------------------- # Copyright (c) 2019-2022 University of Newcastle upon Tyne. All rights reserved. +# Copyright (c) 2022-2025 Arjuna Technologies, Newcastle upon Tyne. All rights reserved. # # This program and the accompanying materials # are made available under the terms of the GNU Public License v3.0. @@ -8,12 +9,12 @@ # along with this program. If not, see . #------------------------------------------------------------------------------- -context('ds.dataFrameSort::expt::setup') +# context('ds.dataFrameSort::expt::setup') source('connection_to_datasets/init_testing_datasets.R') source('definition_tests/def-ds.dataFrameSort.R') -context("ds.dataFrameSort::expt::multiple::correct_parameter_class") +# context("ds.dataFrameSort::expt::multiple::correct_parameter_class") test_that('all datasets', { connect.all.datasets() @@ -31,7 +32,7 @@ test_that('all datasets', .test.function.parameters("D","D$NUMERIC_ONE_CHANGE",TRUE,"alphabetic","server.data") .test.function.parameters("D","D$INTEGER_ONE_CHANGE",TRUE,"numeric","server.data") }) -context("ds.dataFrameSort::expt::single::correct_parameter_class") +# context("ds.dataFrameSort::expt::single::correct_parameter_class") test_that('dataset 2', { connect.dataset.2() @@ -49,7 +50,7 @@ test_that('dataset 2', .test.function.parameters("D","D$NUMERIC_ONE_CHANGE",TRUE,"alphabetic","server.data") .test.function.parameters("D","D$INTEGER_ONE_CHANGE",TRUE,"numeric","server.data") }) -context("ds.dataFrameSort::expt::multiple::incorrect_parameter_class") +# context("ds.dataFrameSort::expt::multiple::incorrect_parameter_class") test_that('all datasets', { connect.all.datasets() @@ -65,7 +66,7 @@ test_that('all datasets', .test.function.parameters("D","D$NUMERIC_ONE_CHANGE",TRUE,"alphabetic",23) .test.function.parameters("dataframe","D$INTEGER_ONE_CHANGE",TRUE,"numeric","server.data") }) -context("ds.dataFrameSort::expt::single::incorrect_parameter_class") +# context("ds.dataFrameSort::expt::single::incorrect_parameter_class") test_that('dataset 2', { connect.dataset.2() @@ -82,7 +83,7 @@ test_that('dataset 2', .test.function.parameters("dataframe","D$INTEGER_ONE_CHANGE",TRUE,"numeric","server.data") }) -context("ds.dataFrameSort::expt::multiple::df::creation") +# context("ds.dataFrameSort::expt::multiple::df::creation") test_that('all datasets', { connect.all.datasets() @@ -98,7 +99,7 @@ test_that('all datasets', .test.data.frame.creation("D","NUMERIC_ONE_CHANGE",TRUE,"numeric","server.data") .test.data.frame.creation("D","INTEGER_ONE_CHANGE",TRUE,"numeric","server.data") }) -context("ds.dataFrameSort::expt::single::df::creation") +# context("ds.dataFrameSort::expt::single::df::creation") test_that('dataset 3', { connect.dataset.3() @@ -114,7 +115,7 @@ test_that('dataset 3', .test.data.frame.creation("D","NUMERIC_ONE_CHANGE",TRUE,"numeric","server.data") .test.data.frame.creation("D","INTEGER_ONE_CHANGE",FALSE,"alphabetic","server.data") }) -context("ds.dataFrameSort::expt::multiple::numeric::ascending") +# context("ds.dataFrameSort::expt::multiple::numeric::ascending") test_that('all datasets', { connect.all.datasets() @@ -140,7 +141,7 @@ test_that('all datasets', }) -context("ds.dataFrameSort::expt::single::numeric::ascending") +# context("ds.dataFrameSort::expt::single::numeric::ascending") test_that('dataset 1', { connect.dataset.1() @@ -166,7 +167,7 @@ test_that('dataset 1', }) -context("ds.dataFrameSort::expt::multiple::numeric::descending") +# context("ds.dataFrameSort::expt::multiple::numeric::descending") test_that('all datasets', { connect.all.datasets() @@ -192,7 +193,7 @@ test_that('all datasets', }) -context("ds.dataFrameSort::expt::single::numeric::descending") +# context("ds.dataFrameSort::expt::single::numeric::descending") test_that('dataset 1', { connect.dataset.1() @@ -220,7 +221,7 @@ test_that('dataset 1', }) -context("ds.dataFrameSort::expt::multiple::alphabetic::ascending") +# context("ds.dataFrameSort::expt::multiple::alphabetic::ascending") test_that('all datasets', { connect.all.datasets() @@ -246,7 +247,7 @@ test_that('all datasets', #.test.data.frame.sorting("D","FACTOR_CHARACTER",FALSE,"alphabetic","server.data",local.df.list) .test.data.frame.sorting("D","CHARACTER",FALSE,"alphabetic","server.data",local.df.list) }) -context("ds.dataFrameSort::expt::single::alphabetic::ascending") +# context("ds.dataFrameSort::expt::single::alphabetic::ascending") test_that('dataset 2', { connect.dataset.2() @@ -272,7 +273,7 @@ test_that('dataset 2', #.test.data.frame.sorting("D","FACTOR_CHARACTER",FALSE,"alphabetic","server.data",local.df.list) .test.data.frame.sorting("D","CHARACTER",FALSE,"alphabetic","server.data",local.df.list) }) -context("ds.dataFrameSort::expt::multiple::alphabetic::descending") +# context("ds.dataFrameSort::expt::multiple::alphabetic::descending") test_that('all datasets', { connect.all.datasets() @@ -296,7 +297,7 @@ test_that('all datasets', #.test.data.frame.sorting("D","FACTOR_CHARACTER",TRUE,"alphabetic","server.data",local.df.list) .test.data.frame.sorting("D","CHARACTER",TRUE,"alphabetic","server.data",local.df.list) }) -context("ds.dataFrameSort::expt::single::alphabetic::descending") +# context("ds.dataFrameSort::expt::single::alphabetic::descending") test_that('dataset 3', { connect.dataset.3() @@ -322,7 +323,7 @@ test_that('dataset 3', }) -context('ds.dataFrameSort::expt::shutdown') +# context('ds.dataFrameSort::expt::shutdown') -context('ds.dataFrameSort::expt::done') +# context('ds.dataFrameSort::expt::done') diff --git a/tests/testthat/test-expt_bug-ds.make.R b/tests/testthat/test-expt_bug-ds.make.R index 2b5005d03..1bcf320cc 100644 --- a/tests/testthat/test-expt_bug-ds.make.R +++ b/tests/testthat/test-expt_bug-ds.make.R @@ -1,9 +1,20 @@ +#------------------------------------------------------------------------------- +# Copyright (c) 2018-2022 University of Newcastle upon Tyne. All rights reserved. +# Copyright (c) 2022-2025 Arjuna Technologies, Newcastle upon Tyne. All rights reserved. +# +# This program and the accompanying materials +# are made available under the terms of the GNU Public License v3.0. +# +# You should have received a copy of the GNU General Public License +# along with this program. If not, see . +#------------------------------------------------------------------------------- + source("connection_to_datasets/init_testing_datasets.R") source("definition_tests/def-ds.make.R") source("definition_tests/def-assign-stats.R") -context("ds.make::expt::copy_transform:single") +# context("ds.make::expt::copy_transform:single") test_that("copy and transform", { connect.dataset.1() @@ -20,7 +31,7 @@ test_that("copy and transform", -context("ds.make::expt::copy_data::single") +# context("ds.make::expt::copy_data::single") test_that("copy data without any changes applied", { connect.dataset.1() @@ -35,7 +46,7 @@ test_that("copy data without any changes applied", .test.copy.data('D$FACTOR_INTEGER','FACTOR_INTEGER_created',ds.test_env$local.values.1[,15]) }) -context("ds.make::expt::copy_data::multiple") +# context("ds.make::expt::copy_data::multiple") test_that("copy data without any changes applied", { connect.all.datasets() @@ -50,7 +61,7 @@ test_that("copy data without any changes applied", .test.copy.data('D$FACTOR_INTEGER','FACTOR_INTEGER_created',ds.test_env$local.values[,15]) }) -context("ds.make::expt::sum_of_two_vectors::single") +# context("ds.make::expt::sum_of_two_vectors::single") test_that("apply the the sum some vectors", { connect.dataset.1() @@ -82,7 +93,7 @@ test_that("apply the the sum some vectors", }) -context("ds.make::expt::sum_of_two_vectors::multiple") +# context("ds.make::expt::sum_of_two_vectors::multiple") test_that("add some vectors", { connect.all.datasets() @@ -111,7 +122,7 @@ test_that("add some vectors", .test.operation.vectors('D$NUMERIC','D$NON_NEGATIVE_NUMERIC','NUMERIC_created',"+",result.local = .add.vectors(ds.test_env$local.values[,10],ds.test_env$local.values[,11])) }) -context("ds.make::expt::product_of_two_vectors::single") +# context("ds.make::expt::product_of_two_vectors::single") test_that("multiply two vectors", { connect.dataset.1() @@ -144,7 +155,7 @@ test_that("multiply two vectors", -context("ds.make::expt::product_of_two_vectors::multiple") +# context("ds.make::expt::product_of_two_vectors::multiple") test_that("multiply two vectors", { connect.all.datasets() @@ -173,7 +184,7 @@ test_that("multiply two vectors", .test.operation.vectors('D$NUMERIC','D$NON_NEGATIVE_NUMERIC','NUMERIC_created',"*",result.local = .mult.vectors(ds.test_env$local.values[,10],ds.test_env$local.values[,11])) }) -context("ds.make::expt::division_of_two_vectors::multiple") +# context("ds.make::expt::division_of_two_vectors::multiple") test_that("divide two vectors", { connect.all.datasets() @@ -202,7 +213,7 @@ test_that("divide two vectors", }) -context("ds.make::expt::division_of_two_vectors::single") +# context("ds.make::expt::division_of_two_vectors::single") test_that("divide two vectors", { connect.dataset.1() @@ -231,7 +242,7 @@ test_that("divide two vectors", }) -context("ds.make::expt::substract_of_two_vectors::multiple") +# context("ds.make::expt::substract_of_two_vectors::multiple") test_that("substract two vectors", { connect.all.datasets() @@ -260,7 +271,7 @@ test_that("substract two vectors", }) -context("ds.make::expt::substract_of_two_vectors::single") +# context("ds.make::expt::substract_of_two_vectors::single") test_that("substract two vectors", { connect.dataset.1() @@ -289,7 +300,7 @@ test_that("substract two vectors", }) -context("ds.make::expt::sum_of_constant::single") +# context("ds.make::expt::sum_of_constant::single") test_that("apply the the sum a vector and a constant value", { connect.dataset.1() @@ -306,7 +317,7 @@ test_that("apply the the sum a vector and a constant value", }) -context("ds.make::expt::substract_of_constant::single") +# context("ds.make::expt::substract_of_constant::single") test_that("substract a constant value to all the values of a vector", { connect.dataset.1() @@ -324,7 +335,7 @@ test_that("substract a constant value to all the values of a vector", }) -context("ds.make::expt::divide_of_constant::single") +# context("ds.make::expt::divide_of_constant::single") test_that("divide a constant value to all the values of a vector", { connect.dataset.1() @@ -341,7 +352,7 @@ test_that("divide a constant value to all the values of a vector", }) -context("ds.make::expt::multiply_of_constant::single") +# context("ds.make::expt::multiply_of_constant::single") test_that("multiply a constant value to all the values of a vector", { connect.dataset.1() @@ -359,7 +370,7 @@ test_that("multiply a constant value to all the values of a vector", }) -context("ds.make::expt::sum_of_constant::multiple") +# context("ds.make::expt::sum_of_constant::multiple") test_that("apply the the sum a vector and a constant value", { connect.all.datasets() @@ -376,7 +387,7 @@ test_that("apply the the sum a vector and a constant value", }) -context("ds.make::expt::substract_of_constant::multiple") +# context("ds.make::expt::substract_of_constant::multiple") test_that("substract a constant value to all the values of a vector", { connect.all.datasets() @@ -394,7 +405,7 @@ test_that("substract a constant value to all the values of a vector", }) -context("ds.make::expt::divide_of_constant::multiple") +# context("ds.make::expt::divide_of_constant::multiple") test_that("divide a constant value to all the values of a vector", { connect.all.datasets() @@ -411,7 +422,7 @@ test_that("divide a constant value to all the values of a vector", }) -context("ds.make::expt::multiply_of_constant::multiple") +# context("ds.make::expt::multiply_of_constant::multiple") test_that("multiply a constant value to all the values of a vector", { connect.all.datasets() diff --git a/tests/testthat/test-expt_bug-ds.rPois.R b/tests/testthat/test-expt_bug-ds.rPois.R index 5e2b808a6..41716ac90 100644 --- a/tests/testthat/test-expt_bug-ds.rPois.R +++ b/tests/testthat/test-expt_bug-ds.rPois.R @@ -1,8 +1,19 @@ +#------------------------------------------------------------------------------- +# Copyright (c) 2018-2022 University of Newcastle upon Tyne. All rights reserved. +# Copyright (c) 2022-2025 Arjuna Technologies, Newcastle upon Tyne. All rights reserved. +# +# This program and the accompanying materials +# are made available under the terms of the GNU Public License v3.0. +# +# You should have received a copy of the GNU General Public License +# along with this program. If not, see . +#------------------------------------------------------------------------------- + source("connection_to_datasets/init_testing_datasets.R") source("definition_tests/def-ds.rPois.R") -context("ds.rPois::expt::no seeds::single") +# context("ds.rPois::expt::no seeds::single") test_that("Poisson without seeds", { connect.dataset.1() @@ -15,7 +26,7 @@ test_that("Poisson without seeds", }) -context("ds.rPois::expt::no seeds::multiple") +# context("ds.rPois::expt::no seeds::multiple") test_that("Poisson without seeds", { connect.all.datasets() @@ -29,7 +40,7 @@ test_that("Poisson without seeds", -context("ds.rPois::expt::with seeds::single") +# context("ds.rPois::expt::with seeds::single") test_that("Poisson with seeds", { @@ -44,7 +55,7 @@ test_that("Poisson with seeds", .test.basic.expectation.with.seeds(2^31,'poisson_dist_7') }) -context("ds.rPois::expt::with seeds::multiple") +# context("ds.rPois::expt::with seeds::multiple") test_that("Poisson with seeds", { connect.all.datasets() diff --git a/tests/testthat/test-expt_bug-ds.rUnif.R b/tests/testthat/test-expt_bug-ds.rUnif.R index 845d3fa0f..f026843c8 100644 --- a/tests/testthat/test-expt_bug-ds.rUnif.R +++ b/tests/testthat/test-expt_bug-ds.rUnif.R @@ -1,7 +1,18 @@ +#------------------------------------------------------------------------------- +# Copyright (c) 2018-2022 University of Newcastle upon Tyne. All rights reserved. +# Copyright (c) 2022-2025 Arjuna Technologies, Newcastle upon Tyne. All rights reserved. +# +# This program and the accompanying materials +# are made available under the terms of the GNU Public License v3.0. +# +# You should have received a copy of the GNU General Public License +# along with this program. If not, see . +#------------------------------------------------------------------------------- + source("connection_to_datasets/init_testing_datasets.R") source("definition_tests/def-ds.rUnif.R") -context("ds.rUnif::expt::no_seeds::single") +# context("ds.rUnif::expt::no_seeds::single") test_that("basic expectation", { connect.dataset.2() @@ -14,7 +25,7 @@ test_that("basic expectation", .test.basic.expectation(2^31-1,'uniform_dist_6') }) -context("ds.rUnif::expt::no_seeds::multiple") +# context("ds.rUnif::expt::no_seeds::multiple") test_that("basic expectation", { connect.all.datasets() @@ -27,7 +38,7 @@ test_that("basic expectation", .test.basic.expectation(2^31-1,'uniform_dist_6') }) -context("ds.rUnif::expt::seeds::single") +# context("ds.rUnif::expt::seeds::single") test_that("basic expectation", { connect.dataset.2() @@ -40,7 +51,7 @@ test_that("basic expectation", .test.basic.expectation.with.seeds(2^31-1,'uniform_dist_6') }) -context("ds.rUnif::expt::seeds::multiple") +# context("ds.rUnif::expt::seeds::multiple") test_that("basic expectation", { connect.all.datasets() diff --git a/tests/testthat/test-expt_bug-ds.recodeValues.R b/tests/testthat/test-expt_bug-ds.recodeValues.R index 4a35f9b27..4f6bf6599 100644 --- a/tests/testthat/test-expt_bug-ds.recodeValues.R +++ b/tests/testthat/test-expt_bug-ds.recodeValues.R @@ -1,7 +1,18 @@ +#------------------------------------------------------------------------------- +# Copyright (c) 2018-2022 University of Newcastle upon Tyne. All rights reserved. +# Copyright (c) 2022-2025 Arjuna Technologies, Newcastle upon Tyne. All rights reserved. +# +# This program and the accompanying materials +# are made available under the terms of the GNU Public License v3.0. +# +# You should have received a copy of the GNU General Public License +# along with this program. If not, see . +#------------------------------------------------------------------------------- + source("connection_to_datasets/init_testing_datasets.R") source("definition_tests/def-ds.recodeValues.R") -context("ds.recodeValues::expt::changes_applied::single::") +# context("ds.recodeValues::expt::changes_applied::single::") test_that("changes must be applied", { @@ -40,7 +51,7 @@ test_that("changes must be applied", }) -context("ds.recodeValues::expt::changes_applied::multiple") +# context("ds.recodeValues::expt::changes_applied::multiple") test_that("changes must be applied", { @@ -81,7 +92,7 @@ test_that("changes must be applied", - context("ds.recodeValues::expt::no_change_applied::single") + # context("ds.recodeValues::expt::no_change_applied::single") test_that("no_change_applied", { connect.dataset.1() @@ -129,7 +140,7 @@ test_that("changes must be applied", }) -context("ds.recodeValues::expt::no_change_applied::multiple") +# context("ds.recodeValues::expt::no_change_applied::multiple") test_that("no_change_applied", { connect.all.datasets() diff --git a/tests/testthat/test-expt_bug-ds.table.R b/tests/testthat/test-expt_bug-ds.table.R index 23844fdf6..1834fca0a 100644 --- a/tests/testthat/test-expt_bug-ds.table.R +++ b/tests/testthat/test-expt_bug-ds.table.R @@ -1,5 +1,6 @@ #------------------------------------------------------------------------------- -# Copyright (c) 2019-2022 University of Newcastle upon Tyne. All rights reserved. +# Copyright (c) 2018-2022 University of Newcastle upon Tyne. All rights reserved. +# Copyright (c) 2022-2025 Arjuna Technologies, Newcastle upon Tyne. All rights reserved. # # This program and the accompanying materials # are made available under the terms of the GNU Public License v3.0. @@ -8,10 +9,10 @@ # along with this program. If not, see . #------------------------------------------------------------------------------- -context("ds.table::expt::setup") +# context("ds.table::expt::setup") connect.testing.group.dataset.1() -context("ds.table::expt::single") +# context("ds.table::expt::single") test_that("combined data set", { #PRW AND ALEX WILL WRITE SOME CONNECT AND DISCONNECT FUNCTIONS ONCE WE KNOW THE DATA ARE SUITABLE - TO DO IMPORTANT !!!!!!!! COMPLETELY INEFFICIENT AT THE MOMENT 17/2/2020 diff --git a/tests/testthat/test-expt_dgr-ds.dataFrameSort.R b/tests/testthat/test-expt_dgr-ds.dataFrameSort.R index 251170e72..9ff0bca2b 100644 --- a/tests/testthat/test-expt_dgr-ds.dataFrameSort.R +++ b/tests/testthat/test-expt_dgr-ds.dataFrameSort.R @@ -1,5 +1,6 @@ #------------------------------------------------------------------------------- # Copyright (c) 2019-2022 University of Newcastle upon Tyne. All rights reserved. +# Copyright (c) 2022-2025 Arjuna Technologies, Newcastle upon Tyne. All rights reserved. # # This program and the accompanying materials # are made available under the terms of the GNU Public License v3.0. @@ -12,7 +13,7 @@ # Set up # -context('ds.dataFrameSort::expt_dgr::setup') +# context('ds.dataFrameSort::expt_dgr::setup') source('connection_to_datasets/init_testing_datasets.R') source('definition_tests/def-ds.dataFrameSort.R') @@ -21,7 +22,7 @@ source('definition_tests/def-ds.dataFrameSort.R') # Tests # -context("ds.dataFrameSort::expt_dgr::multiple::correct_parameter_class") +# context("ds.dataFrameSort::expt_dgr::multiple::correct_parameter_class") test_that('all datasets', { connect.all.datasets() @@ -40,7 +41,7 @@ test_that('all datasets', .test.function.parameters("D","D$INTEGER_ONE_CHANGE",TRUE,"numeric","server.data") }) -context("ds.dataFrameSort::expt_dgr::single::correct_parameter_class") +# context("ds.dataFrameSort::expt_dgr::single::correct_parameter_class") test_that('dataset 2', { connect.dataset.2() @@ -59,7 +60,7 @@ test_that('dataset 2', .test.function.parameters("D","D$INTEGER_ONE_CHANGE",TRUE,"numeric","server.data") }) -context("ds.dataFrameSort::expt_dgr::multiple::incorrect_parameter_class") +# context("ds.dataFrameSort::expt_dgr::multiple::incorrect_parameter_class") test_that('all datasets', { connect.all.datasets() @@ -76,7 +77,7 @@ test_that('all datasets', .test.function.parameters("dataframe","D$INTEGER_ONE_CHANGE",TRUE,"numeric","server.data") }) -context("ds.dataFrameSort::expt_dgr::single::incorrect_parameter_class") +# context("ds.dataFrameSort::expt_dgr::single::incorrect_parameter_class") test_that('dataset 2', { connect.dataset.2() @@ -93,7 +94,7 @@ test_that('dataset 2', .test.function.parameters("dataframe","D$INTEGER_ONE_CHANGE",TRUE,"numeric","server.data") }) -context("ds.dataFrameSort::expt_dgr::multiple::df::creation") +# context("ds.dataFrameSort::expt_dgr::multiple::df::creation") test_that('all datasets', { connect.all.datasets() @@ -110,7 +111,7 @@ test_that('all datasets', .test.data.frame.creation("D","INTEGER_ONE_CHANGE",TRUE,"numeric","server.data") }) -context("ds.dataFrameSort::expt_dgr::single::df::creation") +# context("ds.dataFrameSort::expt_dgr::single::df::creation") test_that('dataset 3', { connect.dataset.3() @@ -127,7 +128,7 @@ test_that('dataset 3', .test.data.frame.creation("D","INTEGER_ONE_CHANGE",FALSE,"alphabetic","server.data") }) -context("ds.dataFrameSort::expt_dgr::multiple::numeric::ascending") +# context("ds.dataFrameSort::expt_dgr::multiple::numeric::ascending") test_that('all datasets', { connect.all.datasets() @@ -148,7 +149,7 @@ test_that('all datasets', #.test.data.frame.sorting("D","CHARACTER",FALSE,"numeric","server.data",all.local.values) }) -context("ds.dataFrameSort::expt_dgr::single::numeric::ascending") +# context("ds.dataFrameSort::expt_dgr::single::numeric::ascending") test_that('dataset 1', { connect.dataset.1() @@ -169,7 +170,7 @@ test_that('dataset 1', #.test.data.frame.sorting("D","CHARACTER",FALSE,"numeric","server.data",all.local.values) }) -context("ds.dataFrameSort::expt_dgr::multiple::numeric::descending") +# context("ds.dataFrameSort::expt_dgr::multiple::numeric::descending") test_that('all datasets', { connect.all.datasets() @@ -192,7 +193,7 @@ test_that('all datasets', }) -context("ds.dataFrameSort::expt_dgr::single::numeric::descending") +# context("ds.dataFrameSort::expt_dgr::single::numeric::descending") test_that('dataset 1', { connect.dataset.1() @@ -214,7 +215,7 @@ test_that('dataset 1', }) -context("ds.dataFrameSort::expt_dgr::multiple::alphabetic::ascending") +# context("ds.dataFrameSort::expt_dgr::multiple::alphabetic::ascending") test_that('all datasets', { #connect.all.datasets() @@ -242,7 +243,7 @@ test_that('all datasets', #.test.data.frame.sorting("D","CHARACTER",FALSE,"alphabetic","server.data",all.local.values) }) -context("ds.dataFrameSort::expt_dgr::single::alphabetic::ascending") +# context("ds.dataFrameSort::expt_dgr::single::alphabetic::ascending") test_that('dataset 2', { #connect.dataset.2() @@ -270,7 +271,7 @@ test_that('dataset 2', #.test.data.frame.sorting("D","CHARACTER",FALSE,"alphabetic","server.data",all.local.values) }) -context("ds.dataFrameSort::expt_dgr::multiple::alphabetic::descending") +# context("ds.dataFrameSort::expt_dgr::multiple::alphabetic::descending") test_that('all datasets', { #connect.all.datasets() @@ -296,7 +297,7 @@ test_that('all datasets', #.test.data.frame.sorting("D","CHARACTER",TRUE,"alphabetic","server.data",all.local.values) }) -context("ds.dataFrameSort::expt_dgr::single::alphabetic::descending") +# context("ds.dataFrameSort::expt_dgr::single::alphabetic::descending") test_that('dataset 3', { #connect.dataset.3() @@ -326,10 +327,10 @@ test_that('dataset 3', # Shutdown # -context('ds.dataFrameSort::expt_dgr::shutdown') +# context('ds.dataFrameSort::expt_dgr::shutdown') # # Done # -context('ds.dataFrameSort::expt_dgr::done') +# context('ds.dataFrameSort::expt_dgr::done') diff --git a/tests/testthat/test-expt_dgr-ds.dataFrameSubset.R b/tests/testthat/test-expt_dgr-ds.dataFrameSubset.R index 222d41bd5..278403ec9 100644 --- a/tests/testthat/test-expt_dgr-ds.dataFrameSubset.R +++ b/tests/testthat/test-expt_dgr-ds.dataFrameSubset.R @@ -1,5 +1,6 @@ #------------------------------------------------------------------------------- # Copyright (c) 2019-2022 University of Newcastle upon Tyne. All rights reserved. +# Copyright (c) 2022-2025 Arjuna Technologies, Newcastle upon Tyne. All rights reserved. # # This program and the accompanying materials # are made available under the terms of the GNU Public License v3.0. @@ -12,7 +13,7 @@ # Set up # -context("ds.dataFrameSubset::expt_dgr::setup") +# context("ds.dataFrameSubset::expt_dgr::setup") source("connection_to_datasets/init_testing_datasets.R") source("definition_tests/def-ds.dataFrameSubset.R") @@ -21,7 +22,7 @@ source("definition_tests/def-ds.dataFrameSubset.R") # Tests # -context("ds.dataFrameSubset::expt_dgr::multiple::parameter_class") +# context("ds.dataFrameSubset::expt_dgr::multiple::parameter_class") test_that('all datasets', { connect.all.datasets() @@ -41,7 +42,7 @@ test_that('all datasets', }) -context("ds.dataFrameSubset::expt_dgr::single::parameter_class") +# context("ds.dataFrameSubset::expt_dgr::single::parameter_class") test_that('dataset 1', { connect.dataset.1() @@ -61,7 +62,7 @@ test_that('dataset 1', }) -context("ds.dataFrameSubset::expt_dgr::multiple::all_columns") +# context("ds.dataFrameSubset::expt_dgr::multiple::all_columns") test_that('all datasets', { connect.all.datasets() @@ -73,7 +74,7 @@ test_that('all datasets', .test.data.frame.creation("D","POSITIVE_NUMERIC","NON_NEGATIVE_NUMERIC","<=","subset.server") }) -context("ds.dataFrameSubset::expt_dgr::single::all_columns") +# context("ds.dataFrameSubset::expt_dgr::single::all_columns") test_that('dataset 2', { connect.dataset.2() @@ -85,7 +86,7 @@ test_that('dataset 2', .test.data.frame.creation("D","POSITIVE_NUMERIC","NON_NEGATIVE_NUMERIC","<=","subset.server") }) -context("ds.dataFrameSubset::expt_dgr::multiple::all_columns::subset_by_rows") +# context("ds.dataFrameSubset::expt_dgr::multiple::all_columns::subset_by_rows") test_that("all datasets", { connect.all.datasets() @@ -104,7 +105,7 @@ test_that("all datasets", subset.by.rows("D","POSITIVE_NUMERIC","NON_NEGATIVE_NUMERIC","<=",FALSE,"subset.server",local.df.list) }) -context("ds.dataFrameSubset::expt_dgr::single::all_columns::subset_by_rows") +# context("ds.dataFrameSubset::expt_dgr::single::all_columns::subset_by_rows") test_that("dataset 3", { connect.dataset.3() @@ -123,7 +124,7 @@ test_that("dataset 3", subset.by.rows("D","POSITIVE_NUMERIC","NON_NEGATIVE_NUMERIC","<=",FALSE,"subset.server",local.df.list) }) -context("ds.dataFrameSubset::expt_dgr::multiple::subset_by_rows_columns") +# context("ds.dataFrameSubset::expt_dgr::multiple::subset_by_rows_columns") test_that("all datasets", { connect.all.datasets() @@ -142,7 +143,7 @@ test_that("all datasets", subset.by.rows.cols("D","POSITIVE_NUMERIC","NON_NEGATIVE_NUMERIC",1:15,"<=",FALSE,"subset.server",local.df.list) }) -context("ds.dataFrameSubset::expt_dgr::single::subset_by_rows_columns") +# context("ds.dataFrameSubset::expt_dgr::single::subset_by_rows_columns") test_that("dataset 1", { connect.dataset.1() @@ -162,7 +163,7 @@ test_that("dataset 1", }) -context("ds.dataFrameSubset::expt_dgr::multiple::subset_by_rows_columns") +# context("ds.dataFrameSubset::expt_dgr::multiple::subset_by_rows_columns") test_that("all datasets", { connect.all.datasets() @@ -180,7 +181,7 @@ test_that("all datasets", subset.by.rows.cols("D","POSITIVE_NUMERIC","NON_NEGATIVE_NUMERIC",1:15,"<=",TRUE,"subset.server",local.df.list) subset.by.rows.cols("D","POSITIVE_NUMERIC","NON_NEGATIVE_NUMERIC",1:15,"<=",FALSE,"subset.server",local.df.list) }) -context("ds.dataFrameSubset::expt_dgr::single::subset_by_rows_columns") +# context("ds.dataFrameSubset::expt_dgr::single::subset_by_rows_columns") test_that("dataset 2", { connect.dataset.2() @@ -199,7 +200,7 @@ test_that("dataset 2", subset.by.rows.cols("D","POSITIVE_NUMERIC","NON_NEGATIVE_NUMERIC",1:15,"<=",FALSE,"subset.server",local.df.list) }) -context("ds.dataFrameSubset::expt_dgr::multiple::all_rows_subset_by_columns") +# context("ds.dataFrameSubset::expt_dgr::multiple::all_rows_subset_by_columns") test_that("all datasets", { connect.all.datasets() local.df.list<-list(ds.test_env$local.values.1,ds.test_env$local.values.2,ds.test_env$local.values.3) @@ -211,7 +212,7 @@ test_that("all datasets", subset.by.cols("D","NON_NEGATIVE_NUMERIC",c(1:7,13:16),FALSE,"subset.server",local.df.list) }) -context("ds.dataFrameSubset::expt_dgr::multiple::all_rows_subset_by_columns") +# context("ds.dataFrameSubset::expt_dgr::multiple::all_rows_subset_by_columns") test_that("dataset 3", { connect.dataset.3() local.df.list<-list(ds.test_env$local.values.3) diff --git a/tests/testthat/test-math-ds.mean.R b/tests/testthat/test-math-ds.mean.R index 601e6a502..4c2a15593 100644 --- a/tests/testthat/test-math-ds.mean.R +++ b/tests/testthat/test-math-ds.mean.R @@ -1,9 +1,18 @@ +#------------------------------------------------------------------------------- +# Copyright (c) 2019-2022 University of Newcastle upon Tyne. All rights reserved. +# Copyright (c) 2022-2025 Arjuna Technologies, Newcastle upon Tyne. All rights reserved. +# +# This program and the accompanying materials +# are made available under the terms of the GNU Public License v3.0. +# +# You should have received a copy of the GNU General Public License +# along with this program. If not, see . +#------------------------------------------------------------------------------- + source("connection_to_datasets/init_testing_datasets.R") source("definition_tests/def-ds.mean.R") - - -context("ds.mean::math::residual::multiple") +# context("ds.mean::math::residual::multiple") test_that("residual deviation tends to 0", { connect.all.datasets() @@ -27,7 +36,7 @@ test_that("residual deviation tends to 0", }) -context("ds.mean::math::residual::multiple") +# context("ds.mean::math::residual::multiple") test_that("residual deviation tends to 0", { connect.all.datasets() @@ -53,7 +62,7 @@ test_that("residual deviation tends to 0", }) -context("ds.mean::math::location_parameter::single") +# context("ds.mean::math::location_parameter::single") test_that("mean(X+a) - mean(X) = a", { connect.dataset.1() @@ -68,7 +77,7 @@ test_that("mean(X+a) - mean(X) = a", .test.location.parameter('D$NEGATIVE_NUMERIC') }) -context("ds.mean::math::location_parameter::multiple") +# context("ds.mean::math::location_parameter::multiple") test_that("mean(X+a) - mean(X) = a", { connect.all.datasets() @@ -86,7 +95,7 @@ test_that("mean(X+a) - mean(X) = a", -context("ds.mean::math::scale::multiple") +# context("ds.mean::math::scale::multiple") test_that("mean(X+a) / mean(X) = a", { connect.all.datasets() @@ -101,7 +110,7 @@ test_that("mean(X+a) / mean(X) = a", .test.scale('D$NEGATIVE_NUMERIC') }) -context("ds.mean::math::scale::single") +# context("ds.mean::math::scale::single") test_that("mean(X*a) / mean(X) = a", { connect.dataset.1() diff --git a/tests/testthat/test-math-ds.var.R b/tests/testthat/test-math-ds.var.R index 47a7270d7..e281c5d62 100644 --- a/tests/testthat/test-math-ds.var.R +++ b/tests/testthat/test-math-ds.var.R @@ -1,7 +1,18 @@ +#------------------------------------------------------------------------------- +# Copyright (c) 2019-2022 University of Newcastle upon Tyne. All rights reserved. +# Copyright (c) 2022-2025 Arjuna Technologies, Newcastle upon Tyne. All rights reserved. +# +# This program and the accompanying materials +# are made available under the terms of the GNU Public License v3.0. +# +# You should have received a copy of the GNU General Public License +# along with this program. If not, see . +#------------------------------------------------------------------------------- + source("connection_to_datasets/init_testing_datasets.R") source("definition_tests/def-ds.var.R") -context("ds.var::math::positive_result::multiple") +# context("ds.var::math::positive_result::multiple") test_that("variance >=0", { connect.all.datasets() @@ -25,7 +36,7 @@ test_that("variance >=0", }) -context("ds.var::math::positive_result::single") +# context("ds.var::math::positive_result::single") test_that("variance >=0", { connect.dataset.1() @@ -49,7 +60,7 @@ test_that("variance >=0", }) -context("ds.var::math::square_root_std::single") +# context("ds.var::math::square_root_std::single") test_that("variance is to the power of 2 of the standard deviation", { connect.dataset.1() @@ -65,7 +76,7 @@ test_that("variance is to the power of 2 of the standard deviation", }) -context("ds.var::math::square_root_std::multiple") +# context("ds.var::math::square_root_std::multiple") test_that("variance is to the power of 2 of the standard deviation", { connect.all.datasets() @@ -88,7 +99,7 @@ test_that("variance is to the power of 2 of the standard deviation", .test.standard.dev.split('D$NEGATIVE_NUMERIC',ds.test_env$local.values.1[,'NEGATIVE_NUMERIC'],ds.test_env$local.values.2[,'NEGATIVE_NUMERIC'],ds.test_env$local.values.3[,'NEGATIVE_NUMERIC']) }) -context("ds.var::math::location::parameter::single") +# context("ds.var::math::location::parameter::single") test_that("var (X+a) = Var(X)", { connect.dataset.1() @@ -102,7 +113,7 @@ test_that("var (X+a) = Var(X)", .test.location.parameter('D$NEGATIVE_NUMERIC') }) -context("ds.var::math::location::parameter::multiple") +# context("ds.var::math::location::parameter::multiple") test_that("var (X+a) = Var(X)", { connect.all.datasets() @@ -116,7 +127,7 @@ test_that("var (X+a) = Var(X)", .test.location.parameter('D$NEGATIVE_NUMERIC') }) -context("ds.var::math::scale::single") +# context("ds.var::math::scale::single") test_that("var (aX) = a^2Var(X)", { connect.dataset.1() @@ -130,7 +141,7 @@ test_that("var (aX) = a^2Var(X)", .test.scale('D$NEGATIVE_NUMERIC') }) -context("ds.var::math::scale::multiple") +# context("ds.var::math::scale::multiple") test_that("var (aX) = a^2Var(X)", { connect.all.datasets() @@ -143,5 +154,3 @@ test_that("var (aX) = a^2Var(X)", .test.scale('D$POSITIVE_NUMERIC') .test.scale('D$NEGATIVE_NUMERIC') }) - - diff --git a/tests/testthat/test-math_bug-ds.asFactor.R b/tests/testthat/test-math_bug-ds.asFactor.R index def587df6..cb44c2fa1 100644 --- a/tests/testthat/test-math_bug-ds.asFactor.R +++ b/tests/testthat/test-math_bug-ds.asFactor.R @@ -1,7 +1,19 @@ +#------------------------------------------------------------------------------- +# Copyright (c) 2019-2022 University of Newcastle upon Tyne. All rights reserved. +# Copyright (c) 2022-2025 Arjuna Technologies, Newcastle upon Tyne. All rights reserved. +# +# This program and the accompanying materials +# are made available under the terms of the GNU Public License v3.0. +# +# You should have received a copy of the GNU General Public License +# along with this program. If not, see . +#------------------------------------------------------------------------------- +# + source("connection_to_datasets/init_testing_datasets.R") source("definition_tests/def-ds.asFactor.R") -context("ds.asFactor::math::multiple") +# context("ds.asFactor::math::multiple") test_that("every factor should be unique", { connect.all.datasets() @@ -16,7 +28,7 @@ test_that("every factor should be unique", .test.uniqueness('D$FACTOR_INTEGER', 'FACTOR_INT.f') }) -context("ds.asFactor::math::multiple") +# context("ds.asFactor::math::multiple") test_that("every factor should be unique", { connect.dataset.1() diff --git a/tests/testthat/test-math_bug-ds.make.R b/tests/testthat/test-math_bug-ds.make.R index 4a5de5d98..2823af009 100644 --- a/tests/testthat/test-math_bug-ds.make.R +++ b/tests/testthat/test-math_bug-ds.make.R @@ -1,8 +1,18 @@ +#------------------------------------------------------------------------------- +# Copyright (c) 2019-2022 University of Newcastle upon Tyne. All rights reserved. +# Copyright (c) 2022-2025 Arjuna Technologies, Newcastle upon Tyne. All rights reserved. +# +# This program and the accompanying materials +# are made available under the terms of the GNU Public License v3.0. +# +# You should have received a copy of the GNU General Public License +# along with this program. If not, see . +#------------------------------------------------------------------------------- + source("connection_to_datasets/init_testing_datasets.R") source("definition_tests/def-ds.make.R") - -context("ds.make::math::transformation::multiple") +# context("ds.make::math::transformation::multiple") test_that("transformation", { connect.all.datasets() diff --git a/tests/testthat/test-math_bug-ds.rPois.R b/tests/testthat/test-math_bug-ds.rPois.R index 4aa6f803d..b920cfff0 100644 --- a/tests/testthat/test-math_bug-ds.rPois.R +++ b/tests/testthat/test-math_bug-ds.rPois.R @@ -1,9 +1,20 @@ +#------------------------------------------------------------------------------- +# Copyright (c) 2019-2022 University of Newcastle upon Tyne. All rights reserved. +# Copyright (c) 2022-2025 Arjuna Technologies, Newcastle upon Tyne. All rights reserved. +# +# This program and the accompanying materials +# are made available under the terms of the GNU Public License v3.0. +# +# You should have received a copy of the GNU General Public License +# along with this program. If not, see . +#------------------------------------------------------------------------------- + source("connection_to_datasets/init_testing_datasets.R") source("definition_tests/def-ds.rPois.R") random.number <- as.integer(as.POSIXct(Sys.time(), "GMT")) -context("ds.rPois::math::lambda equal mean and var::single") +# context("ds.rPois::math::lambda equal mean and var::single") test_that("lamdba == mean and lambda == var", { connect.dataset.1() @@ -14,7 +25,7 @@ test_that("lamdba == mean and lambda == var", }) -context("ds.rPois::math::lambda equal mean and var::multiple") +# context("ds.rPois::math::lambda equal mean and var::multiple") test_that("lamdba == mean and lambda == var", { connect.all.datasets() @@ -25,7 +36,7 @@ test_that("lamdba == mean and lambda == var", }) -context("ds.rPois::math::distributions comparison::multiple") +# context("ds.rPois::math::distributions comparison::multiple") test_that("changes in distribution", { connect.all.datasets() @@ -37,7 +48,7 @@ test_that("changes in distribution", .test.dispersions.stats.diff.distribution(seed/1000, c(1900),seed,c(1100)) }) -context("ds.rPois::math::distributions comparison::single") +# context("ds.rPois::math::distributions comparison::single") test_that("changes in distribution", { connect.dataset.3() diff --git a/tests/testthat/test-math_bug-ds.rUnif.R b/tests/testthat/test-math_bug-ds.rUnif.R index 123314a9f..7ca2da888 100644 --- a/tests/testthat/test-math_bug-ds.rUnif.R +++ b/tests/testthat/test-math_bug-ds.rUnif.R @@ -1,5 +1,6 @@ #------------------------------------------------------------------------------- # Copyright (c) 2019-2022 University of Newcastle upon Tyne. All rights reserved. +# Copyright (c) 2022-2025 Arjuna Technologies, Newcastle upon Tyne. All rights reserved. # # This program and the accompanying materials # are made available under the terms of the GNU Public License v3.0. @@ -13,7 +14,7 @@ source("definition_tests/def-ds.rUnif.R") random.number <- as.integer(as.POSIXct(Sys.time(), "GMT")) -context("ds.rUnif::math::mean_variance::single") +# context("ds.rUnif::math::mean_variance::single") test_that("mean_variance", { connect.dataset.1() @@ -23,7 +24,7 @@ test_that("mean_variance", .test.range.values(-200,-100,"uniform_3",seed) }) -context("ds.rUnif::math::distributions comparison::single") +# context("ds.rUnif::math::distributions comparison::single") test_that("changes in distribution", { connect.dataset.3() @@ -37,7 +38,7 @@ test_that("changes in distribution", }) -context("ds.rUnif::math::distributions comparison::multiple") +# context("ds.rUnif::math::distributions comparison::multiple") test_that("changes in distribution", { connect.all.datasets() diff --git a/tests/testthat/test-math_bug-ds.recodeValues.R b/tests/testthat/test-math_bug-ds.recodeValues.R index f34df1ea3..b5e452398 100644 --- a/tests/testthat/test-math_bug-ds.recodeValues.R +++ b/tests/testthat/test-math_bug-ds.recodeValues.R @@ -1,8 +1,18 @@ +#------------------------------------------------------------------------------- +# Copyright (c) 2019-2022 University of Newcastle upon Tyne. All rights reserved. +# Copyright (c) 2022-2025 Arjuna Technologies, Newcastle upon Tyne. All rights reserved. +# +# This program and the accompanying materials +# are made available under the terms of the GNU Public License v3.0. +# +# You should have received a copy of the GNU General Public License +# along with this program. If not, see . +#------------------------------------------------------------------------------- + source("connection_to_datasets/init_testing_datasets.R") source("definition_tests/def-ds.recodeValues.R") - -context("ds.recodeValues::math::single") +# context("ds.recodeValues::math::single") test_that("difference", { connect.dataset.1() @@ -65,7 +75,7 @@ test_that("difference", -context("ds.recodeValues::math::multiple") +# context("ds.recodeValues::math::multiple") test_that("difference", { connect.all.datasets() diff --git a/tests/testthat/test-math_bug-ds.table.R b/tests/testthat/test-math_bug-ds.table.R index 4f221c647..db0bd51ee 100644 --- a/tests/testthat/test-math_bug-ds.table.R +++ b/tests/testthat/test-math_bug-ds.table.R @@ -1,5 +1,6 @@ #------------------------------------------------------------------------------- # Copyright (c) 2019-2022 University of Newcastle upon Tyne. All rights reserved. +# Copyright (c) 2022-2025 Arjuna Technologies, Newcastle upon Tyne. All rights reserved. # # This program and the accompanying materials # are made available under the terms of the GNU Public License v3.0. @@ -9,7 +10,7 @@ #------------------------------------------------------------------------------- -context("ds.table::math::row and col proportions::multiple") +# context("ds.table::math::row and col proportions::multiple") test_that("row and col proportions sum to 1", { diff --git a/tests/testthat/test-math_dgr-ds.dataFrameSort.R b/tests/testthat/test-math_dgr-ds.dataFrameSort.R index e7d68279a..21d166472 100644 --- a/tests/testthat/test-math_dgr-ds.dataFrameSort.R +++ b/tests/testthat/test-math_dgr-ds.dataFrameSort.R @@ -1,5 +1,6 @@ #------------------------------------------------------------------------------- # Copyright (c) 2019-2022 University of Newcastle upon Tyne. All rights reserved. +# Copyright (c) 2022-2025 Arjuna Technologies, Newcastle upon Tyne. All rights reserved. # # This program and the accompanying materials # are made available under the terms of the GNU Public License v3.0. @@ -12,7 +13,7 @@ # Set up # -context('ds.dataFrameSort::expt_dgr::setup') +# context('ds.dataFrameSort::expt_dgr::setup') source('connection_to_datasets/init_testing_datasets.R') source('definition_tests/def-ds.dataFrameSort.R') @@ -21,7 +22,7 @@ source('definition_tests/def-ds.dataFrameSort.R') # Tests # -context("ds.dataFrameSort::math_dgr::closure::multiple") +# context("ds.dataFrameSort::math_dgr::closure::multiple") test_that('server set %in% local set', { connect.all.datasets() @@ -43,7 +44,7 @@ test_that('server set %in% local set', }) -context("ds.dataFrameSort::math_dgr::closure::simple") +# context("ds.dataFrameSort::math_dgr::closure::simple") test_that('server set %in% local set', { connect.dataset.1() diff --git a/tests/testthat/test-math_dgr-ds.dataFrameSubset.R b/tests/testthat/test-math_dgr-ds.dataFrameSubset.R index 39ac712ba..c9a8e176e 100644 --- a/tests/testthat/test-math_dgr-ds.dataFrameSubset.R +++ b/tests/testthat/test-math_dgr-ds.dataFrameSubset.R @@ -1,3 +1,10 @@ +#------------------------------------------------------------------------------- +# Copyright (c) 2019-2022 University of Newcastle upon Tyne. All rights reserved. +# Copyright (c) 2022-2025 Arjuna Technologies, Newcastle upon Tyne. All rights reserved. +# +# This program and the accompanying materials +# are made available under the terms of the GNU Public License v3.0. +# # You should have received a copy of the GNU General Public License # along with this program. If not, see . #------------------------------------------------------------------------------- @@ -6,7 +13,7 @@ # Set up # -context('ds.dataFrameSubset::expt_dgr::setup') +# context('ds.dataFrameSubset::expt_dgr::setup') source('connection_to_datasets/init_testing_datasets.R') source('definition_tests/def-ds.dataFrameSubset.R') @@ -15,7 +22,7 @@ source('definition_tests/def-ds.dataFrameSubset.R') # Tests # -context("ds.dataFrameSubset::math_dgr::closure::multiple") +# context("ds.dataFrameSubset::math_dgr::closure::multiple") test_that('server set %in% local set', { connect.all.datasets() @@ -33,7 +40,7 @@ test_that('server set %in% local set', # .closure.test("D","POSITIVE_NUMERIC","NON_NEGATIVE_NUMERIC","<=",FALSE,"subset.server",local.df.list) }) -context("ds.dataFrameSubset::math_dgr::closure::simple") +# context("ds.dataFrameSubset::math_dgr::closure::simple") test_that('server set %in% local set', { connect.dataset.2() diff --git a/tests/testthat/test-math_dgr-ds.skewness.R b/tests/testthat/test-math_dgr-ds.skewness.R index d6c8ab219..d743de0b1 100644 --- a/tests/testthat/test-math_dgr-ds.skewness.R +++ b/tests/testthat/test-math_dgr-ds.skewness.R @@ -1,7 +1,18 @@ +#------------------------------------------------------------------------------- +# Copyright (c) 2019-2022 University of Newcastle upon Tyne. All rights reserved. +# Copyright (c) 2022-2025 Arjuna Technologies, Newcastle upon Tyne. All rights reserved. +# +# This program and the accompanying materials +# are made available under the terms of the GNU Public License v3.0. +# +# You should have received a copy of the GNU General Public License +# along with this program. If not, see . +#------------------------------------------------------------------------------- + source("connection_to_datasets/init_testing_datasets.R") source("definition_tests/def-ds.skewness.R") -context("ds.skewness::math_dgr::mean.median.mode::multiple") +# context("ds.skewness::math_dgr::mean.median.mode::multiple") test_that("skewness >0 & mode0 & mode0 & Q3-Q2>Q2-Q1 or skewness<0 & Q3-Q2 appears valid in all sources") }) -context("ds.dataFrameSubset::smk::create a subset dataframe, based on scalar") +# context("ds.dataFrameSubset::smk::create a subset dataframe, based on scalar") test_that("dataFrameSubset_exists scalar", { myvectors <- c('D$LAB_TSC', 'D$LAB_HDL', 'D$PM_BMI_CATEGORICAL') ds.dataFrame(x=myvectors, newobj="unsubset_df") @@ -100,7 +101,7 @@ test_that("dataFrameSubset_exists scalar", { # Done # -context("ds.dataFrameSubset::smk::shutdown") +# context("ds.dataFrameSubset::smk::shutdown") test_that("shutdown", { ds_expect_variables(c("D", "unsubset_df", "subset_df")) @@ -108,4 +109,4 @@ test_that("shutdown", { disconnect.studies.dataset.cnsim() -context("ds.dataFrameSubset::smk::down") +# context("ds.dataFrameSubset::smk::down") diff --git a/tests/testthat/test-smk-ds.dim.R b/tests/testthat/test-smk-ds.dim.R index c1d1d9b5a..3c8caf0e1 100644 --- a/tests/testthat/test-smk-ds.dim.R +++ b/tests/testthat/test-smk-ds.dim.R @@ -1,5 +1,6 @@ #------------------------------------------------------------------------------- # Copyright (c) 2019-2022 University of Newcastle upon Tyne. All rights reserved. +# Copyright (c) 2022-2025 Arjuna Technologies, Newcastle upon Tyne. All rights reserved. # # This program and the accompanying materials # are made available under the terms of the GNU Public License v3.0. @@ -12,7 +13,7 @@ # Set up # -context("ds.dim::smk::setup") +# context("ds.dim::smk::setup") connect.studies.dataset.cnsim(list("LAB_TSC")) @@ -24,7 +25,7 @@ test_that("setup", { # Tests # -context("ds.dim::smk") +# context("ds.dim::smk") test_that("simple dim, both", { dim.res <- ds.dim('D', type='both') @@ -43,7 +44,7 @@ test_that("simple dim, both", { expect_equal(dim.res$`dimensions of D in combined studies`[[2]], 1) }) -context("ds.dim::smk") +# context("ds.dim::smk") test_that("simple dim, split", { dim.res <- ds.dim('D', type='split') @@ -59,7 +60,7 @@ test_that("simple dim, split", { expect_equal(dim.res$`dimensions of D in sim3`[[2]], 1) }) -context("ds.dim::smk") +# context("ds.dim::smk") test_that("simple dim, combine", { dim.res <- ds.dim('D', type='combine') @@ -73,7 +74,7 @@ test_that("simple dim, combine", { # Done # -context("ds.dim::smk::shutdown") +# context("ds.dim::smk::shutdown") test_that("shutdown", { ds_expect_variables(c("D")) @@ -81,4 +82,4 @@ test_that("shutdown", { disconnect.studies.dataset.cnsim() -context("ds.dim::smk::done") +# context("ds.dim::smk::done") diff --git a/tests/testthat/test-smk-ds.dmtC2S.R b/tests/testthat/test-smk-ds.dmtC2S.R index fb56fb435..5a1ba2737 100644 --- a/tests/testthat/test-smk-ds.dmtC2S.R +++ b/tests/testthat/test-smk-ds.dmtC2S.R @@ -1,6 +1,6 @@ #------------------------------------------------------------------------------- # Copyright (c) 2019-2022 University of Newcastle upon Tyne. All rights reserved. -# Copyright (c) 2022 Arjuna Technologies, Newcastle upon Tyne. All rights reserved. +# Copyright (c) 2022-2025 Arjuna Technologies, Newcastle upon Tyne. All rights reserved. # # This program and the accompanying materials # are made available under the terms of the GNU Public License v3.0. @@ -13,7 +13,7 @@ # Set up # -context("ds.dmtC2S::smk::setup") +# context("ds.dmtC2S::smk::setup") connect.studies.dataset.cnsim(list("LAB_TSC")) @@ -25,7 +25,7 @@ test_that("setup", { # Tests # -context("ds.dmtC2S::smk::data.frame") +# context("ds.dmtC2S::smk::data.frame") test_that("simple dmtC2S - data.frame", { a <- data.frame(c(1, 2, 3, 4)) b <- data.frame(c(2, 3, 4, 1)) @@ -44,7 +44,7 @@ test_that("simple dmtC2S - data.frame", { expect_true(all(c("data.frame") %in% res.class$sim3)) }) -context("ds.dmtC2S::smk::matrix") +# context("ds.dmtC2S::smk::matrix") test_that("simple dmtC2S - matrix", { a <- c(1, 2, 3, 4, 2, 3, 4, 1, 3) cm <- matrix(a, nrow = 3, ncol = 3, byrow = TRUE) @@ -61,7 +61,7 @@ test_that("simple dmtC2S - matrix", { expect_true(all(c("matrix", "array") %in% res.class$sim3)) }) -context("ds.dmtC2S::smk::tibble") +# context("ds.dmtC2S::smk::tibble") test_that("simple dmtC2S - tibble", { a <- data.frame(c(1, 2, 3, 4)) b <- data.frame(c(2, 3, 4, 1)) @@ -84,7 +84,7 @@ test_that("simple dmtC2S - tibble", { # Done # -context("ds.dmtC2S::smk::shutdown") +# context("ds.dmtC2S::smk::shutdown") test_that("setup", { ds_expect_variables(c("D", "dataframe.newobj", "matrix.newobj", "tibble.newobj")) @@ -92,4 +92,4 @@ test_that("setup", { disconnect.studies.dataset.cnsim() -context("ds.dmtC2S::smk::done") +# context("ds.dmtC2S::smk::done") diff --git a/tests/testthat/test-smk-ds.elspline.R b/tests/testthat/test-smk-ds.elspline.R index 72753d624..aa8d3d787 100644 --- a/tests/testthat/test-smk-ds.elspline.R +++ b/tests/testthat/test-smk-ds.elspline.R @@ -1,5 +1,6 @@ #------------------------------------------------------------------------------- # Copyright (c) 2019-2022 University of Newcastle upon Tyne. All rights reserved. +# Copyright (c) 2022-2025 Arjuna Technologies, Newcastle upon Tyne. All rights reserved. # # This program and the accompanying materials # are made available under the terms of the GNU Public License v3.0. @@ -12,7 +13,7 @@ # Set up # -context("ds.elspline::smk::setup") +# context("ds.elspline::smk::setup") connect.studies.dataset.cnsim(list("LAB_TRIG", "PM_BMI_CONTINUOUS")) @@ -24,7 +25,7 @@ test_that("setup", { # Tests # -context("ds.elspline::smk::test1") +# context("ds.elspline::smk::test1") test_that("elspline", { ds.elspline(x="D$PM_BMI_CONTINUOUS", n=3, newobj="elsplineDS", datasources=ds.test_env$connections) @@ -74,7 +75,7 @@ test_that("elspline", { }) -context("ds.elspline::smk::test2") +# context("ds.elspline::smk::test2") test_that("elspline", { ds.elspline(x="D$PM_BMI_CONTINUOUS", n=5, newobj="elsplineDS2", datasources=ds.test_env$connections) @@ -132,7 +133,7 @@ test_that("elspline", { # Done # -context("ds.elspline::smk::shutdown") +# context("ds.elspline::smk::shutdown") test_that("shutdown", { ds_expect_variables(c("D", "elsplineDS", "elsplineDS2", "LAB_TRIG")) @@ -140,4 +141,4 @@ test_that("shutdown", { disconnect.studies.dataset.cnsim() -context("ds.elspline::smk::done") +# context("ds.elspline::smk::done") diff --git a/tests/testthat/test-smk-ds.exists.R b/tests/testthat/test-smk-ds.exists.R index 4590bbe44..5f95ea242 100644 --- a/tests/testthat/test-smk-ds.exists.R +++ b/tests/testthat/test-smk-ds.exists.R @@ -1,5 +1,6 @@ #------------------------------------------------------------------------------- # Copyright (c) 2019-2022 University of Newcastle upon Tyne. All rights reserved. +# Copyright (c) 2022-2025 Arjuna Technologies, Newcastle upon Tyne. All rights reserved. # # This program and the accompanying materials # are made available under the terms of the GNU Public License v3.0. @@ -12,7 +13,7 @@ # Set up # -context("ds.exists::smk::setup") +# context("ds.exists::smk::setup") connect.studies.dataset.cnsim(list("LAB_TSC")) @@ -24,7 +25,7 @@ test_that("setup", { # Tests # -context("ds.exists::smk") +# context("ds.exists::smk") test_that("simple exists", { res <- ds.exists("no_exists_obj") @@ -39,7 +40,7 @@ test_that("simple exists", { # ds.exists(...) can't be used to check within environment -context("ds.exists::smk") +# context("ds.exists::smk") test_that("simple exists, with dollar", { res <- ds.exists('D$LAB_TSC') @@ -52,7 +53,7 @@ test_that("simple exists, with dollar", { expect_equal(res$sim3, FALSE) }) -context("ds.exists::smk") +# context("ds.exists::smk") test_that("simple exists", { ds.assign('D$LAB_TSC', 'exists_obj') @@ -71,7 +72,7 @@ test_that("simple exists", { # Done # -context("ds.exists::smk::shutdown") +# context("ds.exists::smk::shutdown") test_that("shutdown", { ds_expect_variables(c("D", "exists_obj")) @@ -79,4 +80,4 @@ test_that("shutdown", { disconnect.studies.dataset.cnsim() -context("ds.exists::smk::done") +# context("ds.exists::smk::done") diff --git a/tests/testthat/test-smk-ds.exp.R b/tests/testthat/test-smk-ds.exp.R index af09ede61..fa850fb81 100644 --- a/tests/testthat/test-smk-ds.exp.R +++ b/tests/testthat/test-smk-ds.exp.R @@ -1,5 +1,6 @@ #------------------------------------------------------------------------------- # Copyright (c) 2019-2022 University of Newcastle upon Tyne. All rights reserved. +# Copyright (c) 2022-2025 Arjuna Technologies, Newcastle upon Tyne. All rights reserved. # # This program and the accompanying materials # are made available under the terms of the GNU Public License v3.0. @@ -12,7 +13,7 @@ # Set up # -context("ds.exp::smk::setup") +# context("ds.exp::smk::setup") connect.studies.dataset.cnsim(list("LAB_TSC")) @@ -24,7 +25,7 @@ test_that("setup", { # Tests # -context("ds.exp::smk") +# context("ds.exp::smk") test_that("simple exp", { res1 <- ds.exp("D$LAB_TSC", newobj="exp1_obj") @@ -81,7 +82,7 @@ test_that("simple exp", { # Done # -context("ds.exp::smk::shutdown") +# context("ds.exp::smk::shutdown") test_that("shutdown", { ds_expect_variables(c("D", "exp1_obj", "new_data", "exp2_obj")) @@ -89,4 +90,4 @@ test_that("shutdown", { disconnect.studies.dataset.cnsim() -context("ds.exp::smk::done") +# context("ds.exp::smk::done") diff --git a/tests/testthat/test-smk-ds.gamlss.R b/tests/testthat/test-smk-ds.gamlss.R index c9c084e44..1e4ad232c 100644 --- a/tests/testthat/test-smk-ds.gamlss.R +++ b/tests/testthat/test-smk-ds.gamlss.R @@ -1,5 +1,6 @@ #------------------------------------------------------------------------------- # Copyright (c) 2019-2022 University of Newcastle upon Tyne. All rights reserved. +# Copyright (c) 2022-2025 Arjuna Technologies, Newcastle upon Tyne. All rights reserved. # # This program and the accompanying materials # are made available under the terms of the GNU Public License v3.0. @@ -12,7 +13,7 @@ # Set up # -context("ds.gamlss::smk::setup") +# context("ds.gamlss::smk::setup") connect.studies.dataset.gamlss(list("e3_bw", "e3_gac_None", "hs_zbmi_who", "hs_child_age_None", "h_mbmi_None", "hs_correct_raven", "hs_wgtgain_None")) @@ -25,7 +26,7 @@ test_that("setup", { # Tests # -context("ds.gamlss::smk::mod1") +# context("ds.gamlss::smk::mod1") test_that("gamlss, birth weight", { model_e3_bw.DS <- ds.gamlss(formula = 'e3_bw ~ e3_gac_None', sigma.formula = 'e3_bw ~ e3_gac_None', @@ -111,7 +112,7 @@ test_that("gamlss, birth weight", { expect_equal(as.numeric(model_e3_bw.DS$study1$centiles[9,'per']), 99.3410214, tolerance=1e-7) }) -context("ds.gamlss::smk::mod2") +# context("ds.gamlss::smk::mod2") test_that("gamlss, Z BMI", { model_zbmi_who.DS <- ds.gamlss(formula = 'hs_zbmi_who ~ hs_child_age_None+h_mbmi_None', sigma.formula = 'hs_zbmi_who ~ hs_child_age_None', @@ -199,7 +200,7 @@ test_that("gamlss, Z BMI", { }) -context("ds.gamlss::smk::mod3") +# context("ds.gamlss::smk::mod3") test_that("gamlss, RAVEN TEST", { ds.dataFrameSort(df.name = 'D', sort.key.name = 'D$hs_correct_raven', newobj = 'D2') @@ -291,7 +292,7 @@ test_that("gamlss, RAVEN TEST", { expect_equal(as.numeric(model_correct_raven.DS$study1$centiles[9,'per']), 100.000000, tolerance=1e-7) }) -context("ds.gamlss::smk::mod4") +# context("ds.gamlss::smk::mod4") test_that("gamlss, WEIGHT GAIN", { model_wgtgain.DS <- ds.gamlss(formula = 'hs_wgtgain_None ~ (e3_bw)', sigma.formula = 'hs_wgtgain_None ~ (e3_bw)', @@ -381,7 +382,7 @@ test_that("gamlss, WEIGHT GAIN", { # Done # -context("ds.gamlss::smk::shutdown") +# context("ds.gamlss::smk::shutdown") test_that("shutdown", { ds_expect_variables(c("D", "D2", "z_scores_e3_bw", "z_scores_hs_correct_raven", "z_scores_hs_wgtgain_None", @@ -390,4 +391,4 @@ test_that("shutdown", { disconnect.studies.dataset.gamlss() -context("ds.gamlss::smk::done") +# context("ds.gamlss::smk::done") diff --git a/tests/testthat/test-smk-ds.getWGSR.R b/tests/testthat/test-smk-ds.getWGSR.R index b11e59993..c5034a717 100644 --- a/tests/testthat/test-smk-ds.getWGSR.R +++ b/tests/testthat/test-smk-ds.getWGSR.R @@ -1,5 +1,6 @@ #------------------------------------------------------------------------------- # Copyright (c) 2019-2022 University of Newcastle upon Tyne. All rights reserved. +# Copyright (c) 2022-2025 Arjuna Technologies, Newcastle upon Tyne. All rights reserved. # # This program and the accompanying materials # are made available under the terms of the GNU Public License v3.0. @@ -12,7 +13,7 @@ # Set up # -context("ds.getWGSR::smk::setup") +# context("ds.getWGSR::smk::setup") connect.studies.dataset.anthro(list("age", "sex", "weight", "height", "muac")) @@ -24,7 +25,7 @@ test_that("setup", { # Tests # -context("ds.getWGSR::smk") +# context("ds.getWGSR::smk") test_that("simple getWGSR", { res <- ds.getWGSR('D$sex', 'D$weight', 'D$height', 'wfh', newobj='newobj.getwgsr') @@ -61,7 +62,7 @@ test_that("simple getWGSR", { # Done # -context("ds.getWGSR::smk::shutdown") +# context("ds.getWGSR::smk::shutdown") test_that("shutdown", { ds_expect_variables(c("D", "newobj.getwgsr")) @@ -69,4 +70,4 @@ test_that("shutdown", { disconnect.studies.dataset.cnsim() -context("ds.getWGSR::smk::done") +# context("ds.getWGSR::smk::done") diff --git a/tests/testthat/test-smk-ds.glm-binomial.R b/tests/testthat/test-smk-ds.glm-binomial.R index 133a93e18..666188efd 100644 --- a/tests/testthat/test-smk-ds.glm-binomial.R +++ b/tests/testthat/test-smk-ds.glm-binomial.R @@ -1,5 +1,6 @@ #------------------------------------------------------------------------------- # Copyright (c) 2018-2022 University of Newcastle upon Tyne. All rights reserved. +# Copyright (c) 2022-2025 Arjuna Technologies, Newcastle upon Tyne. All rights reserved. # # This program and the accompanying materials # are made available under the terms of the GNU Public License v3.0. @@ -12,7 +13,7 @@ # Set up # -context("ds.glm::smk::binomial::setup") +# context("ds.glm::smk::binomial::setup") connect.studies.dataset.cnsim(list("DIS_DIAB", "GENDER", "PM_BMI_CONTINUOUS", "LAB_HDL")) @@ -24,7 +25,7 @@ test_that("setup", { # Tests # -context("ds.glm::smk::binomial") +# context("ds.glm::smk::binomial") test_that("glm_binomial", { res <- ds.glm('D$DIS_DIAB~D$GENDER*D$PM_BMI_CONTINUOUS+D$LAB_HDL', family="binomial", checks=FALSE) @@ -50,7 +51,7 @@ test_that("glm_binomial", { expect_equal(res$output.information, "SEE TOP OF OUTPUT FOR INFORMATION ON MISSING DATA AND ERROR MESSAGES") }) -context("ds.glm::smk::binomial, with check") +# context("ds.glm::smk::binomial, with check") test_that("glm_binomial, with check", { expect_warning(res <- ds.glm('D$DIS_DIAB~D$GENDER*D$PM_BMI_CONTINUOUS+D$LAB_HDL', family="binomial", checks=TRUE), "NAs introduced by coercion") @@ -80,7 +81,7 @@ test_that("glm_binomial, with check", { # Done # -context("ds.glm::smk::binomial::shutdown") +# context("ds.glm::smk::binomial::shutdown") test_that("shutdown", { ds_expect_variables(c("D", "DIS_DIAB", "GENDER", "LAB_HDL", "PM_BMI_CONTINUOUS")) @@ -88,4 +89,4 @@ test_that("shutdown", { disconnect.studies.dataset.cnsim() -context("ds.glm::smk::binomial::done") +# context("ds.glm::smk::binomial::done") diff --git a/tests/testthat/test-smk-ds.glm-gaussian.R b/tests/testthat/test-smk-ds.glm-gaussian.R index f482d54b7..569fbdd91 100644 --- a/tests/testthat/test-smk-ds.glm-gaussian.R +++ b/tests/testthat/test-smk-ds.glm-gaussian.R @@ -1,5 +1,6 @@ #------------------------------------------------------------------------------- # Copyright (c) 2018-2022 University of Newcastle upon Tyne. All rights reserved. +# Copyright (c) 2022-2025 Arjuna Technologies, Newcastle upon Tyne. All rights reserved. # # This program and the accompanying materials # are made available under the terms of the GNU Public License v3.0. @@ -12,7 +13,7 @@ # Set up # -context("ds.glm::smk::gaussian::setup") +# context("ds.glm::smk::gaussian::setup") connect.studies.dataset.cnsim(list("LAB_TSC", "LAB_TRIG")) @@ -24,7 +25,7 @@ test_that("setup", { # Tests # -context("ds.glm::smk::gaussian") +# context("ds.glm::smk::gaussian") test_that("glm_gaussian", { res <- ds.glm('D$LAB_TSC~D$LAB_TRIG',family="gaussian",checks=FALSE) @@ -50,7 +51,7 @@ test_that("glm_gaussian", { expect_equal(res$output.information, "SEE TOP OF OUTPUT FOR INFORMATION ON MISSING DATA AND ERROR MESSAGES") }) -context("ds.glm::smk::gaussian, with check") +# context("ds.glm::smk::gaussian, with check") test_that("glm_gaussian, with check", { expect_warning(res <- ds.glm('D$LAB_TSC~D$LAB_TRIG', family="gaussian", checks=TRUE), "NAs introduced by coercion") @@ -80,7 +81,7 @@ test_that("glm_gaussian, with check", { # Done # -context("ds.glm::smk::gaussian::shutdown") +# context("ds.glm::smk::gaussian::shutdown") test_that("shutdown", { ds_expect_variables(c("D", "LAB_TRIG", "LAB_TSC")) @@ -88,4 +89,4 @@ test_that("shutdown", { disconnect.studies.dataset.cnsim() -context("ds.glm::smk::gaussian::done") +# context("ds.glm::smk::gaussian::done") diff --git a/tests/testthat/test-smk-ds.glm-poisson.R b/tests/testthat/test-smk-ds.glm-poisson.R index a8385bfb4..19c56ebc7 100644 --- a/tests/testthat/test-smk-ds.glm-poisson.R +++ b/tests/testthat/test-smk-ds.glm-poisson.R @@ -1,5 +1,6 @@ #------------------------------------------------------------------------------- # Copyright (c) 2018-2022 University of Newcastle upon Tyne. All rights reserved. +# Copyright (c) 2022-2025 Arjuna Technologies, Newcastle upon Tyne. All rights reserved. # # This program and the accompanying materials # are made available under the terms of the GNU Public License v3.0. @@ -12,7 +13,7 @@ # Set up # -context("ds.glm::smk::poisson::setup") +# context("ds.glm::smk::poisson::setup") connect.studies.dataset.survival(list("survtime", "time.id", "female", "age.60")) @@ -24,7 +25,7 @@ test_that("setup", { # Tests # -context("ds.glm::smk::poisson") +# context("ds.glm::smk::poisson") test_that("glm_gaussian", { res <- ds.glm("D$survtime~1+D$time.id+D$female", family="poisson", checks=FALSE) @@ -50,7 +51,7 @@ test_that("glm_gaussian", { expect_equal(res$output.information, "SEE TOP OF OUTPUT FOR INFORMATION ON MISSING DATA AND ERROR MESSAGES") }) -context("ds.glm::smk::poisson, with check") +# context("ds.glm::smk::poisson, with check") test_that("glm_gaussian, which check", { expect_warning(res <- ds.glm("D$survtime~1+D$time.id+D$female", family="poisson", checks=TRUE), "NAs introduced by coercion") @@ -80,7 +81,7 @@ test_that("glm_gaussian, which check", { # Done # -context("ds.glm::smk::poisson::shutdown") +# context("ds.glm::smk::poisson::shutdown") test_that("shutdown", { ds_expect_variables(c("D", "female", "survtime", "time.id")) @@ -88,4 +89,4 @@ test_that("shutdown", { disconnect.studies.dataset.survival() -context("ds.glm::smk::poisson::done") +# context("ds.glm::smk::poisson::done") diff --git a/tests/testthat/test-smk-ds.glmPredict-binomial.R b/tests/testthat/test-smk-ds.glmPredict-binomial.R index 59ec5438d..12570b9c5 100644 --- a/tests/testthat/test-smk-ds.glmPredict-binomial.R +++ b/tests/testthat/test-smk-ds.glmPredict-binomial.R @@ -1,5 +1,6 @@ #------------------------------------------------------------------------------- # Copyright (c) 2019-2022 University of Newcastle upon Tyne. All rights reserved. +# Copyright (c) 2022-2025 Arjuna Technologies, Newcastle upon Tyne. All rights reserved. # # This program and the accompanying materials # are made available under the terms of the GNU Public License v3.0. @@ -12,7 +13,7 @@ # Set up # -context("ds.glmPredict::smk::binomial::setup") +# context("ds.glmPredict::smk::binomial::setup") connect.studies.dataset.cnsim(list("LAB_TSC", "LAB_TRIG", "DIS_AMI", "DIS_DIAB", "GENDER")) @@ -24,7 +25,7 @@ test_that("setup", { # Tests # -context("ds.glmPredict::smk::binomial::without_newobj") +# context("ds.glmPredict::smk::binomial::without_newobj") test_that("simple glmPredict, binomial, without newobj, se.fit=FALSE",{ glmSLMA.res <- ds.glmSLMA('D$DIS_DIAB~D$LAB_TRIG', family="binomial", newobj="binomial.glmslma.obj") @@ -106,7 +107,7 @@ test_that("simple glmPredict, binomial, without newobj, se.fit=FALSE",{ }) -context("ds.glmPredict::smk::binomial::with_newobj") +# context("ds.glmPredict::smk::binomial::with_newobj") test_that("simple glmPredict, binomial, with newobj, se.fit=FALSE", { glmSLMA.res <- ds.glmSLMA('D$DIS_DIAB~D$LAB_TRIG', family="binomial", newobj="binomial.glmslma.obj") @@ -187,7 +188,7 @@ test_that("simple glmPredict, binomial, with newobj, se.fit=FALSE", { expect_equal(res$sim3$safe.list$fit.quantiles[[7]], 0.029020811, tolerance = ds.test_env$tolerance) }) -context("ds.glmPredict::smk::binomial::sefit_true") +# context("ds.glmPredict::smk::binomial::sefit_true") test_that("simple glmPredict, binomial, with newobj, se.fit=TRUE", { glmSLMA.res <- ds.glmSLMA('D$DIS_DIAB~D$LAB_TRIG', family="binomial", newobj="binomial.glmslma.obj") @@ -318,7 +319,7 @@ test_that("simple glmPredict, binomial, with newobj, se.fit=TRUE", { # Shutdown # -context("ds.glmPredict::smk::binomial::shutdown") +# context("ds.glmPredict::smk::binomial::shutdown") test_that("shutdown", { ds_expect_variables(c("D", "binomial.glmslma.obj", "binomial.glm.predict.obj", "binomial.glm.predict.sefit.obj", "predict_glm" )) @@ -330,4 +331,4 @@ disconnect.studies.dataset.cnsim() # Done # -context("ds.glmPredict::smk::binomial::done") +# context("ds.glmPredict::smk::binomial::done") diff --git a/tests/testthat/test-smk-ds.glmPredict-gaussian.R b/tests/testthat/test-smk-ds.glmPredict-gaussian.R index e810f118c..934aba3e7 100644 --- a/tests/testthat/test-smk-ds.glmPredict-gaussian.R +++ b/tests/testthat/test-smk-ds.glmPredict-gaussian.R @@ -1,5 +1,6 @@ #------------------------------------------------------------------------------- # Copyright (c) 2019-2022 University of Newcastle upon Tyne. All rights reserved. +# Copyright (c) 2022-2025 Arjuna Technologies, Newcastle upon Tyne. All rights reserved. # # This program and the accompanying materials # are made available under the terms of the GNU Public License v3.0. @@ -12,7 +13,7 @@ # Set up # -context("ds.glmPredict::smk::gaussian::setup") +# context("ds.glmPredict::smk::gaussian::setup") connect.studies.dataset.cnsim(list("LAB_TSC", "LAB_TRIG", "DIS_AMI", "DIS_DIAB", "GENDER")) @@ -23,7 +24,7 @@ test_that("setup", { # # Tests # -context("ds.glmPredict::smk::gaussian::without_newobj") +# context("ds.glmPredict::smk::gaussian::without_newobj") test_that("simple glmPredict, gaussian, without newobj, se.fit=FALSE",{ glmSLMA.res <- ds.glmSLMA('D$LAB_TSC~D$LAB_TRIG', family="gaussian", newobj="gaussian.glmslma.obj") @@ -104,7 +105,7 @@ test_that("simple glmPredict, gaussian, without newobj, se.fit=FALSE",{ expect_equal(res$sim3$safe.list$fit.quantiles[[7]], 6.054574, tolerance = ds.test_env$tolerance) }) -context("ds.glmPredict::smk::gaussian::with_newobj") +# context("ds.glmPredict::smk::gaussian::with_newobj") test_that("simple glmPredict, gaussian, with newobj, se.fit=FALSE", { glmSLMA.res <- ds.glmSLMA('D$LAB_TSC~D$LAB_TRIG', family="gaussian", newobj="gaussian.glmslma.obj") @@ -185,7 +186,7 @@ test_that("simple glmPredict, gaussian, with newobj, se.fit=FALSE", { expect_equal(res$sim3$safe.list$fit.quantiles[[7]], 6.054574, tolerance = ds.test_env$tolerance) }) -context("ds.glmPredict::smk::gaussian::sefit_true") +# context("ds.glmPredict::smk::gaussian::sefit_true") test_that("simple glmPredict, gaussian, with newobj, se.fit=TRUE", { glmSLMA.res <- ds.glmSLMA('D$LAB_TSC~D$LAB_TRIG', family="gaussian", newobj="gaussian.glmslma.obj") @@ -316,7 +317,7 @@ test_that("simple glmPredict, gaussian, with newobj, se.fit=TRUE", { # Shutdown # -context("ds.glmPredict::smk::gaussian::shutdown") +# context("ds.glmPredict::smk::gaussian::shutdown") test_that("shutdown", { ds_expect_variables(c("D", "gaussian.glm.predict.obj", "gaussian.glm.predict.sefit.obj", "gaussian.glmslma.obj", "predict_glm" )) @@ -328,4 +329,4 @@ disconnect.studies.dataset.cnsim() # Done # -context("ds.glmPredict::smk::gaussian::done") +# context("ds.glmPredict::smk::gaussian::done") diff --git a/tests/testthat/test-smk-ds.glmPredict-poisson.R b/tests/testthat/test-smk-ds.glmPredict-poisson.R index 83a0af2b1..d8f830c14 100644 --- a/tests/testthat/test-smk-ds.glmPredict-poisson.R +++ b/tests/testthat/test-smk-ds.glmPredict-poisson.R @@ -1,5 +1,6 @@ #------------------------------------------------------------------------------- # Copyright (c) 2019-2022 University of Newcastle upon Tyne. All rights reserved. +# Copyright (c) 2022-2025 Arjuna Technologies, Newcastle upon Tyne. All rights reserved. # # This program and the accompanying materials # are made available under the terms of the GNU Public License v3.0. @@ -12,7 +13,7 @@ # Set up # -context("ds.glmPredict::smk::poisson::setup") +# context("ds.glmPredict::smk::poisson::setup") connect.studies.dataset.cnsim(list("LAB_TSC", "LAB_TRIG", "DIS_AMI", "DIS_DIAB", "GENDER")) @@ -24,7 +25,7 @@ test_that("setup", { # Tests # -context("ds.glmPredict::smk::poisson::without_newobj") +# context("ds.glmPredict::smk::poisson::without_newobj") test_that("simple glmPredict, poisson, without newobj, se.fit=FALSE", { glmSLMA.res <- ds.glmSLMA('D$LAB_TSC~D$LAB_TRIG', family="poisson", newobj="poisson.glmslma.obj") @@ -105,7 +106,7 @@ test_that("simple glmPredict, poisson, without newobj, se.fit=FALSE", { expect_equal(res$sim3$safe.list$fit.quantiles[[7]], 6.056664, tolerance = ds.test_env$tolerance) }) -context("ds.glmPredict::smk::poisson::with_newobj") +# context("ds.glmPredict::smk::poisson::with_newobj") test_that("simple glmPredict, poisson, with newobj, se.fit=FALSE", { glmSLMA.res <- ds.glmSLMA('D$LAB_TSC~D$LAB_TRIG', family="poisson", newobj="poisson.glmslma.obj") @@ -186,7 +187,7 @@ test_that("simple glmPredict, poisson, with newobj, se.fit=FALSE", { expect_equal(res$sim3$safe.list$fit.quantiles[[7]], 6.056664, tolerance = ds.test_env$tolerance) }) -context("ds.glmPredict::smk::poisson::sefit_true") +# context("ds.glmPredict::smk::poisson::sefit_true") test_that("simple glmPredict, poisson, with newobj, se.fit=TRUE", { glmSLMA.res <- ds.glmSLMA('D$LAB_TSC~D$LAB_TRIG', family="poisson", newobj="poisson.glmslma.obj") @@ -316,7 +317,7 @@ test_that("simple glmPredict, poisson, with newobj, se.fit=TRUE", { # Shutdown # -context("ds.glmPredict::smk::poisson::shutdown") +# context("ds.glmPredict::smk::poisson::shutdown") test_that("shutdown", { ds_expect_variables(c("D", "poisson.glm.predict.obj", "poisson.glm.predict.sefit.obj", "poisson.glmslma.obj", "predict_glm" )) @@ -328,4 +329,4 @@ disconnect.studies.dataset.cnsim() # Done # -context("ds.glmPredict::smk::poisson::done") +# context("ds.glmPredict::smk::poisson::done") diff --git a/tests/testthat/test-smk-ds.glmSLMA.R b/tests/testthat/test-smk-ds.glmSLMA.R index 37532ba44..b0769bfdf 100644 --- a/tests/testthat/test-smk-ds.glmSLMA.R +++ b/tests/testthat/test-smk-ds.glmSLMA.R @@ -1,5 +1,6 @@ #------------------------------------------------------------------------------- # Copyright (c) 2019-2022 University of Newcastle upon Tyne. All rights reserved. +# Copyright (c) 2022-2025 Arjuna Technologies, Newcastle upon Tyne. All rights reserved. # # This program and the accompanying materials # are made available under the terms of the GNU Public License v3.0. @@ -12,7 +13,7 @@ # Set up # -context("ds.glmSLMA::smk::setup") +# context("ds.glmSLMA::smk::setup") connect.studies.dataset.cnsim(list("LAB_TSC", "LAB_TRIG", "MEDI_LPD", "DIS_AMI", "DIS_DIAB", "GENDER")) @@ -24,7 +25,7 @@ test_that("setup", { # Tests # -context("ds.glmSLMA::smk::gaussian") +# context("ds.glmSLMA::smk::gaussian") test_that("simple glmSLMA, gaussian", { glmSLMA.res <- ds.glmSLMA('D$LAB_TSC~D$LAB_TRIG', family="gaussian") @@ -77,7 +78,7 @@ test_that("simple glmSLMA, gaussian", { expect_equal(glmSLMA.res$validity.check, " appears valid in all sources") }) -context("ds.glmSLMA::smk::gaussian-assigned") +# context("ds.glmSLMA::smk::gaussian-assigned") test_that("simple glmSLMA, gaussian-assigned", { glmSLMA.res <- ds.glmSLMA('D$LAB_TSC~D$LAB_TRIG', family="gaussian", newobj="glmSLMA_1.newobj") @@ -130,7 +131,7 @@ test_that("simple glmSLMA, gaussian-assigned", { expect_equal(glmSLMA.res$validity.check, " appears valid in all sources") }) -context("ds.glmSLMA::smk::binomial") +# context("ds.glmSLMA::smk::binomial") test_that("simple glmSLMA, binomial", { ds.asCharacter('D$MEDI_LPD', 'str.medi.lpd') ds.asNumeric('str.medi.lpd', 'num.medi.lpd') @@ -190,7 +191,7 @@ test_that("simple glmSLMA, binomial", { expect_equal(glmSLMA.res$validity.check, " appears valid in all sources") }) -context("ds.glmSLMA::smk::binomial-assigned") +# context("ds.glmSLMA::smk::binomial-assigned") test_that("simple glmSLMA, binomial-assigned", { ds.asCharacter('D$MEDI_LPD', 'str.medi.lpd') ds.asNumeric('str.medi.lpd', 'num.medi.lpd') @@ -250,7 +251,7 @@ test_that("simple glmSLMA, binomial-assigned", { expect_equal(glmSLMA.res$validity.check, " appears valid in all sources") }) -context("ds.glmSLMA::smk::poisson") +# context("ds.glmSLMA::smk::poisson") test_that("simple glmSLMA, poisson", { glmSLMA.res <- ds.glmSLMA('D$LAB_TSC~D$LAB_TRIG', family="poisson") @@ -303,7 +304,7 @@ test_that("simple glmSLMA, poisson", { expect_equal(glmSLMA.res$validity.check, " appears valid in all sources") }) -context("ds.glmSLMA::smk::poisson-assigned") +# context("ds.glmSLMA::smk::poisson-assigned") test_that("simple glmSLMA, poisson-assigned", { glmSLMA.res <- ds.glmSLMA('D$LAB_TSC~D$LAB_TRIG', family="poisson", newobj="glmSLMA_3.newobj") @@ -360,7 +361,7 @@ test_that("simple glmSLMA, poisson-assigned", { # Done # -context("ds.glmSLMA::smk::shutdown") +# context("ds.glmSLMA::smk::shutdown") test_that("shutdown", { ds_expect_variables(c("D", "new.glm.obj", "glmSLMA_1.newobj", "glmSLMA_2.newobj", "glmSLMA_3.newobj", "num.medi.lpd", "num.dis.diab", "num.gender", "str.medi.lpd", "str.dis.diab", "str.gender")) @@ -369,4 +370,4 @@ test_that("shutdown", { disconnect.studies.dataset.cnsim() -context("ds.glmSLMA::smk::done") +# context("ds.glmSLMA::smk::done") diff --git a/tests/testthat/test-smk-ds.glmSummary.R b/tests/testthat/test-smk-ds.glmSummary.R index 68efb105e..c6a827dfc 100644 --- a/tests/testthat/test-smk-ds.glmSummary.R +++ b/tests/testthat/test-smk-ds.glmSummary.R @@ -1,5 +1,6 @@ #------------------------------------------------------------------------------- # Copyright (c) 2019-2022 University of Newcastle upon Tyne. All rights reserved. +# Copyright (c) 2022-2025 Arjuna Technologies, Newcastle upon Tyne. All rights reserved. # # This program and the accompanying materials # are made available under the terms of the GNU Public License v3.0. @@ -12,7 +13,7 @@ # Set up # -context("ds.glmSummary::smk::setup") +# context("ds.glmSummary::smk::setup") connect.studies.dataset.cnsim(list("LAB_TSC", "LAB_TRIG", "DIS_AMI", "DIS_DIAB", "GENDER")) @@ -24,7 +25,7 @@ test_that("setup", { # Tests # -context("ds.glmSummary::smk::gaussian") +# context("ds.glmSummary::smk::gaussian") test_that("simple glmSummary, gaussian, without newobj", { glmSLMA.res <- ds.glmSLMA('D$LAB_TSC~D$LAB_TRIG', family="gaussian", newobj="gaussian.glmslma.obj") @@ -87,7 +88,7 @@ test_that("simple glmSummary, gaussian", { expect_equal(class(res$sim3$glm.summary.obj), 'summary.glm') }) -context("ds.glmSummary::smk::poisson") +# context("ds.glmSummary::smk::poisson") test_that("simple glmSummary, poisson, without newobj", { glmSLMA.res <- ds.glmSLMA('D$LAB_TSC~D$LAB_TRIG', family="poisson", newobj="poisson.glmslma.obj") @@ -154,7 +155,7 @@ test_that("simple glmSummary, poisson", { # Shutdown # -context("ds.glmSummary::smk::shutdown") +# context("ds.glmSummary::smk::shutdown") test_that("shutdown", { ds_expect_variables(c("D", "gaussian.glmslma.obj", "gaussian.glmsummary.obj", "poisson.glmslma.obj", "poisson.glmsummary.obj", "summary_glm.newobj")) @@ -166,4 +167,4 @@ disconnect.studies.dataset.cnsim() # Done # -context("ds.glmSummary::smk::done") +# context("ds.glmSummary::smk::done") diff --git a/tests/testthat/test-smk-ds.glmerSLMA.R b/tests/testthat/test-smk-ds.glmerSLMA.R index 0d9720063..4ad25a02f 100644 --- a/tests/testthat/test-smk-ds.glmerSLMA.R +++ b/tests/testthat/test-smk-ds.glmerSLMA.R @@ -1,5 +1,6 @@ #------------------------------------------------------------------------------- # Copyright (c) 2019-2022 University of Newcastle upon Tyne. All rights reserved. +# Copyright (c) 2022-2025 Arjuna Technologies, Newcastle upon Tyne. All rights reserved. # # This program and the accompanying materials # are made available under the terms of the GNU Public License v3.0. @@ -12,7 +13,7 @@ # Set up Phase 1 # -context("ds.glmerSLMA::smk::setup - phase 1") +# context("ds.glmerSLMA::smk::setup - phase 1") connect.studies.dataset.cluster.int(list("incid_rate", "trtGrp", "Male", "idDoctor", "idSurgery")) @@ -24,7 +25,7 @@ test_that("setup", { # Tests Phase 1 # -context("ds.glmerSLMA::smk::phase 1") +# context("ds.glmerSLMA::smk::phase 1") test_that("simple glmerSLMA tesing (mis)use of arguments", { res = ds.glmerSLMA(formula = 'incid_rate ~ trtGrp + Male + (1|idDoctor)', family='poisson', dataName = "D", start_theta = c(1)) expect_length(res, 8) @@ -74,7 +75,7 @@ test_that("simple glmerSLMA with assign=TRUE", { # Shutdown phase 1 # -context("ds.glmerSLMA::smk::shutdown - phase 1") +# context("ds.glmerSLMA::smk::shutdown - phase 1") test_that("setup", { #note the offset and weights objects below are artefacts @@ -87,7 +88,7 @@ disconnect.studies.dataset.cluster.int() # Set up phase 2 # -context("ds.glmerSLMA::smk::setup - phase 2") +# context("ds.glmerSLMA::smk::setup - phase 2") connect.studies.dataset.cluster.slo(list("incid_rate", "trtGrp", "Male", "idDoctor", "BMI", "idSurgery")) @@ -99,7 +100,7 @@ test_that("setup", { # Tests phase 2 # -context("ds.glmerSLMA::smk::test - phase 2") +# context("ds.glmerSLMA::smk::test - phase 2") test_that("check slope formulae - 1", { res = ds.glmerSLMA(formula = 'incid_rate ~ trtGrp + Male + (1|idDoctor) + (1|idSurgery) + (0+trtGrp|idSurgery)', family='poisson', dataName = 'D', control_type = 'check.conv.grad', control_value = 0.1) @@ -249,7 +250,7 @@ test_that("check slope formulae - 2", { # Shutdown phase 2 # -context("ds.glmerSLMA::smk::shutdown - phase 2") +# context("ds.glmerSLMA::smk::shutdown - phase 2") test_that("setup", { ds_expect_variables(c("D", "offset", "weights")) @@ -261,4 +262,4 @@ disconnect.studies.dataset.cluster.slo() # Done # -context("ds.glmerSLMA::smk::done") +# context("ds.glmerSLMA::smk::done") diff --git a/tests/testthat/test-smk-ds.hetcor.R b/tests/testthat/test-smk-ds.hetcor.R index 7d029fb30..906c1cdd9 100644 --- a/tests/testthat/test-smk-ds.hetcor.R +++ b/tests/testthat/test-smk-ds.hetcor.R @@ -1,5 +1,6 @@ #------------------------------------------------------------------------------- # Copyright (c) 2019-2022 University of Newcastle upon Tyne. All rights reserved. +# Copyright (c) 2022-2025 Arjuna Technologies, Newcastle upon Tyne. All rights reserved. # # This program and the accompanying materials # are made available under the terms of the GNU Public License v3.0. @@ -12,7 +13,7 @@ # Set up # -context("ds.hetcor::smk::setup") +# context("ds.hetcor::smk::setup") connect.studies.dataset.cnsim(list("LAB_TSC", "LAB_TRIG", "LAB_HDL", "LAB_GLUC_ADJUSTED", "PM_BMI_CONTINUOUS", "DIS_CVA", "MEDI_LPD", "DIS_DIAB", "DIS_AMI", "GENDER", "PM_BMI_CATEGORICAL")) @@ -24,7 +25,7 @@ test_that("setup", { # Tests # -context("ds.hetcor::smk::test1") +# context("ds.hetcor::smk::test1") test_that("hetcor", { ds.dataFrame(c("D$LAB_TSC", "D$LAB_TRIG", "D$LAB_HDL", "D$LAB_GLUC_ADJUSTED", "D$PM_BMI_CONTINUOUS", "D$DIS_CVA", "D$MEDI_LPD", "D$DIS_DIAB", "D$DIS_AMI", "D$GENDER", "D$PM_BMI_CATEGORICAL"), newobj="df") @@ -177,7 +178,7 @@ test_that("hetcor", { # Done # -context("ds.hetcor::smk::shutdown") +# context("ds.hetcor::smk::shutdown") test_that("shutdown", { ds_expect_variables(c("D", "df")) @@ -185,4 +186,4 @@ test_that("shutdown", { disconnect.studies.dataset.cnsim() -context("ds.hetcor::smk::done") +# context("ds.hetcor::smk::done") diff --git a/tests/testthat/test-smk-ds.isNA.R b/tests/testthat/test-smk-ds.isNA.R index fb7213747..a0419eff8 100644 --- a/tests/testthat/test-smk-ds.isNA.R +++ b/tests/testthat/test-smk-ds.isNA.R @@ -1,5 +1,6 @@ #------------------------------------------------------------------------------- # Copyright (c) 2019-2022 University of Newcastle upon Tyne. All rights reserved. +# Copyright (c) 2022-2025 Arjuna Technologies, Newcastle upon Tyne. All rights reserved. # # This program and the accompanying materials # are made available under the terms of the GNU Public License v3.0. @@ -12,7 +13,7 @@ # Set up # -context("ds.isNA::smk::setup") +# context("ds.isNA::smk::setup") connect.studies.dataset.cnsim(list("LAB_HDL")) @@ -24,7 +25,7 @@ test_that("setup", { # Tests # -context("ds.isNA::smk") +# context("ds.isNA::smk") res <- ds.isNA(x='D$LAB_HDL') test_that("isNA", { expect_false(res$sim1) @@ -36,7 +37,7 @@ test_that("isNA", { # Tear down # -context("ds.isNA::smk::shutdown") +# context("ds.isNA::smk::shutdown") test_that("shutdown", { ds_expect_variables(c("D")) @@ -44,5 +45,5 @@ test_that("shutdown", { disconnect.studies.dataset.cnsim() -context("ds.isNA::smk::done") +# context("ds.isNA::smk::done") diff --git a/tests/testthat/test-smk-ds.isValid.R b/tests/testthat/test-smk-ds.isValid.R index 302412ba5..59b72dcce 100644 --- a/tests/testthat/test-smk-ds.isValid.R +++ b/tests/testthat/test-smk-ds.isValid.R @@ -1,5 +1,6 @@ #------------------------------------------------------------------------------- # Copyright (c) 2019-2022 University of Newcastle upon Tyne. All rights reserved. +# Copyright (c) 2022-2025 Arjuna Technologies, Newcastle upon Tyne. All rights reserved. # # This program and the accompanying materials # are made available under the terms of the GNU Public License v3.0. @@ -12,7 +13,7 @@ # Set up # -context("ds.isValid::smk::setup") +# context("ds.isValid::smk::setup") connect.studies.dataset.cnsim(list("LAB_TSC", "LAB_TRIG")) @@ -24,7 +25,7 @@ test_that("setup", { # Tests # -context("ds.isValid::smk") +# context("ds.isValid::smk") test_that("isValid", { res1 <- ds.isValid(x='D$LAB_TSC') @@ -55,7 +56,7 @@ test_that("isValid", { # Tear down # -context("ds.isValid::smk::shutdown") +# context("ds.isValid::smk::shutdown") test_that("shutdown", { ds_expect_variables(c("D")) @@ -63,4 +64,4 @@ test_that("shutdown", { disconnect.studies.dataset.cnsim() -context("ds.isValid::smk::done") +# context("ds.isValid::smk::done") diff --git a/tests/testthat/test-smk-ds.kurtosis.R b/tests/testthat/test-smk-ds.kurtosis.R index 76cedb049..297f87e46 100644 --- a/tests/testthat/test-smk-ds.kurtosis.R +++ b/tests/testthat/test-smk-ds.kurtosis.R @@ -1,6 +1,6 @@ #------------------------------------------------------------------------------- # Copyright (c) 2019-2022 University of Newcastle upon Tyne. All rights reserved. -# Copyright (c) 2022 Arjuna Technologies, Newcastle upon Tyne. All rights reserved. +# Copyright (c) 2022-2025 Arjuna Technologies, Newcastle upon Tyne. All rights reserved. # # This program and the accompanying materials # are made available under the terms of the GNU Public License v3.0. @@ -13,7 +13,7 @@ # Set up # -context("ds.kurtosis::smk::setup") +# context("ds.kurtosis::smk::setup") connect.studies.dataset.cnsim(list("LAB_TSC", "LAB_TRIG", "LAB_HDL", "LAB_GLUC_ADJUSTED", "PM_BMI_CONTINUOUS")) @@ -27,7 +27,7 @@ test_that("setup", { # Method 1 -context("ds.kurtosis::smk::method 1::split") +# context("ds.kurtosis::smk::method 1::split") test_that("simple kurtosis, method 1, split, on LAB_TSC", { kurtosis.res <- ds.kurtosis(x = 'D$LAB_TSC', method = 1, type='split') @@ -128,7 +128,7 @@ test_that("simple kurtosis, method 1, split, on PM_BMI_CONTINUOUS", { expect_equal(kurtosis.res$ValidityMessage[3], "VALID ANALYSIS") }) -context("ds.kurtosis::smk::method 1::combine") +# context("ds.kurtosis::smk::method 1::combine") test_that("simple kurtosis, combine, on LAB_TSC", { kurtosis.res <- ds.kurtosis(x = 'D$LAB_TSC', method = 1, type='combine') @@ -199,7 +199,7 @@ test_that("simple kurtosis, method 1, combine, on PM_BMI_CONTINUOUS", { expect_equal(kurtosis.res$ValidityMessage[1], "VALID ANALYSIS") }) -context("ds.kurtosis::smk::method 1::both") +# context("ds.kurtosis::smk::method 1::both") test_that("simple kurtosis, both, on LAB_TSC", { kurtosis.res <- ds.kurtosis(x = 'D$LAB_TSC', method = 1, type='both') @@ -342,7 +342,7 @@ test_that("simple kurtosis, method 1, both, on PM_BMI_CONTINUOUS", { # Method 2 -context("ds.kurtosis::smk::method 2::split") +# context("ds.kurtosis::smk::method 2::split") test_that("simple kurtosis, method 2, split, on LAB_TSC", { kurtosis.res <- ds.kurtosis(x = 'D$LAB_TSC', method = 2, type='split') @@ -443,7 +443,7 @@ test_that("simple kurtosis, method 2, split, on PM_BMI_CONTINUOUS", { expect_equal(kurtosis.res$ValidityMessage[3], "VALID ANALYSIS") }) -context("ds.kurtosis::smk::method 2::combine") +# context("ds.kurtosis::smk::method 2::combine") test_that("simple kurtosis, combine, on LAB_TSC", { kurtosis.res <- ds.kurtosis(x = 'D$LAB_TSC', method = 2, type='combine') @@ -514,7 +514,7 @@ test_that("simple kurtosis, method 2, combine, on PM_BMI_CONTINUOUS", { expect_equal(kurtosis.res$ValidityMessage[1], "VALID ANALYSIS") }) -context("ds.kurtosis::smk::method 2::both") +# context("ds.kurtosis::smk::method 2::both") test_that("simple kurtosis, both, on LAB_TSC", { kurtosis.res <- ds.kurtosis(x = 'D$LAB_TSC', method = 2, type='both') @@ -657,7 +657,7 @@ test_that("simple kurtosis, method 2, both, on PM_BMI_CONTINUOUS", { # Method 3 -context("ds.kurtosis::smk::method 3::split") +# context("ds.kurtosis::smk::method 3::split") test_that("simple kurtosis, method 3, split, on LAB_TSC", { kurtosis.res <- ds.kurtosis(x = 'D$LAB_TSC', method = 3, type='split') @@ -758,7 +758,7 @@ test_that("simple kurtosis, method 3, split, on PM_BMI_CONTINUOUS", { expect_equal(kurtosis.res$ValidityMessage[3], "VALID ANALYSIS") }) -context("ds.kurtosis::smk::method 3::combine") +# context("ds.kurtosis::smk::method 3::combine") test_that("simple kurtosis, combine, on LAB_TSC", { kurtosis.res <- ds.kurtosis(x = 'D$LAB_TSC', method = 3, type='combine') @@ -829,7 +829,7 @@ test_that("simple kurtosis, method 3, combine, on PM_BMI_CONTINUOUS", { expect_equal(kurtosis.res$ValidityMessage[1], "VALID ANALYSIS") }) -context("ds.kurtosis::smk::method 3::both") +# context("ds.kurtosis::smk::method 3::both") test_that("simple kurtosis, both, on LAB_TSC", { kurtosis.res <- ds.kurtosis(x = 'D$LAB_TSC', method = 3, type='both') @@ -974,7 +974,7 @@ test_that("simple kurtosis, method 3, both, on PM_BMI_CONTINUOUS", { # Done # -context("ds.kurtosis::smk::shutdown") +# context("ds.kurtosis::smk::shutdown") test_that("shutdown", { ds_expect_variables(c("D")) @@ -982,4 +982,4 @@ test_that("shutdown", { disconnect.studies.dataset.cnsim() -context("ds.kurtosis::smk::done") +# context("ds.kurtosis::smk::done") diff --git a/tests/testthat/test-smk-ds.length.R b/tests/testthat/test-smk-ds.length.R index 58d85b33e..b7c9bd764 100644 --- a/tests/testthat/test-smk-ds.length.R +++ b/tests/testthat/test-smk-ds.length.R @@ -1,5 +1,6 @@ #------------------------------------------------------------------------------- # Copyright (c) 2019-2022 University of Newcastle upon Tyne. All rights reserved. +# Copyright (c) 2022-2025 Arjuna Technologies, Newcastle upon Tyne. All rights reserved. # # This program and the accompanying materials # are made available under the terms of the GNU Public License v3.0. @@ -12,7 +13,7 @@ # Set up # -context("ds.length::smk::setup") +# context("ds.length::smk::setup") connect.studies.dataset.cnsim(list("LAB_TSC")) @@ -24,7 +25,7 @@ test_that("setup", { # Tests # -context("ds.length::smk") +# context("ds.length::smk") test_that("basic length, both", { res.length <- ds.length('D$LAB_TSC', type='both') @@ -81,7 +82,7 @@ test_that("basic length, combine", { # Done # -context("ds.length::smk::shutdown") +# context("ds.length::smk::shutdown") test_that("shutdown", { ds_expect_variables(c("D")) @@ -89,4 +90,4 @@ test_that("shutdown", { disconnect.studies.dataset.cnsim() -context("ds.length::smk::done") +# context("ds.length::smk::done") diff --git a/tests/testthat/test-smk-ds.levels.R b/tests/testthat/test-smk-ds.levels.R index cc262a1ed..022758937 100644 --- a/tests/testthat/test-smk-ds.levels.R +++ b/tests/testthat/test-smk-ds.levels.R @@ -1,5 +1,6 @@ #------------------------------------------------------------------------------- # Copyright (c) 2019-2022 University of Newcastle upon Tyne. All rights reserved. +# Copyright (c) 2022-2025 Arjuna Technologies, Newcastle upon Tyne. All rights reserved. # # This program and the accompanying materials # are made available under the terms of the GNU Public License v3.0. @@ -12,7 +13,7 @@ # Set up # -context("ds.levels::smk::setup") +# context("ds.levels::smk::setup") connect.studies.dataset.cnsim(list("GENDER", "PM_BMI_CATEGORICAL")) @@ -24,7 +25,7 @@ test_that("setup", { # Tests # -context("ds.levels::smk") +# context("ds.levels::smk") test_that("simple levels", { ds.asFactor("D$GENDER", newobj.name = "gender") @@ -51,7 +52,7 @@ test_that("simple levels", { expect_equal(res$sim3$Levels[2], "1") }) -context("ds.levels::smk") +# context("ds.levels::smk") test_that("simple levels", { ds.asFactor("D$PM_BMI_CATEGORICAL", newobj.name = "pm_bmi_categorical") @@ -85,7 +86,7 @@ test_that("simple levels", { # Done # -context("ds.levels::smk::shutdown") +# context("ds.levels::smk::shutdown") test_that("shutdown", { ds_expect_variables(c("D", "gender", "pm_bmi_categorical")) @@ -93,5 +94,5 @@ test_that("shutdown", { disconnect.studies.dataset.cnsim() -context("ds.levels::smk::done") +# context("ds.levels::smk::done") diff --git a/tests/testthat/test-smk-ds.lexis.R b/tests/testthat/test-smk-ds.lexis.R index 2ad3b717d..c0c302339 100644 --- a/tests/testthat/test-smk-ds.lexis.R +++ b/tests/testthat/test-smk-ds.lexis.R @@ -1,6 +1,6 @@ #------------------------------------------------------------------------------- # Copyright (c) 2019-2022 University of Newcastle upon Tyne. All rights reserved. -# Copyright (c) 2022 Arjuna Technologies, Newcastle upon Tyne. All rights reserved. +# Copyright (c) 2022-2025 Arjuna Technologies, Newcastle upon Tyne. All rights reserved. # # This program and the accompanying materials # are made available under the terms of the GNU Public License v3.0. @@ -13,7 +13,7 @@ # Set up # -context("ds.lexis::smk::setup") +# context("ds.lexis::smk::setup") connect.studies.dataset.survival(list("id", "starttime", "endtime", "cens", "age.60")) @@ -25,7 +25,7 @@ test_that("setup", { # Tests # -context("ds.lexis::smk") +# context("ds.lexis::smk") test_that("simple lexis", { res <- ds.lexis(data='D', intervalWidth = c(1.0, 1.5, 2.5), idCol = 'D$id', entryCol = 'D$starttime', exitCol = 'D$endtime', statusCol = 'D$cens', variables = c('D$age.60'), expandDF = 'EM.new') @@ -55,7 +55,7 @@ test_that("simple lexis", { # Done # -context("ds.lexis::smk::shutdown") +# context("ds.lexis::smk::shutdown") test_that("shutdown", { ds_expect_variables(c("D", "EM.new", "messageobj")) @@ -63,4 +63,4 @@ test_that("shutdown", { disconnect.studies.dataset.survival() -context("ds.lexis::smk::done") +# context("ds.lexis::smk::done") diff --git a/tests/testthat/test-smk-ds.list.R b/tests/testthat/test-smk-ds.list.R index d369bedfc..85ff10d86 100644 --- a/tests/testthat/test-smk-ds.list.R +++ b/tests/testthat/test-smk-ds.list.R @@ -1,5 +1,6 @@ #------------------------------------------------------------------------------- # Copyright (c) 2019-2022 University of Newcastle upon Tyne. All rights reserved. +# Copyright (c) 2022-2025 Arjuna Technologies, Newcastle upon Tyne. All rights reserved. # # This program and the accompanying materials # are made available under the terms of the GNU Public License v3.0. @@ -12,7 +13,7 @@ # Set up # -context("ds.list::smk::setup") +# context("ds.list::smk::setup") connect.studies.dataset.cnsim(list("LAB_TSC", "LAB_HDL")) @@ -24,7 +25,7 @@ test_that("setup", { # Tests # -context("ds.list::smk") +# context("ds.list::smk") test_that("Is List", { myobjects <- c('D$LAB_TSC', 'D$LAB_HDL') res <- ds.list(x=myobjects, newobj='my_newobj') @@ -72,7 +73,7 @@ test_that("Is List", { # Tear down # -context("ds.list::smk::shutdown") +# context("ds.list::smk::shutdown") test_that("shutdown", { ds_expect_variables(c("D", "my_newobj")) @@ -80,4 +81,4 @@ test_that("shutdown", { disconnect.studies.dataset.cnsim() -context("ds.list::smk::down") +# context("ds.list::smk::down") diff --git a/tests/testthat/test-smk-ds.listClientsideFunctions.R b/tests/testthat/test-smk-ds.listClientsideFunctions.R index 20adf0e3e..4ab65e6ea 100644 --- a/tests/testthat/test-smk-ds.listClientsideFunctions.R +++ b/tests/testthat/test-smk-ds.listClientsideFunctions.R @@ -1,6 +1,6 @@ #------------------------------------------------------------------------------- # Copyright (c) 2019-2022 University of Newcastle upon Tyne. All rights reserved. -# Copyright (c) 2022 Arjuna Technologies, Newcastle upon Tyne. All rights reserved. +# Copyright (c) 2022-2025 Arjuna Technologies, Newcastle upon Tyne. All rights reserved. # # This program and the accompanying materials # are made available under the terms of the GNU Public License v3.0. @@ -13,7 +13,7 @@ # Set up # -context("ds.listClientsideFunctions::smk::setup") +# context("ds.listClientsideFunctions::smk::setup") connect.studies.dataset.cnsim(list("LAB_TSC", "LAB_HDL")) @@ -25,7 +25,7 @@ test_that("setup", { # Tests # -context("ds.listClientsideFunctions::smk::check results") +# context("ds.listClientsideFunctions::smk::check results") test_that("check results", { output <- list( "ds.abs", @@ -137,7 +137,7 @@ test_that("check results", { "ds.vectorCalc" ) - expect_output(res <- ds.listClientsideFunctions(), "*") + res <- ds.listClientsideFunctions() for (func.name in output) { expect_true(func.name %in% res, info = func.name) @@ -148,7 +148,7 @@ test_that("check results", { # Done # -context("ds.listClientsideFunctions::smk::shutdown") +# context("ds.listClientsideFunctions::smk::shutdown") test_that("shutdown", { ds_expect_variables(c("D")) @@ -156,4 +156,4 @@ test_that("shutdown", { disconnect.studies.dataset.cnsim() -context("ds.listClientsideFunctions::smk::done") +# context("ds.listClientsideFunctions::smk::done") diff --git a/tests/testthat/test-smk-ds.listDisclosureSettings.R b/tests/testthat/test-smk-ds.listDisclosureSettings.R index e1b136951..2d8e34842 100644 --- a/tests/testthat/test-smk-ds.listDisclosureSettings.R +++ b/tests/testthat/test-smk-ds.listDisclosureSettings.R @@ -1,5 +1,6 @@ #------------------------------------------------------------------------------- # Copyright (c) 2018-2022 University of Newcastle upon Tyne. All rights reserved. +# Copyright (c) 2022-2025 Arjuna Technologies, Newcastle upon Tyne. All rights reserved. # # This program and the accompanying materials # are made available under the terms of the GNU Public License v3.0. @@ -12,7 +13,7 @@ # Set up # -context("ds.listDisclosureSettings::smk::setup") +# context("ds.listDisclosureSettings::smk::setup") connect.studies.dataset.cnsim(list("LAB_TSC", "LAB_HDL")) @@ -24,7 +25,7 @@ test_that("setup", { # Tests # -context("ds.listDisclosureSettings::smk::check results") +# context("ds.listDisclosureSettings::smk::check results") test_that("check results", { res <- ds.listDisclosureSettings() @@ -78,7 +79,7 @@ test_that("check results", { # Done # -context("ds.listDisclosureSettings::smk::shutdown") +# context("ds.listDisclosureSettings::smk::shutdown") test_that("shutdown", { ds_expect_variables(c("D")) @@ -86,4 +87,4 @@ test_that("shutdown", { disconnect.studies.dataset.cnsim() -context("ds.listDisclosureSettings::smk::down") +# context("ds.listDisclosureSettings::smk::down") diff --git a/tests/testthat/test-smk-ds.listServersideFunctions.R b/tests/testthat/test-smk-ds.listServersideFunctions.R index 542d62b1a..bdb05baad 100644 --- a/tests/testthat/test-smk-ds.listServersideFunctions.R +++ b/tests/testthat/test-smk-ds.listServersideFunctions.R @@ -1,6 +1,6 @@ #------------------------------------------------------------------------------- # Copyright (c) 2019-2022 University of Newcastle upon Tyne. All rights reserved. -# Copyright (c) 2022 Arjuna Technologies, Newcastle upon Tyne. All rights reserved. +# Copyright (c) 2022-2025 Arjuna Technologies, Newcastle upon Tyne. All rights reserved. # # This program and the accompanying materials # are made available under the terms of the GNU Public License v3.0. @@ -19,7 +19,7 @@ connect.studies.dataset.cnsim(list("LAB_TSC", "LAB_HDL")) # Tests # -context("ds.listServersideFunctions::smk::check results") +# context("ds.listServersideFunctions::smk::check results") test_that("check results", { assign.functions <- factor(c( "BooleDS", "abs", "absDS", "acos", "as.character", "as.null", "as.numeric", "asCharacterDS", "asDataMatrixDS", diff --git a/tests/testthat/test-smk-ds.lmerSLMA.R b/tests/testthat/test-smk-ds.lmerSLMA.R index c552a65ff..7d352a9c2 100644 --- a/tests/testthat/test-smk-ds.lmerSLMA.R +++ b/tests/testthat/test-smk-ds.lmerSLMA.R @@ -1,5 +1,6 @@ #------------------------------------------------------------------------------- # Copyright (c) 2019-2022 University of Newcastle upon Tyne. All rights reserved. +# Copyright (c) 2022-2025 Arjuna Technologies, Newcastle upon Tyne. All rights reserved. # # This program and the accompanying materials # are made available under the terms of the GNU Public License v3.0. @@ -12,7 +13,7 @@ # Set up phase 1 # -context("ds.lmerSLMA::smk::setup phase 1") +# context("ds.lmerSLMA::smk::setup phase 1") connect.studies.dataset.cluster.int(list("incid_rate", "trtGrp", "Male", "idDoctor", "BMI", "idSurgery")) @@ -24,7 +25,7 @@ test_that("setup", { # Tests # -context("ds.lmerSLMA::smk::phase 1") +# context("ds.lmerSLMA::smk::phase 1") test_that("simple lmerSLMA", { res <- ds.lmerSLMA(formula = 'incid_rate ~ trtGrp + Male + (1|idDoctor)', dataName = "D") @@ -75,7 +76,7 @@ test_that("test offsets and weights", { # Shutdown # -context("ds.lmerSLMA::smk::shutdown phase 1") +# context("ds.lmerSLMA::smk::shutdown phase 1") test_that("shutdown", { #note the offset and weights objects below are artefacts @@ -89,7 +90,7 @@ disconnect.studies.dataset.cluster.int() # Set up # -context("ds.lmerSLMA::smk::setup phase 2") +# context("ds.lmerSLMA::smk::setup phase 2") connect.studies.dataset.cluster.slo(list("incid_rate", "trtGrp", "Male", "idDoctor", "BMI", "idSurgery")) @@ -101,7 +102,7 @@ test_that("setup", { # Tests # -context("ds.lmerSLMA::smk::test phase 2") +# context("ds.lmerSLMA::smk::test phase 2") test_that("check slope formulae", { res = ds.lmerSLMA(formula = 'BMI ~ trtGrp + Male + (1|idDoctor) + (1|idSurgery) + (0+trtGrp|idSurgery)', dataName = 'D', control_type = 'check.conv.grad',control_value = 0.1) @@ -251,7 +252,7 @@ test_that("check slope formulae", { # Shutdown # -context("ds.lmerSLMA::smk::shutdown phase 2") +# context("ds.lmerSLMA::smk::shutdown phase 2") test_that("shutdown", { ds_expect_variables(c("D", "offset", "weights")) @@ -263,4 +264,4 @@ disconnect.studies.dataset.cluster.slo() # Done # -context("ds.lmerSLMA::smk::done") +# context("ds.lmerSLMA::smk::done") diff --git a/tests/testthat/test-smk-ds.log.R b/tests/testthat/test-smk-ds.log.R index cd18e6f1f..c857408db 100644 --- a/tests/testthat/test-smk-ds.log.R +++ b/tests/testthat/test-smk-ds.log.R @@ -1,5 +1,6 @@ #------------------------------------------------------------------------------- # Copyright (c) 2019-2022 University of Newcastle upon Tyne. All rights reserved. +# Copyright (c) 2022-2025 Arjuna Technologies, Newcastle upon Tyne. All rights reserved. # # This program and the accompanying materials # are made available under the terms of the GNU Public License v3.0. @@ -12,7 +13,7 @@ # Set up # -context("ds.log::smk::setup") +# context("ds.log::smk::setup") connect.studies.dataset.cnsim(list("LAB_TSC")) @@ -24,7 +25,7 @@ test_that("setup", { # Tests # -context("ds.log::smk") +# context("ds.log::smk") test_that("simple log", { res1 <- ds.log("D$LAB_TSC", newobj="log1_obj") @@ -81,7 +82,7 @@ test_that("simple log", { # Done # -context("ds.log::smk::shutdown") +# context("ds.log::smk::shutdown") test_that("shutdown", { ds_expect_variables(c("D", "new_data", "log1_obj", "log2_obj")) @@ -89,4 +90,4 @@ test_that("shutdown", { disconnect.studies.dataset.cnsim() -context("ds.log::smk::done") +# context("ds.log::smk::done") diff --git a/tests/testthat/test-smk-ds.look.R b/tests/testthat/test-smk-ds.look.R index c8167430c..f4a656837 100644 --- a/tests/testthat/test-smk-ds.look.R +++ b/tests/testthat/test-smk-ds.look.R @@ -1,5 +1,6 @@ #------------------------------------------------------------------------------- # Copyright (c) 2019-2022 University of Newcastle upon Tyne. All rights reserved. +# Copyright (c) 2022-2025 Arjuna Technologies, Newcastle upon Tyne. All rights reserved. # # This program and the accompanying materials # are made available under the terms of the GNU Public License v3.0. @@ -12,7 +13,7 @@ # Set up # -context("ds.look::smk::setup") +# context("ds.look::smk::setup") connect.studies.dataset.cnsim(list("LAB_TSC", "LAB_TRIG", "LAB_HDL")) @@ -24,7 +25,7 @@ test_that("setup", { # Tests # -context("ds.look::smk") +# context("ds.look::smk") test_that("simple look", { res <- ds.look("lengthDS('D$LAB_TSC')") @@ -39,7 +40,7 @@ test_that("simple look", { # Done # -context("ds.look::smk::shutdown") +# context("ds.look::smk::shutdown") test_that("shutdown", { ds_expect_variables(c("D")) @@ -47,4 +48,4 @@ test_that("shutdown", { disconnect.studies.dataset.cnsim() -context("ds.look::smk::done") +# context("ds.look::smk::done") diff --git a/tests/testthat/test-smk-ds.ls.R b/tests/testthat/test-smk-ds.ls.R index 1a9afe3d4..91dd745a4 100644 --- a/tests/testthat/test-smk-ds.ls.R +++ b/tests/testthat/test-smk-ds.ls.R @@ -1,5 +1,6 @@ #------------------------------------------------------------------------------- # Copyright (c) 2019-2022 University of Newcastle upon Tyne. All rights reserved. +# Copyright (c) 2022-2025 Arjuna Technologies, Newcastle upon Tyne. All rights reserved. # # This program and the accompanying materials # are made available under the terms of the GNU Public License v3.0. @@ -12,7 +13,7 @@ # Set up # -context("ds.ls::smk::setup") +# context("ds.ls::smk::setup") connect.studies.dataset.cnsim(list("LAB_TSC", "LAB_TRIG")) @@ -24,7 +25,7 @@ test_that("setup", { # Tests # -context("ds.ls::smk") +# context("ds.ls::smk") test_that("simple ls", { res <- ds.ls() @@ -107,7 +108,7 @@ test_that("simple ls, with envir, with wildcard prefix", { # Shutdown # -context("ds.ls::smk::shutdown") +# context("ds.ls::smk::shutdown") test_that("shutdown", { ds_expect_variables(c("D")) @@ -119,4 +120,4 @@ disconnect.studies.dataset.cnsim() # Done # -context("ds.ls::smk::done") +# context("ds.ls::smk::done") diff --git a/tests/testthat/test-smk-ds.lspline.R b/tests/testthat/test-smk-ds.lspline.R index 9529babd7..08d45470d 100644 --- a/tests/testthat/test-smk-ds.lspline.R +++ b/tests/testthat/test-smk-ds.lspline.R @@ -1,5 +1,6 @@ #------------------------------------------------------------------------------- # Copyright (c) 2019-2022 University of Newcastle upon Tyne. All rights reserved. +# Copyright (c) 2022-2025 Arjuna Technologies, Newcastle upon Tyne. All rights reserved. # # This program and the accompanying materials # are made available under the terms of the GNU Public License v3.0. @@ -12,7 +13,7 @@ # Set up # -context("ds.lspline::smk::setup") +# context("ds.lspline::smk::setup") connect.studies.dataset.cnsim(list("LAB_TRIG", "PM_BMI_CONTINUOUS")) @@ -24,7 +25,7 @@ test_that("setup", { # Tests # -context("ds.lspline::smk::test1") +# context("ds.lspline::smk::test1") test_that("lspline", { ds.lspline(x="D$PM_BMI_CONTINUOUS", knots=c(15,25,35), newobj="lsplineDS", datasources=ds.test_env$connections) @@ -81,7 +82,7 @@ test_that("lspline", { # Done # -context("ds.lspline::smk::shutdown") +# context("ds.lspline::smk::shutdown") test_that("shutdown", { ds_expect_variables(c("D", "LAB_TRIG", "lsplineDS")) @@ -89,4 +90,4 @@ test_that("shutdown", { disconnect.studies.dataset.cnsim() -context("ds.qlspline::smk::done") +# context("ds.qlspline::smk::done") diff --git a/tests/testthat/test-smk-ds.make.R b/tests/testthat/test-smk-ds.make.R index 57565fbe5..cadb04707 100644 --- a/tests/testthat/test-smk-ds.make.R +++ b/tests/testthat/test-smk-ds.make.R @@ -1,5 +1,6 @@ #------------------------------------------------------------------------------- # Copyright (c) 2019-2022 University of Newcastle upon Tyne. All rights reserved. +# Copyright (c) 2022-2025 Arjuna Technologies, Newcastle upon Tyne. All rights reserved. # # This program and the accompanying materials # are made available under the terms of the GNU Public License v3.0. @@ -12,7 +13,7 @@ # Set up # -context("ds.make::smk::setup") +# context("ds.make::smk::setup") connect.studies.dataset.cnsim(list("LAB_TSC", "LAB_TRIG", "LAB_HDL")) @@ -24,7 +25,7 @@ test_that("setup", { # Tests # -context("ds.make::smk") +# context("ds.make::smk") test_that("simple make", { res <- ds.make("(D$LAB_TSC*D$LAB_TRIG*D$LAB_HDL)", "maded.rand") @@ -33,7 +34,7 @@ test_that("simple make", { expect_equal(res$validity.check, " appears valid in all sources") }) -context("ds.make::smk") +# context("ds.make::smk") test_that("simple make", { res <- ds.make("(D$LAB_TSC*10)", "maded.rand") @@ -42,7 +43,7 @@ test_that("simple make", { expect_equal(res$validity.check, " appears valid in all sources") }) -context("ds.make::smk") +# context("ds.make::smk") test_that("simple make", { res <- ds.make("(D$LAB_TSC)*10", "maded.rand") @@ -55,7 +56,7 @@ test_that("simple make", { # Done # -context("ds.make::smk::shutdown") +# context("ds.make::smk::shutdown") test_that("shutdown", { ds_expect_variables(c("D", "maded.rand")) @@ -63,4 +64,4 @@ test_that("shutdown", { disconnect.studies.dataset.cnsim() -context("ds.make::smk::done") +# context("ds.make::smk::done") diff --git a/tests/testthat/test-smk-ds.matrix.R b/tests/testthat/test-smk-ds.matrix.R index c9295bd9a..d48367603 100644 --- a/tests/testthat/test-smk-ds.matrix.R +++ b/tests/testthat/test-smk-ds.matrix.R @@ -1,5 +1,6 @@ #------------------------------------------------------------------------------- # Copyright (c) 2019-2022 University of Newcastle upon Tyne. All rights reserved. +# Copyright (c) 2022-2025 Arjuna Technologies, Newcastle upon Tyne. All rights reserved. # # This program and the accompanying materials # are made available under the terms of the GNU Public License v3.0. @@ -12,7 +13,7 @@ # Set up # -context("ds.matrix::smk::setup") +# context("ds.matrix::smk::setup") connect.studies.dataset.cnsim(list("LAB_TSC")) @@ -24,7 +25,7 @@ test_that("setup", { # Tests # -context("ds.matrix::smk") +# context("ds.matrix::smk") test_that("simplest ds.matrix", { matrix <- c(0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11) @@ -46,7 +47,7 @@ test_that("simplest ds.matrix", { # Tear down # -context("ds.matrix::smk::shutdown") +# context("ds.matrix::smk::shutdown") test_that("shutdown", { ds_expect_variables(c("D", "matrix.newobj")) @@ -54,4 +55,4 @@ test_that("shutdown", { disconnect.studies.dataset.cnsim() -context("ds.matrix::smk::done") +# context("ds.matrix::smk::done") diff --git a/tests/testthat/test-smk-ds.matrixDet.R b/tests/testthat/test-smk-ds.matrixDet.R index 3cf8f8b50..74626cbc4 100644 --- a/tests/testthat/test-smk-ds.matrixDet.R +++ b/tests/testthat/test-smk-ds.matrixDet.R @@ -1,5 +1,6 @@ #------------------------------------------------------------------------------- # Copyright (c) 2019-2022 University of Newcastle upon Tyne. All rights reserved. +# Copyright (c) 2022-2025 Arjuna Technologies, Newcastle upon Tyne. All rights reserved. # # This program and the accompanying materials # are made available under the terms of the GNU Public License v3.0. @@ -12,7 +13,7 @@ # Set up # -context("ds.matrixDet::smk::setup") +# context("ds.matrixDet::smk::setup") connect.studies.dataset.cnsim(list("LAB_TSC")) @@ -24,7 +25,7 @@ test_that("setup", { # Tests # -context("ds.matrixDet::smk") +# context("ds.matrixDet::smk") test_that("simplest ds.matrixDet", { matrix <- c(-2, 1, 3, 0, -1, 1, 1, 2, 0) @@ -47,7 +48,7 @@ test_that("simplest ds.matrixDet", { # Tear down # -context("ds.matrixDet::smk::shutdown") +# context("ds.matrixDet::smk::shutdown") test_that("shutdown", { ds_expect_variables(c("D", "matrix.newobj", "matrixdet.newobj")) @@ -55,4 +56,4 @@ test_that("shutdown", { disconnect.studies.dataset.cnsim() -context("ds.matrixDet::smk::done") +# context("ds.matrixDet::smk::done") diff --git a/tests/testthat/test-smk-ds.matrixDet.report.R b/tests/testthat/test-smk-ds.matrixDet.report.R index 5854fbde3..20850a5a3 100644 --- a/tests/testthat/test-smk-ds.matrixDet.report.R +++ b/tests/testthat/test-smk-ds.matrixDet.report.R @@ -1,5 +1,6 @@ #------------------------------------------------------------------------------- # Copyright (c) 2019-2022 University of Newcastle upon Tyne. All rights reserved. +# Copyright (c) 2022-2025 Arjuna Technologies, Newcastle upon Tyne. All rights reserved. # # This program and the accompanying materials # are made available under the terms of the GNU Public License v3.0. @@ -12,7 +13,7 @@ # Set up # -context("ds.matrixDet.report::smk::setup") +# context("ds.matrixDet.report::smk::setup") connect.studies.dataset.cnsim(list("LAB_TSC")) @@ -24,7 +25,7 @@ test_that("setup", { # Tests # -context("ds.matrixDet.report::smk") +# context("ds.matrixDet.report::smk") test_that("simplest ds.matrixDet.report", { matrix <- c(-2, 1, 3, 0, -1, 1, 1, 2, 0) @@ -51,7 +52,7 @@ test_that("simplest ds.matrixDet.report", { # Tear down # -context("ds.matrixDet.report::smk::shutdown") +# context("ds.matrixDet.report::smk::shutdown") test_that("shutdown", { ds_expect_variables(c("D", "matrix.newobj")) @@ -59,4 +60,4 @@ test_that("shutdown", { disconnect.studies.dataset.cnsim() -context("ds.matrixDet.report::smk::done") +# context("ds.matrixDet.report::smk::done") diff --git a/tests/testthat/test-smk-ds.matrixDiag.R b/tests/testthat/test-smk-ds.matrixDiag.R index 14bc8baba..2a9b30d75 100644 --- a/tests/testthat/test-smk-ds.matrixDiag.R +++ b/tests/testthat/test-smk-ds.matrixDiag.R @@ -1,5 +1,6 @@ #------------------------------------------------------------------------------- # Copyright (c) 2019-2022 University of Newcastle upon Tyne. All rights reserved. +# Copyright (c) 2022-2025 Arjuna Technologies, Newcastle upon Tyne. All rights reserved. # # This program and the accompanying materials # are made available under the terms of the GNU Public License v3.0. @@ -12,7 +13,7 @@ # Set up # -context("ds.matrixDiag::smk::setup") +# context("ds.matrixDiag::smk::setup") connect.studies.dataset.cnsim(list("LAB_TSC")) @@ -24,7 +25,7 @@ test_that("setup", { # Tests # -context("ds.matrixDiag::smk") +# context("ds.matrixDiag::smk") test_that("simplest ds.matrixDiag", { matrix <- c(0, 1, 2, 3, 4, 5) @@ -42,7 +43,7 @@ test_that("simplest ds.matrixDiag", { expect_true("matrix" %in% check.class$sim3) }) -context("ds.matrixDiag::smk") +# context("ds.matrixDiag::smk") test_that("simplest ds.matrixDiag", { matrix <- c(0, 1, 2, 3, 4, 5) @@ -64,7 +65,7 @@ test_that("simplest ds.matrixDiag", { # Tear down # -context("ds.matrixDiag::smk::shutdown") +# context("ds.matrixDiag::smk::shutdown") test_that("shutdown", { ds_expect_variables(c("D", "matrix_diag", "matrixdiag.newobj")) @@ -72,4 +73,4 @@ test_that("shutdown", { disconnect.studies.dataset.cnsim() -context("ds.matrixDiag::smk::done") +# context("ds.matrixDiag::smk::done") diff --git a/tests/testthat/test-smk-ds.matrixDimnames.R b/tests/testthat/test-smk-ds.matrixDimnames.R index f39a04799..6ac87d2ff 100644 --- a/tests/testthat/test-smk-ds.matrixDimnames.R +++ b/tests/testthat/test-smk-ds.matrixDimnames.R @@ -1,5 +1,6 @@ #------------------------------------------------------------------------------- # Copyright (c) 2019-2022 University of Newcastle upon Tyne. All rights reserved. +# Copyright (c) 2022-2025 Arjuna Technologies, Newcastle upon Tyne. All rights reserved. # # This program and the accompanying materials # are made available under the terms of the GNU Public License v3.0. @@ -12,7 +13,7 @@ # Set up # -context("ds.matrixDimnames::smk::setup") +# context("ds.matrixDimnames::smk::setup") connect.studies.dataset.cnsim(list("LAB_TSC")) @@ -24,7 +25,7 @@ test_that("setup", { # Tests # -context("ds.matrixDimnames::smk") +# context("ds.matrixDimnames::smk") test_that("simplest ds.matrixDimnames", { matrix <- c(-2, 1, 3, 0, -1, 1, 1, 2, 0) @@ -50,7 +51,7 @@ test_that("simplest ds.matrixDimnames", { # Tear down # -context("ds.matrixDimnames::smk::shutdown") +# context("ds.matrixDimnames::smk::shutdown") test_that("shutdown", { ds_expect_variables(c("D", "matrix.newobj", "matrixdimnames.newobj")) @@ -58,4 +59,4 @@ test_that("shutdown", { disconnect.studies.dataset.cnsim() -context("ds.matrixDimnames::smk::done") +# context("ds.matrixDimnames::smk::done") diff --git a/tests/testthat/test-smk-ds.matrixInvert.R b/tests/testthat/test-smk-ds.matrixInvert.R index b0ab7f41e..8cd89a415 100644 --- a/tests/testthat/test-smk-ds.matrixInvert.R +++ b/tests/testthat/test-smk-ds.matrixInvert.R @@ -1,5 +1,6 @@ #------------------------------------------------------------------------------- # Copyright (c) 2019-2022 University of Newcastle upon Tyne. All rights reserved. +# Copyright (c) 2022-2025 Arjuna Technologies, Newcastle upon Tyne. All rights reserved. # # This program and the accompanying materials # are made available under the terms of the GNU Public License v3.0. @@ -12,7 +13,7 @@ # Set up # -context("ds.matrixInvert::smk::setup") +# context("ds.matrixInvert::smk::setup") connect.studies.dataset.cnsim(list("LAB_TSC")) @@ -24,7 +25,7 @@ test_that("setup", { # Tests # -context("ds.matrixInvert::smk") +# context("ds.matrixInvert::smk") test_that("simplest ds.matrixInvert", { matrix <- c(-2, 1, 3, 0, -1, 1, 1, 2, 0) @@ -47,7 +48,7 @@ test_that("simplest ds.matrixInvert", { # Tear down # -context("ds.matrixInvert::smk::shutdown") +# context("ds.matrixInvert::smk::shutdown") test_that("shutdown", { ds_expect_variables(c("D", "matrix.newobj", "matrixinvert.newobj")) @@ -55,4 +56,4 @@ test_that("shutdown", { disconnect.studies.dataset.cnsim() -context("ds.matrixInvert::smk::done") +# context("ds.matrixInvert::smk::done") diff --git a/tests/testthat/test-smk-ds.matrixMult.R b/tests/testthat/test-smk-ds.matrixMult.R index 76ddb9af3..001e36efb 100644 --- a/tests/testthat/test-smk-ds.matrixMult.R +++ b/tests/testthat/test-smk-ds.matrixMult.R @@ -1,5 +1,6 @@ #------------------------------------------------------------------------------- # Copyright (c) 2019-2022 University of Newcastle upon Tyne. All rights reserved. +# Copyright (c) 2022-2025 Arjuna Technologies, Newcastle upon Tyne. All rights reserved. # # This program and the accompanying materials # are made available under the terms of the GNU Public License v3.0. @@ -12,7 +13,7 @@ # Set up # -context("ds.matrixMult::smk::setup") +# context("ds.matrixMult::smk::setup") connect.studies.dataset.cnsim(list("LAB_TSC")) @@ -24,7 +25,7 @@ test_that("setup", { # Tests # -context("ds.matrixMult::smk") +# context("ds.matrixMult::smk") test_that("simplest ds.matrixMult", { matrix1 <- c(-2, 1, 3, 0, -1, 1, 1, 2, 0) matrix2 <- c(-2, 1, 3, 1, -1, 1, 1, 2, 1) @@ -49,7 +50,7 @@ test_that("simplest ds.matrixMult", { # Tear down # -context("ds.matrixMult::smk::shutdown") +# context("ds.matrixMult::smk::shutdown") test_that("shutdown", { ds_expect_variables(c("D", "mat1", "mat2", "matrixmult.newobj")) @@ -57,4 +58,4 @@ test_that("shutdown", { disconnect.studies.dataset.cnsim() -context("ds.matrixMult::smk::done") +# context("ds.matrixMult::smk::done") diff --git a/tests/testthat/test-smk-ds.matrixTranspose.R b/tests/testthat/test-smk-ds.matrixTranspose.R index 234fbb383..fa1920a78 100644 --- a/tests/testthat/test-smk-ds.matrixTranspose.R +++ b/tests/testthat/test-smk-ds.matrixTranspose.R @@ -1,5 +1,6 @@ #------------------------------------------------------------------------------- # Copyright (c) 2019-2022 University of Newcastle upon Tyne. All rights reserved. +# Copyright (c) 2022-2025 Arjuna Technologies, Newcastle upon Tyne. All rights reserved. # # This program and the accompanying materials # are made available under the terms of the GNU Public License v3.0. @@ -12,7 +13,7 @@ # Set up # -context("ds.matrixTranspose::smk::setup") +# context("ds.matrixTranspose::smk::setup") connect.studies.dataset.cnsim(list("LAB_TSC")) @@ -24,7 +25,7 @@ test_that("setup", { # Tests # -context("ds.matrixTranspose::smk") +# context("ds.matrixTranspose::smk") test_that("simplest ds.matrixTranspose", { matrix <- c(0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11) @@ -47,7 +48,7 @@ test_that("simplest ds.matrixTranspose", { # Tear down # -context("ds.matrixTranspose::smk::shutdown") +# context("ds.matrixTranspose::smk::shutdown") test_that("shutdown", { ds_expect_variables(c("D", "matrix.newobj", "matrixtranspose.newobj")) @@ -55,4 +56,4 @@ test_that("shutdown", { disconnect.studies.dataset.cnsim() -context("ds.matrixTranspose::smk::done") +# context("ds.matrixTranspose::smk::done") diff --git a/tests/testthat/test-smk-ds.mean.R b/tests/testthat/test-smk-ds.mean.R index be89553c5..5b2d7360e 100644 --- a/tests/testthat/test-smk-ds.mean.R +++ b/tests/testthat/test-smk-ds.mean.R @@ -1,5 +1,6 @@ #------------------------------------------------------------------------------- # Copyright (c) 2018-2022 University of Newcastle upon Tyne. All rights reserved. +# Copyright (c) 2022-2025 Arjuna Technologies, Newcastle upon Tyne. All rights reserved. # # This program and the accompanying materials # are made available under the terms of the GNU Public License v3.0. @@ -12,7 +13,7 @@ # Set up # -context("ds.mean::smk::setup") +# context("ds.mean::smk::setup") connect.studies.dataset.cnsim(list("LAB_TSC")) @@ -24,7 +25,7 @@ test_that("setup", { # Tests # -context("ds.mean::smk::type=combine") +# context("ds.mean::smk::type=combine") test_that("mean values [combine]", { ds.rm("mean.all.studies") ds.rm("mean.study.specific") @@ -60,7 +61,7 @@ test_that("mean values [combine]", { expect_false("Nvalid.study.specific" %in% ls.res$sim3$objects.found) }) -context("ds.mean::smk::type=split") +# context("ds.mean::smk::type=split") test_that("mean values [split]", { ds.rm("mean.all.studies") ds.rm("mean.study.specific") @@ -104,7 +105,7 @@ test_that("mean values [split]", { expect_false("Nvalid.study.specific" %in% ls.res$sim3$objects.found) }) -context("ds.mean::smk::type=both") +# context("ds.mean::smk::type=both") test_that("mean values [both]", { ds.rm("mean.all.studies") ds.rm("mean.study.specific") @@ -153,7 +154,7 @@ test_that("mean values [both]", { expect_false("Nvalid.study.specific" %in% ls.res$sim3$objects.found) }) -context("ds.mean::smk::type=combine,save.mean.Nvalid=TRUE") +# context("ds.mean::smk::type=combine,save.mean.Nvalid=TRUE") test_that("mean values [combine]", { ds.rm("mean.all.studies") ds.rm("mean.study.specific") @@ -189,7 +190,7 @@ test_that("mean values [combine]", { expect_true("Nvalid.study.specific" %in% ls.res$sim3$objects.found) }) -context("ds.mean::smk::type=split,save.mean.Nvalid=TRUE") +# context("ds.mean::smk::type=split,save.mean.Nvalid=TRUE") test_that("mean values [split]", { ds.rm("mean.all.studies") ds.rm("mean.study.specific") @@ -233,7 +234,7 @@ test_that("mean values [split]", { expect_true("Nvalid.study.specific" %in% ls.res$sim3$objects.found) }) -context("ds.mean::smk::type=both,save.mean.Nvalid=TRUE") +# context("ds.mean::smk::type=both,save.mean.Nvalid=TRUE") test_that("mean values [both]", { stat.mean <- ds.mean(x='D$LAB_TSC', type='both', save.mean.Nvalid=TRUE) @@ -281,7 +282,7 @@ test_that("mean values [both]", { # Done # -context("ds.mean::smk::shutdown") +# context("ds.mean::smk::shutdown") test_that("shutdown", { ds_expect_variables(c("D", "mean.all.studies", "mean.study.specific", "Nvalid.all.studies", "Nvalid.study.specific")) @@ -289,4 +290,4 @@ test_that("shutdown", { disconnect.studies.dataset.cnsim() -context("ds.mean::smk::done") +# context("ds.mean::smk::done") diff --git a/tests/testthat/test-smk-ds.meanByClass.R b/tests/testthat/test-smk-ds.meanByClass.R index a9d1ef7c4..2c5aba86a 100644 --- a/tests/testthat/test-smk-ds.meanByClass.R +++ b/tests/testthat/test-smk-ds.meanByClass.R @@ -1,5 +1,6 @@ #------------------------------------------------------------------------------- # Copyright (c) 2018-2022 University of Newcastle upon Tyne. All rights reserved. +# Copyright (c) 2022-2025 Arjuna Technologies, Newcastle upon Tyne. All rights reserved. # # This program and the accompanying materials # are made available under the terms of the GNU Public License v3.0. @@ -12,7 +13,7 @@ # Set up # -context("ds.meanByClass::smk::setup") +# context("ds.meanByClass::smk::setup") connect.studies.dataset.cnsim(list("LAB_TSC","LAB_HDL","PM_BMI_CATEGORICAL")) @@ -24,7 +25,7 @@ test_that("setup", { # Tests # -context("ds.meanByClass::smk::LAB_TSC across PM_BMI_CATEGORICAL categories where both vectors are 'loose'") +# context("ds.meanByClass::smk::LAB_TSC across PM_BMI_CATEGORICAL categories where both vectors are 'loose'") ds.assign("D$LAB_TSC", "ldl") ds.assign("D$PM_BMI_CATEGORICAL", "pm_bmi") test_that("LAB_TSC_across_", { @@ -39,7 +40,7 @@ test_that("LAB_TSC_across_", { expect_equal(res[[6]], '5.89(1.15)') }) -context("ds.meanByClass::smk::calculate the mean proportion for LAB_HDL across PM_BMI_CATEGORICAL categories") +# context("ds.meanByClass::smk::calculate the mean proportion for LAB_HDL across PM_BMI_CATEGORICAL categories") res <- ds.meanByClass(x='D', outvar='LAB_HDL', covar='PM_BMI_CATEGORICAL') test_that("LAB_HDL_across_PM_BMI_CATEGORICAL", { @@ -53,7 +54,7 @@ test_that("LAB_HDL_across_PM_BMI_CATEGORICAL", { }) -context("ds.meanByClass::smk::calculate the mean proportion for LAB_HDL & LAB_TSC across bmi categories") +# context("ds.meanByClass::smk::calculate the mean proportion for LAB_HDL & LAB_TSC across bmi categories") res <- ds.meanByClass(x='D', outvar=c('LAB_HDL','LAB_TSC'), covar=c('PM_BMI_CATEGORICAL')) test_that("LAB_HDL-LAB_TSC_across_PM_BMI_CATEGORICAL", { @@ -77,7 +78,7 @@ test_that("LAB_HDL-LAB_TSC_across_PM_BMI_CATEGORICAL", { # res <- ds.meanByClass(datasources=ds.test_env$connection.opal, x='D', outvar=c('LAB_HDL','LAB_TSC'), covar=c('GENDER','PM_BMI_CATEGORICAL','DIS_DIAB')) -context("ds.meanByClass::smk::calculate the mean proportion for LAB_HDL across PM_BMI_CATEGORICAL categories, split") +# context("ds.meanByClass::smk::calculate the mean proportion for LAB_HDL across PM_BMI_CATEGORICAL categories, split") res <- ds.meanByClass(x='D', outvar='LAB_HDL', covar='PM_BMI_CATEGORICAL', type='split') test_that("LAB_HDL_across_PM_BMI_CATEGORICAL", { @@ -110,7 +111,7 @@ test_that("LAB_HDL_across_PM_BMI_CATEGORICAL", { # Tear down # -context("ds.meanByClass::smk::shutdown") +# context("ds.meanByClass::smk::shutdown") test_that("shutdown", { ds_expect_variables(c("D", "D.PM_BMI_CATEGORICAL1", "D.PM_BMI_CATEGORICAL2", "D.PM_BMI_CATEGORICAL3", @@ -119,4 +120,4 @@ test_that("shutdown", { disconnect.studies.dataset.cnsim() -context("ds.meanByClass::smk::done") +# context("ds.meanByClass::smk::done") diff --git a/tests/testthat/test-smk-ds.meanSdGp.R b/tests/testthat/test-smk-ds.meanSdGp.R index 45da49e34..14561fd09 100644 --- a/tests/testthat/test-smk-ds.meanSdGp.R +++ b/tests/testthat/test-smk-ds.meanSdGp.R @@ -1,5 +1,6 @@ #------------------------------------------------------------------------------- # Copyright (c) 2018-2022 University of Newcastle upon Tyne. All rights reserved. +# Copyright (c) 2022-2025 Arjuna Technologies, Newcastle upon Tyne. All rights reserved. # # This program and the accompanying materials # are made available under the terms of the GNU Public License v3.0. @@ -12,7 +13,7 @@ # Set up # -context("ds.meanSdGp::smk::setup") +# context("ds.meanSdGp::smk::setup") connect.studies.dataset.survival(list("age.60", "female")) @@ -24,7 +25,7 @@ test_that("setup", { # Tests # -context("ds.meanSdGp::smk::type=split") +# context("ds.meanSdGp::smk::type=split") test_that("meanSdGp values [split]", { stat.meanSdGp <- ds.meanSdGp(x='D$age.60', y='D$female', type='split') @@ -38,7 +39,7 @@ test_that("meanSdGp values [split]", { expect_true("numeric" %in% class(stat.meanSdGp$Total_Ntotal)) }) -context("ds.meanSdGp::smk::type=combine") +# context("ds.meanSdGp::smk::type=combine") test_that("meanSdGp values [combine]", { stat.meanSdGp <- ds.meanSdGp(x='D$age.60', y='D$female', type='combine') @@ -52,7 +53,7 @@ test_that("meanSdGp values [combine]", { expect_true("numeric" %in% class(stat.meanSdGp$Total_Ntotal)) }) -context("ds.meanSdGp::smk::type=both") +# context("ds.meanSdGp::smk::type=both") test_that("meanSdGp values [both]", { stat.meanSdGp <- ds.meanSdGp(x='D$age.60', y='D$female', type='both') @@ -70,7 +71,7 @@ test_that("meanSdGp values [both]", { # Done # -context("ds.meanSdGp::smk::shutdown") +# context("ds.meanSdGp::smk::shutdown") test_that("shutdown", { ds_expect_variables(c("D")) @@ -78,4 +79,4 @@ test_that("shutdown", { disconnect.studies.dataset.survival() -context("ds.meanSdGp::smk::done") +# context("ds.meanSdGp::smk::done") diff --git a/tests/testthat/test-smk-ds.merge.R b/tests/testthat/test-smk-ds.merge.R index 521483eb9..fb58dcf5b 100644 --- a/tests/testthat/test-smk-ds.merge.R +++ b/tests/testthat/test-smk-ds.merge.R @@ -1,5 +1,6 @@ #------------------------------------------------------------------------------- # Copyright (c) 2018-2022 University of Newcastle upon Tyne. All rights reserved. +# Copyright (c) 2022-2025 Arjuna Technologies, Newcastle upon Tyne. All rights reserved. # # This program and the accompanying materials # are made available under the terms of the GNU Public License v3.0. @@ -12,7 +13,7 @@ # Set up # -context("ds.merge::smk::setup") +# context("ds.merge::smk::setup") connect.studies.dataset.cnsim(list("LAB_TSC", "LAB_TRIG", "LAB_HDL", "DIS_CVA", "DIS_AMI")) @@ -24,7 +25,7 @@ test_that("setup", { # Tests # -context("ds.merge::smk") +# context("ds.merge::smk") test_that("simple test", { spec_vectors_1 <- c('D$LAB_TSC', 'D$LAB_HDL') spec_vectors_2 <- c('D$LAB_TSC', 'D$DIS_AMI') @@ -49,7 +50,7 @@ test_that("simple test", { # Done # -context("ds.merge::smk::shutdown") +# context("ds.merge::smk::shutdown") test_that("shutdown", { ds_expect_variables(c("D", "test_1_df", "test_2_df", "merge_newobj")) @@ -57,4 +58,4 @@ test_that("shutdown", { disconnect.studies.dataset.cnsim() -context("ds.merge::smk::done") +# context("ds.merge::smk::done") diff --git a/tests/testthat/test-smk-ds.message.R b/tests/testthat/test-smk-ds.message.R index ec9675870..bc3572633 100644 --- a/tests/testthat/test-smk-ds.message.R +++ b/tests/testthat/test-smk-ds.message.R @@ -1,5 +1,6 @@ #------------------------------------------------------------------------------- # Copyright (c) 2019-2022 University of Newcastle upon Tyne. All rights reserved. +# Copyright (c) 2022-2025 Arjuna Technologies, Newcastle upon Tyne. All rights reserved. # # This program and the accompanying materials # are made available under the terms of the GNU Public License v3.0. @@ -12,7 +13,7 @@ # Set up # -context("ds.message::smk::setup") +# context("ds.message::smk::setup") connect.studies.dataset.cnsim(list("LAB_TSC")) @@ -25,7 +26,7 @@ test_that("setup", { # Tests # -context("ds.message::smk") +# context("ds.message::smk") test_that("not exists - request message", { message.res <- ds.message('Test') @@ -94,7 +95,7 @@ test_that("partial - request message - conn 3", { # # Done # -context("ds.message::smk::shutdown") +# context("ds.message::smk::shutdown") test_that("shutdown", { ds_expect_variables(c("D", "Test")) @@ -102,4 +103,4 @@ test_that("shutdown", { disconnect.studies.dataset.cnsim() -context("ds.message::smk::done") +# context("ds.message::smk::done") diff --git a/tests/testthat/test-smk-ds.metadata.R b/tests/testthat/test-smk-ds.metadata.R index a3f5329af..5acbb2ad6 100644 --- a/tests/testthat/test-smk-ds.metadata.R +++ b/tests/testthat/test-smk-ds.metadata.R @@ -1,5 +1,6 @@ #------------------------------------------------------------------------------- # Copyright (c) 2018-2022 University of Newcastle upon Tyne. All rights reserved. +# Copyright (c) 2022-2025 Arjuna Technologies, Newcastle upon Tyne. All rights reserved. # # This program and the accompanying materials # are made available under the terms of the GNU Public License v3.0. @@ -12,7 +13,7 @@ # Set up # -context("ds.metadata::smk::setup") +# context("ds.metadata::smk::setup") connect.studies.dataset.cnsim(list('LAB_TSC', 'LAB_TRIG', 'LAB_HDL', 'LAB_GLUC_ADJUSTED', 'PM_BMI_CONTINUOUS', 'DIS_CVA', 'MEDI_LPD', 'DIS_DIAB', 'DIS_AMI', 'GENDER', 'PM_BMI_CATEGORICAL')) @@ -24,7 +25,7 @@ test_that("setup", { # Tests # -context("ds.metadata::smk") +# context("ds.metadata::smk") test_that("data.frame metadata", { res <- ds.metadata(x='D') @@ -113,7 +114,7 @@ test_that("column metadata", { # Tear down # -context("ds.metadata::smk::shutdown") +# context("ds.metadata::smk::shutdown") test_that("shutdown", { ds_expect_variables(c("D")) @@ -121,4 +122,4 @@ test_that("shutdown", { disconnect.studies.dataset.cnsim() -context("ds.metadata::smk::done") +# context("ds.metadata::smk::done") diff --git a/tests/testthat/test-smk-ds.mice.R b/tests/testthat/test-smk-ds.mice.R index 802cf8663..71c0464a4 100644 --- a/tests/testthat/test-smk-ds.mice.R +++ b/tests/testthat/test-smk-ds.mice.R @@ -1,5 +1,6 @@ #------------------------------------------------------------------------------- # Copyright (c) 2019-2022 University of Newcastle upon Tyne. All rights reserved. +# Copyright (c) 2022-2025 Arjuna Technologies, Newcastle upon Tyne. All rights reserved. # # This program and the accompanying materials # are made available under the terms of the GNU Public License v3.0. @@ -12,7 +13,7 @@ # Set up # -context("ds.mice::smk::setup") +# context("ds.mice::smk::setup") connect.studies.dataset.cnsim(list("LAB_TSC","LAB_TRIG","LAB_HDL","LAB_GLUC_ADJUSTED", "PM_BMI_CONTINUOUS","DIS_CVA","MEDI_LPD","DIS_DIAB", @@ -26,7 +27,7 @@ test_that("setup", { # Tests # -context("ds.mice::smk::imp1") +# context("ds.mice::smk::imp1") test_that("mice, initial imputation", { initialImp <- ds.mice(data="D", m=1, method=NULL, predictorMatrix=NULL, post=NULL, seed="NA", newobj_df='impSet') @@ -60,7 +61,7 @@ test_that("mice, initial imputation", { }) -context("ds.mice::smk::imp2") +# context("ds.mice::smk::imp2") test_that("mice, second imputation", { initialImp <- ds.mice(data="D", m=1, method=NULL, predictorMatrix=NULL, post=NULL, seed="NA", @@ -126,7 +127,7 @@ test_that("mice, second imputation", { # Done # -context("ds.mice::smk::shutdown") +# context("ds.mice::smk::shutdown") test_that("shutdown", { ds_expect_variables(c("D", "impSet.1", "imp_new.1","imp_new.2","imp_new.3","imp_new.4","imp_new.5", @@ -135,4 +136,4 @@ test_that("shutdown", { disconnect.studies.dataset.cnsim() -context("ds.mice::smk::done") +# context("ds.mice::smk::done") diff --git a/tests/testthat/test-smk-ds.names.R b/tests/testthat/test-smk-ds.names.R index 97f3fef9e..e73b7b57c 100644 --- a/tests/testthat/test-smk-ds.names.R +++ b/tests/testthat/test-smk-ds.names.R @@ -1,5 +1,6 @@ #------------------------------------------------------------------------------- # Copyright (c) 2018-2022 University of Newcastle upon Tyne. All rights reserved. +# Copyright (c) 2022-2025 Arjuna Technologies, Newcastle upon Tyne. All rights reserved. # # This program and the accompanying materials # are made available under the terms of the GNU Public License v3.0. @@ -12,7 +13,7 @@ # Set up # -context("ds.names::smk::setup") +# context("ds.names::smk::setup") connect.studies.dataset.cnsim(list("LAB_TSC", "DIS_DIAB", "PM_BMI_CONTINUOUS", "LAB_HDL", "GENDER")) @@ -24,7 +25,7 @@ test_that("setup", { # Tests # -context("ds.names::smk") +# context("ds.names::smk") test_that("level_names", { myobjects <- c('D$LAB_TSC', 'D$LAB_HDL') res_list <- ds.list(x=myobjects, newobj='my_newobj') @@ -47,7 +48,7 @@ test_that("level_names", { # Tear down # -context("ds.names::smk::shutdown") +# context("ds.names::smk::shutdown") test_that("shutdown", { ds_expect_variables(c("D", "my_newobj")) @@ -55,4 +56,4 @@ test_that("shutdown", { disconnect.studies.dataset.cnsim() -context("ds.names::smk::done") +# context("ds.names::smk::done") diff --git a/tests/testthat/test-smk-ds.ns.R b/tests/testthat/test-smk-ds.ns.R index a1f66c791..d925aa1e9 100644 --- a/tests/testthat/test-smk-ds.ns.R +++ b/tests/testthat/test-smk-ds.ns.R @@ -1,5 +1,6 @@ #------------------------------------------------------------------------------- # Copyright (c) 2019-2022 University of Newcastle upon Tyne. All rights reserved. +# Copyright (c) 2022-2025 Arjuna Technologies, Newcastle upon Tyne. All rights reserved. # # This program and the accompanying materials # are made available under the terms of the GNU Public License v3.0. @@ -12,7 +13,7 @@ # Set up # -context("ds.ns::smk::setup") +# context("ds.ns::smk::setup") connect.studies.dataset.cnsim(list("LAB_TRIG", "PM_BMI_CONTINUOUS")) @@ -24,7 +25,7 @@ test_that("setup", { # Tests # -context("ds.ns::smk::test1") +# context("ds.ns::smk::test1") test_that("ns", { ds.ns(x="D$PM_BMI_CONTINUOUS", knots=c(15,25,35), newobj="nsDS", datasources=ds.test_env$connections) @@ -85,7 +86,7 @@ test_that("ns", { # Done # -context("ds.ns::smk::shutdown") +# context("ds.ns::smk::shutdown") test_that("shutdown", { ds_expect_variables(c("D", "LAB_TRIG", "nsDS")) @@ -93,4 +94,4 @@ test_that("shutdown", { disconnect.studies.dataset.cnsim() -context("ds.ns::smk::done") +# context("ds.ns::smk::done") diff --git a/tests/testthat/test-smk-ds.numNA.R b/tests/testthat/test-smk-ds.numNA.R index ed332d7a5..0c71e93f9 100644 --- a/tests/testthat/test-smk-ds.numNA.R +++ b/tests/testthat/test-smk-ds.numNA.R @@ -1,5 +1,6 @@ #------------------------------------------------------------------------------- # Copyright (c) 2019-2022 University of Newcastle upon Tyne. All rights reserved. +# Copyright (c) 2022-2025 Arjuna Technologies, Newcastle upon Tyne. All rights reserved. # # This program and the accompanying materials # are made available under the terms of the GNU Public License v3.0. @@ -12,7 +13,7 @@ # Set up # -context("ds.numNA::smk::setup") +# context("ds.numNA::smk::setup") connect.studies.dataset.cnsim(list("LAB_HDL", "LAB_TRIG", "DIS_CVA")) @@ -24,7 +25,7 @@ test_that("setup", { # Tests # -context("ds.numNA::smk") +# context("ds.numNA::smk") test_that("simple numNA", { res1 <- ds.numNA(x='D$LAB_HDL') @@ -52,7 +53,7 @@ test_that("simple numNA", { # Done # -context("ds.numNA::smk::shutdown") +# context("ds.numNA::smk::shutdown") test_that("shutdown", { ds_expect_variables(c("D")) @@ -60,4 +61,4 @@ test_that("shutdown", { disconnect.studies.dataset.cnsim() -context("ds.numNA::smk::done") +# context("ds.numNA::smk::done") diff --git a/tests/testthat/test-smk-ds.qlspline.R b/tests/testthat/test-smk-ds.qlspline.R index 2c55b0d50..e8b89701e 100644 --- a/tests/testthat/test-smk-ds.qlspline.R +++ b/tests/testthat/test-smk-ds.qlspline.R @@ -1,5 +1,6 @@ #------------------------------------------------------------------------------- # Copyright (c) 2019-2022 University of Newcastle upon Tyne. All rights reserved. +# Copyright (c) 2022-2025 Arjuna Technologies, Newcastle upon Tyne. All rights reserved. # # This program and the accompanying materials # are made available under the terms of the GNU Public License v3.0. @@ -12,7 +13,7 @@ # Set up # -context("ds.qlspline::smk::setup") +# context("ds.qlspline::smk::setup") connect.studies.dataset.cnsim(list("LAB_TRIG", "PM_BMI_CONTINUOUS")) @@ -24,7 +25,7 @@ test_that("setup", { # Tests # -context("ds.qlspline::smk::test1") +# context("ds.qlspline::smk::test1") test_that("qlspline", { ds.qlspline(x="D$PM_BMI_CONTINUOUS", q=4, na.rm=TRUE, newobj="qlsplineDS", datasources=ds.test_env$connections) @@ -76,7 +77,7 @@ test_that("qlspline", { }) -context("ds.qlspline::smk::test2") +# context("ds.qlspline::smk::test2") test_that("qlspline", { ds.qlspline(x="D$PM_BMI_CONTINUOUS", q=c(0.3,0.6), na.rm=TRUE, newobj="qlsplineDS2", datasources=ds.test_env$connections) @@ -130,7 +131,7 @@ test_that("qlspline", { # Done # -context("ds.qlspline::smk::shutdown") +# context("ds.qlspline::smk::shutdown") test_that("shutdown", { ds_expect_variables(c("D", "LAB_TRIG", "qlsplineDS", "qlsplineDS2")) @@ -138,4 +139,4 @@ test_that("shutdown", { disconnect.studies.dataset.cnsim() -context("ds.qlspline::smk::done") +# context("ds.qlspline::smk::done") diff --git a/tests/testthat/test-smk-ds.quantileMean.R b/tests/testthat/test-smk-ds.quantileMean.R index 59c5479db..1438fb772 100644 --- a/tests/testthat/test-smk-ds.quantileMean.R +++ b/tests/testthat/test-smk-ds.quantileMean.R @@ -1,5 +1,6 @@ #------------------------------------------------------------------------------- # Copyright (c) 2018-2022 University of Newcastle upon Tyne. All rights reserved. +# Copyright (c) 2022-2025 Arjuna Technologies, Newcastle upon Tyne. All rights reserved. # # This program and the accompanying materials # are made available under the terms of the GNU Public License v3.0. @@ -12,7 +13,7 @@ # Set up # -context("ds.quantileMean::smk::setup") +# context("ds.quantileMean::smk::setup") connect.studies.dataset.cnsim(list('LAB_HDL')) @@ -24,7 +25,7 @@ test_that("setup", { # Tests # -context("ds.quantileMean::smk::standard") +# context("ds.quantileMean::smk::standard") test_that("quantileMean", { res <- ds.quantileMean(x='D$LAB_HDL') @@ -39,7 +40,7 @@ test_that("quantileMean", { expect_equal(res[[8]], 1.5676188, tolerance = .000001) }) -context("ds.quantileMean::smk::split") +# context("ds.quantileMean::smk::split") test_that("quantileMean_split", { ds.assign("D$LAB_HDL", "hdl") res <- ds.quantileMean(x='hdl', type='split') @@ -78,7 +79,7 @@ test_that("quantileMean_split", { # Tear down # -context("ds.quantileMean::smk::shutdown") +# context("ds.quantileMean::smk::shutdown") test_that("shutdown", { ds_expect_variables(c("D", "hdl")) @@ -86,4 +87,4 @@ test_that("shutdown", { disconnect.studies.dataset.cnsim() -context("ds.quantileMean::smk::done") +# context("ds.quantileMean::smk::done") diff --git a/tests/testthat/test-smk-ds.rBinom.R b/tests/testthat/test-smk-ds.rBinom.R index 000f41833..657466933 100644 --- a/tests/testthat/test-smk-ds.rBinom.R +++ b/tests/testthat/test-smk-ds.rBinom.R @@ -1,5 +1,6 @@ #------------------------------------------------------------------------------- # Copyright (c) 2018-2022 University of Newcastle upon Tyne. All rights reserved. +# Copyright (c) 2022-2025 Arjuna Technologies, Newcastle upon Tyne. All rights reserved. # # This program and the accompanying materials # are made available under the terms of the GNU Public License v3.0. @@ -12,7 +13,7 @@ # Set up # -context("ds.rBinom::smk::setup") +# context("ds.rBinom::smk::setup") connect.studies.dataset.cnsim(list("LAB_TSC")) @@ -24,7 +25,7 @@ test_that("setup", { # Tests # -context("ds.rBinom::smk::simple test") +# context("ds.rBinom::smk::simple test") test_that("simple test", { res <- ds.rBinom(samp.size = 50, size = 50, prob = 0.25, newobj = "binom_dist", seed.as.integer = 27) @@ -45,7 +46,7 @@ test_that("simple test", { # Done # -context("ds.rBinom::smk::shutdown") +# context("ds.rBinom::smk::shutdown") test_that("shutdown", { ds_expect_variables(c("D", "binom_dist")) @@ -53,4 +54,4 @@ test_that("shutdown", { disconnect.studies.dataset.cnsim() -context("ds.rBinom::smk::done") +# context("ds.rBinom::smk::done") diff --git a/tests/testthat/test-smk-ds.rNorm.R b/tests/testthat/test-smk-ds.rNorm.R index 9996db9a8..cc63c1c04 100644 --- a/tests/testthat/test-smk-ds.rNorm.R +++ b/tests/testthat/test-smk-ds.rNorm.R @@ -1,5 +1,6 @@ #------------------------------------------------------------------------------- # Copyright (c) 2018-2022 University of Newcastle upon Tyne. All rights reserved. +# Copyright (c) 2022-2025 Arjuna Technologies, Newcastle upon Tyne. All rights reserved. # # This program and the accompanying materials # are made available under the terms of the GNU Public License v3.0. @@ -12,7 +13,7 @@ # Set up # -context("ds.rNorm::smk::setup") +# context("ds.rNorm::smk::setup") connect.studies.dataset.cnsim(list("LAB_TSC")) @@ -24,7 +25,7 @@ test_that("setup", { # Tests # -context("ds.rNorm::smk::simple test") +# context("ds.rNorm::smk::simple test") test_that("simple test", { res <- ds.rNorm(samp.size = 50, mean = 10, sd = 5, newobj = "norm_dist", seed.as.integer = 27, force.output.to.k.decimal.places = 4) @@ -45,7 +46,7 @@ test_that("simple test", { # Done # -context("ds.rNorm::smk::shutdown") +# context("ds.rNorm::smk::shutdown") test_that("shutdown", { ds_expect_variables(c("D", "norm_dist")) @@ -53,4 +54,4 @@ test_that("shutdown", { disconnect.studies.dataset.cnsim() -context("ds.rNorm::smk::done") +# context("ds.rNorm::smk::done") diff --git a/tests/testthat/test-smk-ds.rPois.R b/tests/testthat/test-smk-ds.rPois.R index 38ebe55c2..68e74802c 100644 --- a/tests/testthat/test-smk-ds.rPois.R +++ b/tests/testthat/test-smk-ds.rPois.R @@ -1,5 +1,6 @@ #------------------------------------------------------------------------------- # Copyright (c) 2018-2022 University of Newcastle upon Tyne. All rights reserved. +# Copyright (c) 2022-2025 Arjuna Technologies, Newcastle upon Tyne. All rights reserved. # # This program and the accompanying materials # are made available under the terms of the GNU Public License v3.0. @@ -12,7 +13,7 @@ # Set up # -context("ds.rPois::smk::setup") +# context("ds.rPois::smk::setup") connect.studies.dataset.cnsim(list("LAB_TSC")) @@ -24,7 +25,7 @@ test_that("setup", { # Tests # -context("ds.rPois::smk::simple test") +# context("ds.rPois::smk::simple test") test_that("simple test", { res <- ds.rPois(samp.size = 50, lambda = 1, newobj = "pois_dist", seed.as.integer = 27) @@ -45,7 +46,7 @@ test_that("simple test", { # Done # -context("ds.rPois::smk::shutdown") +# context("ds.rPois::smk::shutdown") test_that("shutdown", { ds_expect_variables(c("D", "pois_dist")) @@ -53,4 +54,4 @@ test_that("shutdown", { disconnect.studies.dataset.cnsim() -context("ds.rPois::smk::done") +# context("ds.rPois::smk::done") diff --git a/tests/testthat/test-smk-ds.rUnif.R b/tests/testthat/test-smk-ds.rUnif.R index 3682a0c30..f8fa681bd 100644 --- a/tests/testthat/test-smk-ds.rUnif.R +++ b/tests/testthat/test-smk-ds.rUnif.R @@ -1,5 +1,6 @@ #------------------------------------------------------------------------------- # Copyright (c) 2018-2022 University of Newcastle upon Tyne. All rights reserved. +# Copyright (c) 2022-2025 Arjuna Technologies, Newcastle upon Tyne. All rights reserved. # # This program and the accompanying materials # are made available under the terms of the GNU Public License v3.0. @@ -12,7 +13,7 @@ # Set up # -context("ds.rUnif::smk::setup") +# context("ds.rUnif::smk::setup") connect.studies.dataset.cnsim(list("LAB_TSC")) @@ -24,7 +25,7 @@ test_that("setup", { # Tests # -context("ds.rUnif::smk::simple test") +# context("ds.rUnif::smk::simple test") test_that("simple test", { res <- ds.rUnif(samp.size = 50, min = 0, max = 1, newobj = "unif_dist", seed.as.integer = 27, force.output.to.k.decimal.places = 4) @@ -45,7 +46,7 @@ test_that("simple test", { # Done # -context("ds.rUnif::smk::shutdown") +# context("ds.rUnif::smk::shutdown") test_that("shutdown", { ds_expect_variables(c("D", "unif_dist")) @@ -53,4 +54,4 @@ test_that("shutdown", { disconnect.studies.dataset.cnsim() -context("ds.rUnif::smk::done") +# context("ds.rUnif::smk::done") diff --git a/tests/testthat/test-smk-ds.ranksSecure.R b/tests/testthat/test-smk-ds.ranksSecure.R index 890ac2633..43720c1f9 100644 --- a/tests/testthat/test-smk-ds.ranksSecure.R +++ b/tests/testthat/test-smk-ds.ranksSecure.R @@ -1,5 +1,6 @@ #------------------------------------------------------------------------------- # Copyright (c) 2019-2022 University of Newcastle upon Tyne. All rights reserved. +# Copyright (c) 2022-2025 Arjuna Technologies, Newcastle upon Tyne. All rights reserved. # # This program and the accompanying materials # are made available under the terms of the GNU Public License v3.0. @@ -12,7 +13,7 @@ # Set up # -context("ds.ranksSecure::smk::setup") +# context("ds.ranksSecure::smk::setup") connect.studies.dataset.cnsim(list("LAB_TRIG", "LAB_TSC")) @@ -24,7 +25,7 @@ test_that("setup", { # Tests # -context("ds.ranksSecure::smk::continous, without NAs, all positive") +# context("ds.ranksSecure::smk::continous, without NAs, all positive") test_that("continous, without NAs, all positive", { res.cc <- ds.completeCases("D$LAB_TSC", newobj="CC_LAB_TSC") expect_equal(res.cc$validity.check, " appears valid in all sources") @@ -51,7 +52,7 @@ test_that("continous, without NAs, all positive", { expect_true(all(class(res$final.quantile.vector) %in% c('numeric'))) }) -context("ds.ranksSecure::smk::continous, without NAs, with negative") +# context("ds.ranksSecure::smk::continous, without NAs, with negative") test_that("continous, without NAs, with negative", { res.cc <- ds.completeCases("D$LAB_TRIG", newobj="CC_LAB_TRIG") expect_equal(res.cc$validity.check, " appears valid in all sources") @@ -78,7 +79,7 @@ test_that("continous, without NAs, with negative", { expect_true(all(class(res$final.quantile.vector) %in% c('numeric'))) }) -context("ds.ranksSecure::smk::continous, with NAs, all positive") +# context("ds.ranksSecure::smk::continous, with NAs, all positive") test_that("continous, with NAs, all positive", { res <- ds.ranksSecure("D$LAB_TSC") @@ -96,7 +97,7 @@ test_that("continous, with NAs, all positive", { expect_true(all(class(res$final.quantile.vector) %in% c('numeric'))) }) -context("ds.ranksSecure::smk::continous, with NAs, with negative") +# context("ds.ranksSecure::smk::continous, with NAs, with negative") test_that("continous, with NAs, with negative", { res <- ds.ranksSecure("D$LAB_TRIG") @@ -119,7 +120,7 @@ test_that("continous, with NAs, with negative", { # Done # -context("ds.ranksSecure::smk::shutdown") +# context("ds.ranksSecure::smk::shutdown") test_that("setup", { ds_expect_variables(c("D", "CC_LAB_TSC", "CC_LAB_TRIG", "final.quantile.df", "summary.ranks.df", "testvar.ranks")) @@ -127,4 +128,4 @@ test_that("setup", { disconnect.studies.dataset.cnsim() -context("ds.ranksSecure::smk::done") +# context("ds.ranksSecure::smk::done") diff --git a/tests/testthat/test-smk-ds.rbind.R b/tests/testthat/test-smk-ds.rbind.R index 20cc910c7..af01b50e7 100644 --- a/tests/testthat/test-smk-ds.rbind.R +++ b/tests/testthat/test-smk-ds.rbind.R @@ -1,5 +1,6 @@ #------------------------------------------------------------------------------- # Copyright (c) 2018-2022 University of Newcastle upon Tyne. All rights reserved. +# Copyright (c) 2022-2025 Arjuna Technologies, Newcastle upon Tyne. All rights reserved. # # This program and the accompanying materials # are made available under the terms of the GNU Public License v3.0. @@ -12,7 +13,7 @@ # Set up # -context("ds.rbind::smk::setup") +# context("ds.rbind::smk::setup") connect.studies.dataset.survival(list("survtime", "time.id", "female", "age.60")) @@ -24,7 +25,7 @@ test_that("setup", { # Tests # -context("ds.rbind::smk") +# context("ds.rbind::smk") test_that("simple test", { res <- ds.rbind(c("D$survtime", "D$time.id", "D$female", "D$age.60"), newobj="rbind_newobj") @@ -42,7 +43,7 @@ test_that("simple test", { # Done # -context("ds.rbind::smk::shutdown") +# context("ds.rbind::smk::shutdown") test_that("shutdown", { ds_expect_variables(c("D", "rbind_newobj")) @@ -50,4 +51,4 @@ test_that("shutdown", { disconnect.studies.dataset.survival() -context("ds.rbind::smk::done") +# context("ds.rbind::smk::done") diff --git a/tests/testthat/test-smk-ds.reShape.R b/tests/testthat/test-smk-ds.reShape.R index 5b96a861c..2836d20be 100644 --- a/tests/testthat/test-smk-ds.reShape.R +++ b/tests/testthat/test-smk-ds.reShape.R @@ -1,5 +1,6 @@ #------------------------------------------------------------------------------- # Copyright (c) 2019-2022 University of Newcastle upon Tyne. All rights reserved. +# Copyright (c) 2022-2025 Arjuna Technologies, Newcastle upon Tyne. All rights reserved. # # This program and the accompanying materials # are made available under the terms of the GNU Public License v3.0. @@ -12,7 +13,7 @@ # Set up # -context("ds.reShape::smk::setup") +# context("ds.reShape::smk::setup") connect.studies.dataset.survival(list("id", "study.id", "time.id", "cens", "age.60", "female")) @@ -24,7 +25,7 @@ test_that("setup", { # Tests # -context("ds.reShape::smk") +# context("ds.reShape::smk") test_that("simplest ds.reShape, wide", { res <- ds.reShape(data.name="D", v.names="age.60", timevar.name="time.id", idvar.name="id", direction="wide", newobj="reshape1_obj") @@ -45,7 +46,7 @@ test_that("simplest ds.reShape, wide", { # Done # -context("ds.reShape::smk::shutdown") +# context("ds.reShape::smk::shutdown") test_that("shutdown", { ds_expect_variables(c("D", "reshape1_obj")) @@ -53,4 +54,4 @@ test_that("shutdown", { disconnect.studies.dataset.survival() -context("ds.reShape::smk::done") +# context("ds.reShape::smk::done") diff --git a/tests/testthat/test-smk-ds.recodeLevels.R b/tests/testthat/test-smk-ds.recodeLevels.R index cdc3d7879..3b813074f 100644 --- a/tests/testthat/test-smk-ds.recodeLevels.R +++ b/tests/testthat/test-smk-ds.recodeLevels.R @@ -1,5 +1,6 @@ #------------------------------------------------------------------------------- # Copyright (c) 2018-2022 University of Newcastle upon Tyne. All rights reserved. +# Copyright (c) 2022-2025 Arjuna Technologies, Newcastle upon Tyne. All rights reserved. # # This program and the accompanying materials # are made available under the terms of the GNU Public License v3.0. @@ -12,7 +13,7 @@ # Set up # -context("ds.recodeLevels::smk::setup") +# context("ds.recodeLevels::smk::setup") connect.studies.dataset.cnsim(list("PM_BMI_CATEGORICAL")) @@ -24,7 +25,7 @@ test_that("setup", { # Tests # -context("ds.recodeLevels::smk") +# context("ds.recodeLevels::smk") test_that("new levels", { expect_warning(ds.recodeLevels(x='D$PM_BMI_CATEGORICAL', newCategories=c('normal', 'overweight', 'obesity'), newobj='bmi_new'), "'ds.recodeLevels' is deprecated.\nUse 'ds.recodeValues' instead.", fixed = TRUE) levels <- ds.levels(x='bmi_new') @@ -39,7 +40,7 @@ test_that("new levels", { expect_equal(levels$sim3$Levels, expected) }) -context("ds.recodeLevels::smk::no connections or newobj") +# context("ds.recodeLevels::smk::no connections or newobj") test_that("new levels auto", { expect_warning(ds.recodeLevels(x='D$PM_BMI_CATEGORICAL', newCategories=c('normal', 'overweight', 'obesity')), "'ds.recodeLevels' is deprecated.\nUse 'ds.recodeValues' instead.", fixed = TRUE) levels <- ds.levels(x='PM_BMI_CATEGORICAL_new') @@ -58,7 +59,7 @@ test_that("new levels auto", { # Tear down # -context("ds.recodeLevels::smk::shutdown") +# context("ds.recodeLevels::smk::shutdown") test_that("shutdown", { ds_expect_variables(c("D", "bmi_new", "PM_BMI_CATEGORICAL_new")) @@ -66,4 +67,4 @@ test_that("shutdown", { disconnect.studies.dataset.cnsim() -context("ds.recodeLevels::smk::done") +# context("ds.recodeLevels::smk::done") diff --git a/tests/testthat/test-smk-ds.recodeValues.R b/tests/testthat/test-smk-ds.recodeValues.R index 187ec63d5..a20d4db47 100644 --- a/tests/testthat/test-smk-ds.recodeValues.R +++ b/tests/testthat/test-smk-ds.recodeValues.R @@ -1,5 +1,6 @@ #------------------------------------------------------------------------------- # Copyright (c) 2018-2022 University of Newcastle upon Tyne. All rights reserved. +# Copyright (c) 2022-2025 Arjuna Technologies, Newcastle upon Tyne. All rights reserved. # # This program and the accompanying materials # are made available under the terms of the GNU Public License v3.0. @@ -12,7 +13,7 @@ # Set up # -context("ds.recodeValues::smk::setup") +# context("ds.recodeValues::smk::setup") connect.studies.dataset.survival(list("survtime", "time.id", "female", "age.60")) @@ -24,7 +25,7 @@ test_that("setup", { # Tests # -context("ds.recodeValues::smk") +# context("ds.recodeValues::smk") test_that("simple test", { res <- ds.recodeValues("D$survtime", values2replace.vector=c(0,1), new.values.vector=c(-10,10), newobj="recodevalues_newobj") @@ -43,7 +44,7 @@ test_that("simple test", { # # Done # -context("ds.recodeValues::smk::shutdown") +# context("ds.recodeValues::smk::shutdown") test_that("shutdown", { ds_expect_variables(c("D", "recodevalues_newobj")) @@ -51,4 +52,4 @@ test_that("shutdown", { disconnect.studies.dataset.survival() -context("ds.recodeValues::smk::done") +# context("ds.recodeValues::smk::done") diff --git a/tests/testthat/test-smk-ds.rep-complex.R b/tests/testthat/test-smk-ds.rep-complex.R index 1a42fdbc3..7d86a8266 100644 --- a/tests/testthat/test-smk-ds.rep-complex.R +++ b/tests/testthat/test-smk-ds.rep-complex.R @@ -1,5 +1,6 @@ #------------------------------------------------------------------------------- # Copyright (c) 2018-2022 University of Newcastle upon Tyne. All rights reserved. +# Copyright (c) 2022-2025 Arjuna Technologies, Newcastle upon Tyne. All rights reserved. # # This program and the accompanying materials # are made available under the terms of the GNU Public License v3.0. @@ -12,7 +13,7 @@ # Set up # -context("ds.rep::smk::complex setup") +# context("ds.rep::smk::complex setup") connect.studies.dataset.cnsim(list("LAB_TSC", "GENDER")) @@ -24,7 +25,7 @@ test_that("setup", { # Tests # -context("ds.rep::smk::complex") +# context("ds.rep::smk::complex") test_that("complex test", { res1 <- ds.rep(x1 = 4, times = 6, length.out = NA, each = 1, source.x1 = "clientside", source.times = "c", source.length.out = NULL, source.each = "c", x1.includes.characters = FALSE, newobj = "rep1.seq") @@ -44,7 +45,7 @@ test_that("complex test", { # Done # -context("ds.rep::smk::complex shutdown") +# context("ds.rep::smk::complex shutdown") test_that("shutdown", { ds_expect_variables(c("D", "rep1.seq", "rep2.seq")) @@ -52,4 +53,4 @@ test_that("shutdown", { disconnect.studies.dataset.cnsim() -context("ds.rep::smk::complex done") +# context("ds.rep::smk::complex done") diff --git a/tests/testthat/test-smk-ds.rep.R b/tests/testthat/test-smk-ds.rep.R index c65cba69c..e3819cc76 100644 --- a/tests/testthat/test-smk-ds.rep.R +++ b/tests/testthat/test-smk-ds.rep.R @@ -1,5 +1,6 @@ #------------------------------------------------------------------------------- # Copyright (c) 2018-2022 University of Newcastle upon Tyne. All rights reserved. +# Copyright (c) 2022-2025 Arjuna Technologies, Newcastle upon Tyne. All rights reserved. # # This program and the accompanying materials # are made available under the terms of the GNU Public License v3.0. @@ -12,7 +13,7 @@ # Set up # -context("ds.rep::smk::setup") +# context("ds.rep::smk::setup") connect.studies.dataset.survival(list("survtime", "time.id", "female")) @@ -24,7 +25,7 @@ test_that("setup", { # Tests # -context("ds.rep::smk") +# context("ds.rep::smk") test_that("simple test", { res <- ds.rep("D$survtime") @@ -37,7 +38,7 @@ test_that("simple test", { # Done # -context("ds.rep::smk::shutdown") +# context("ds.rep::smk::shutdown") test_that("shutdown", { ds_expect_variables(c("D", "seq.vect")) @@ -45,4 +46,4 @@ test_that("shutdown", { disconnect.studies.dataset.survival() -context("ds.rep::smk::done") +# context("ds.rep::smk::done") diff --git a/tests/testthat/test-smk-ds.replaceNA.R b/tests/testthat/test-smk-ds.replaceNA.R index 9aad07feb..04bdfdf45 100644 --- a/tests/testthat/test-smk-ds.replaceNA.R +++ b/tests/testthat/test-smk-ds.replaceNA.R @@ -1,5 +1,6 @@ #------------------------------------------------------------------------------- # Copyright (c) 2019-2022 University of Newcastle upon Tyne. All rights reserved. +# Copyright (c) 2022-2025 Arjuna Technologies, Newcastle upon Tyne. All rights reserved. # # This program and the accompanying materials # are made available under the terms of the GNU Public License v3.0. @@ -12,7 +13,7 @@ # Set up # -context("ds.replaceNA::smk::setup") +# context("ds.replaceNA::smk::setup") connect.studies.dataset.cnsim(list("LAB_HDL", "LAB_TRIG", "DIS_CVA")) @@ -24,7 +25,7 @@ test_that("setup", { # Tests # -context("ds.replaceNA::smk") +# context("ds.replaceNA::smk") test_that("simple replaceNA", { res1 <- ds.replaceNA(x='D$LAB_HDL', forNA=c(1.0, 2.0, 3.0), newobj="newobj1") expect_length(res1, 0) @@ -40,7 +41,7 @@ test_that("simple replaceNA", { # Done # -context("ds.replaceNA::smk::shutdown") +# context("ds.replaceNA::smk::shutdown") test_that("setup", { ds_expect_variables(c("D", "newobj1", "newobj2", "newobj3")) @@ -48,4 +49,4 @@ test_that("setup", { disconnect.studies.dataset.cnsim() -context("ds.replaceNA::smk::done") +# context("ds.replaceNA::smk::done") diff --git a/tests/testthat/test-smk-ds.rm.R b/tests/testthat/test-smk-ds.rm.R index 75be387a5..f13b1dcfd 100644 --- a/tests/testthat/test-smk-ds.rm.R +++ b/tests/testthat/test-smk-ds.rm.R @@ -1,5 +1,6 @@ #------------------------------------------------------------------------------- # Copyright (c) 2018-2022 University of Newcastle upon Tyne. All rights reserved. +# Copyright (c) 2022-2025 Arjuna Technologies, Newcastle upon Tyne. All rights reserved. # # This program and the accompanying materials # are made available under the terms of the GNU Public License v3.0. @@ -12,7 +13,7 @@ # Set up # -context("ds.rm::smk::setup") +# context("ds.rm::smk::setup") connect.studies.dataset.survival(list("survtime", "time.id", "female")) @@ -24,7 +25,7 @@ test_that("setup", { # Tests # -context("ds.rm::smk") +# context("ds.rm::smk") test_that("simple test", { res1 <- ds.rm("nonexistant_object") @@ -67,7 +68,7 @@ test_that("simple test", { expect_equal(res2$survival1$problem.objects, "") }) -context("ds.rm::smk") +# context("ds.rm::smk") test_that("multiple test", { res1 <- ds.rm("nonexistant_object1,nonexistant_object2") @@ -136,7 +137,7 @@ test_that("multiple test", { # Done # -context("ds.rm::smk::shutdown") +# context("ds.rm::smk::shutdown") test_that("shutdown", { ds_expect_variables(c("D")) @@ -144,4 +145,4 @@ test_that("shutdown", { disconnect.studies.dataset.survival() -context("ds.rm::smk::done") +# context("ds.rm::smk::done") diff --git a/tests/testthat/test-smk-ds.rowColCalc.R b/tests/testthat/test-smk-ds.rowColCalc.R index 002d763db..792bfb5e4 100644 --- a/tests/testthat/test-smk-ds.rowColCalc.R +++ b/tests/testthat/test-smk-ds.rowColCalc.R @@ -1,5 +1,6 @@ #------------------------------------------------------------------------------- # Copyright (c) 2018-2022 University of Newcastle upon Tyne. All rights reserved. +# Copyright (c) 2022-2025 Arjuna Technologies, Newcastle upon Tyne. All rights reserved. # # This program and the accompanying materials # are made available under the terms of the GNU Public License v3.0. @@ -12,7 +13,7 @@ # Set up # -context("ds.rowColCalc::smk::setup") +# context("ds.rowColCalc::smk::setup") connect.studies.dataset.cnsim(list("LAB_TSC", "LAB_HDL")) @@ -24,7 +25,7 @@ test_that("setup", { # Tests # -context("ds.rowColCalc::smk") +# context("ds.rowColCalc::smk") ds.rowColCalc(x='D', operation="rowSums", newobj="rsum_hdl_tsc") res <- ds.exists('rsum_hdl_tsc') test_that("rowColCalc_exists", { @@ -34,7 +35,7 @@ test_that("rowColCalc_exists", { expect_true(res$sim3) }) -context("ds.rowColCalc::smk::no newobj") +# context("ds.rowColCalc::smk::no newobj") ds.rowColCalc(x='D', operation="rowSums") res <- ds.exists('rowcolcalc.newobj') test_that("rowColCalc_out_exists", { @@ -48,7 +49,7 @@ test_that("rowColCalc_out_exists", { # # Tear down # -context("ds.rowColCalc::smk::shutdown") +# context("ds.rowColCalc::smk::shutdown") test_that("shutdown", { ds_expect_variables(c("D", "rsum_hdl_tsc", "rowcolcalc.newobj")) @@ -56,4 +57,4 @@ test_that("shutdown", { disconnect.studies.dataset.cnsim() -context("ds.rowColCalc::smk::done") +# context("ds.rowColCalc::smk::done") diff --git a/tests/testthat/test-smk-ds.sample.R b/tests/testthat/test-smk-ds.sample.R index 8a251e3bb..797caefaa 100644 --- a/tests/testthat/test-smk-ds.sample.R +++ b/tests/testthat/test-smk-ds.sample.R @@ -1,5 +1,6 @@ #------------------------------------------------------------------------------- # Copyright (c) 2018-2022 University of Newcastle upon Tyne. All rights reserved. +# Copyright (c) 2022-2025 Arjuna Technologies, Newcastle upon Tyne. All rights reserved. # # This program and the accompanying materials # are made available under the terms of the GNU Public License v3.0. @@ -12,7 +13,7 @@ # Set up # -context("ds.sample::smk::setup") +# context("ds.sample::smk::setup") connect.studies.dataset.survival(list("survtime", "time.id", "female")) @@ -24,7 +25,7 @@ test_that("setup", { # Tests # -context("ds.sample::smk::test") +# context("ds.sample::smk::test") test_that("simple test", { res1 <- ds.sample(x="D", size=30) @@ -115,7 +116,7 @@ test_that("simple test", { expect_equal(res2_survtime_length$`total length of test.obj$in.sample in all studies combined`, 126) }) -context("ds.sample::smk::test error") +# context("ds.sample::smk::test error") test_that("simple test, error", { expect_error(ds.sample(x="D$survtime", size="30", newobj="no.obj"), "There are some DataSHIELD errors, list them with datashield.errors()", fixed = TRUE) @@ -131,7 +132,7 @@ test_that("simple test, error", { # Done # -context("ds.sample::smk::shutdown") +# context("ds.sample::smk::shutdown") test_that("shutdown", { ds_expect_variables(c("D", "newobj.sample", "test.obj")) @@ -139,4 +140,4 @@ test_that("shutdown", { disconnect.studies.dataset.survival() -context("ds.sample::smk::done") +# context("ds.sample::smk::done") diff --git a/tests/testthat/test-smk-ds.seq.R b/tests/testthat/test-smk-ds.seq.R index f44c7e46e..7da50458a 100644 --- a/tests/testthat/test-smk-ds.seq.R +++ b/tests/testthat/test-smk-ds.seq.R @@ -1,5 +1,6 @@ #------------------------------------------------------------------------------- # Copyright (c) 2019-2022 University of Newcastle upon Tyne. All rights reserved. +# Copyright (c) 2022-2025 Arjuna Technologies, Newcastle upon Tyne. All rights reserved. # # This program and the accompanying materials # are made available under the terms of the GNU Public License v3.0. @@ -12,7 +13,7 @@ # Set up # -context("ds.seq::smk::setup") +# context("ds.seq::smk::setup") connect.studies.dataset.cnsim(list("LAB_TSC")) @@ -24,7 +25,7 @@ test_that("setup", { # Tests # -context("ds.seq::smk") +# context("ds.seq::smk") test_that("simplest ds.seq", { seq.res <- ds.seq(FROM.value.char="1", BY.value.char="1", LENGTH.OUT.value.char="10", ALONG.WITH.name=NULL, newobj="obj1") @@ -45,7 +46,7 @@ test_that("simplest ds.seq", { # Tear down # -context("ds.seq::smk::shutdown") +# context("ds.seq::smk::shutdown") test_that("shutdown", { ds_expect_variables(c("D", "obj1", "obj2")) @@ -53,4 +54,4 @@ test_that("shutdown", { disconnect.studies.dataset.cnsim() -context("ds.seq::smk::done") +# context("ds.seq::smk::done") diff --git a/tests/testthat/test-smk-ds.setSeed.R b/tests/testthat/test-smk-ds.setSeed.R index eadf7fe18..fadeaae9f 100644 --- a/tests/testthat/test-smk-ds.setSeed.R +++ b/tests/testthat/test-smk-ds.setSeed.R @@ -1,5 +1,6 @@ #------------------------------------------------------------------------------- # Copyright (c) 2019-2022 University of Newcastle upon Tyne. All rights reserved. +# Copyright (c) 2022-2025 Arjuna Technologies, Newcastle upon Tyne. All rights reserved. # # This program and the accompanying materials # are made available under the terms of the GNU Public License v3.0. @@ -12,7 +13,7 @@ # Set up # -context("ds.setSeed::smk::setup") +# context("ds.setSeed::smk::setup") connect.studies.dataset.cnsim(list("LAB_TSC")) @@ -24,7 +25,7 @@ test_that("setup", { # Tests # -context("ds.setSeed::smk") +# context("ds.setSeed::smk") test_that("basic setSeed", { res.setSeed <- ds.setSeed(1234) @@ -43,7 +44,7 @@ test_that("basic setSeed", { # Done # -context("ds.setSeed::smk::shutdown") +# context("ds.setSeed::smk::shutdown") test_that("shutdown", { ds_expect_variables(c("D")) @@ -51,4 +52,4 @@ test_that("shutdown", { disconnect.studies.dataset.cnsim() -context("ds.setSeed::smk::done") +# context("ds.setSeed::smk::done") diff --git a/tests/testthat/test-smk-ds.skewness.R b/tests/testthat/test-smk-ds.skewness.R index e607b9a93..d6f7eaec4 100644 --- a/tests/testthat/test-smk-ds.skewness.R +++ b/tests/testthat/test-smk-ds.skewness.R @@ -1,6 +1,6 @@ #------------------------------------------------------------------------------- # Copyright (c) 2019-2022 University of Newcastle upon Tyne. All rights reserved. -# Copyright (c) 2022 Arjuna Technologies, Newcastle upon Tyne. All rights reserved. +# Copyright (c) 2022-2025 Arjuna Technologies, Newcastle upon Tyne. All rights reserved. # # This program and the accompanying materials # are made available under the terms of the GNU Public License v3.0. @@ -13,7 +13,7 @@ # Set up # -context("ds.skewness::smk::setup") +# context("ds.skewness::smk::setup") connect.studies.dataset.cnsim(list("LAB_TSC", "LAB_TRIG", "LAB_HDL", "LAB_GLUC_ADJUSTED", "PM_BMI_CONTINUOUS")) @@ -27,7 +27,7 @@ test_that("setup", { # Method 1 -context("ds.skewness::smk::method 1::split") +# context("ds.skewness::smk::method 1::split") test_that("simple skewness, method 1, split, on LAB_TSC", { skewness.res <- ds.skewness(x = 'D$LAB_TSC', method = 1, type='split') @@ -128,7 +128,7 @@ test_that("simple skewness, method 1, split, on PM_BMI_CONTINUOUS", { expect_equal(skewness.res$ValidityMessage[3], "VALID ANALYSIS") }) -context("ds.skewness::smk::method 1::combine") +# context("ds.skewness::smk::method 1::combine") test_that("simple skewness, combine, on LAB_TSC", { skewness.res <- ds.skewness(x = 'D$LAB_TSC', method = 1, type='combine') @@ -199,7 +199,7 @@ test_that("simple skewness, method 1, combine, on PM_BMI_CONTINUOUS", { expect_equal(skewness.res$ValidityMessage[1], "VALID ANALYSIS") }) -context("ds.skewness::smk::method 1::both") +# context("ds.skewness::smk::method 1::both") test_that("simple skewness, both, on LAB_TSC", { skewness.res <- ds.skewness(x = 'D$LAB_TSC', method = 1, type='both') @@ -342,7 +342,7 @@ test_that("simple skewness, method 1, both, on PM_BMI_CONTINUOUS", { # Method 2 -context("ds.skewness::smk::method 2::split") +# context("ds.skewness::smk::method 2::split") test_that("simple skewness, method 2, split, on LAB_TSC", { skewness.res <- ds.skewness(x = 'D$LAB_TSC', method = 2, type='split') @@ -443,7 +443,7 @@ test_that("simple skewness, method 2, split, on PM_BMI_CONTINUOUS", { expect_equal(skewness.res$ValidityMessage[3], "VALID ANALYSIS") }) -context("ds.skewness::smk::method 2::combine") +# context("ds.skewness::smk::method 2::combine") test_that("simple skewness, combine, on LAB_TSC", { skewness.res <- ds.skewness(x = 'D$LAB_TSC', method = 2, type='combine') @@ -514,7 +514,7 @@ test_that("simple skewness, method 2, combine, on PM_BMI_CONTINUOUS", { expect_equal(skewness.res$ValidityMessage[1], "VALID ANALYSIS") }) -context("ds.skewness::smk::method 2::both") +# context("ds.skewness::smk::method 2::both") test_that("simple skewness, both, on LAB_TSC", { skewness.res <- ds.skewness(x = 'D$LAB_TSC', method = 2, type='both') @@ -657,7 +657,7 @@ test_that("simple skewness, method 2, both, on PM_BMI_CONTINUOUS", { # Method 3 -context("ds.skewness::smk::method 3::split") +# context("ds.skewness::smk::method 3::split") test_that("simple skewness, method 3, split, on LAB_TSC", { skewness.res <- ds.skewness(x = 'D$LAB_TSC', method = 3, type='split') @@ -758,7 +758,7 @@ test_that("simple skewness, method 3, split, on PM_BMI_CONTINUOUS", { expect_equal(skewness.res$ValidityMessage[3], "VALID ANALYSIS") }) -context("ds.skewness::smk::method 3::combine") +# context("ds.skewness::smk::method 3::combine") test_that("simple skewness, combine, on LAB_TSC", { skewness.res <- ds.skewness(x = 'D$LAB_TSC', method = 3, type='combine') @@ -829,7 +829,7 @@ test_that("simple skewness, method 3, combine, on PM_BMI_CONTINUOUS", { expect_equal(skewness.res$ValidityMessage[1], "VALID ANALYSIS") }) -context("ds.skewness::smk::method 3::both") +# context("ds.skewness::smk::method 3::both") test_that("simple skewness, both, on LAB_TSC", { skewness.res <- ds.skewness(x = 'D$LAB_TSC', method = 3, type='both') @@ -974,7 +974,7 @@ test_that("simple skewness, method 3, both, on PM_BMI_CONTINUOUS", { # Done # -context("ds.skewness::smk::shutdown") +# context("ds.skewness::smk::shutdown") test_that("shutdown", { ds_expect_variables(c("D")) @@ -982,4 +982,4 @@ test_that("shutdown", { disconnect.studies.dataset.cnsim() -context("ds.skewness::smk::done") +# context("ds.skewness::smk::done") diff --git a/tests/testthat/test-smk-ds.sqrt.R b/tests/testthat/test-smk-ds.sqrt.R index 9c106c736..ccb50c0ca 100644 --- a/tests/testthat/test-smk-ds.sqrt.R +++ b/tests/testthat/test-smk-ds.sqrt.R @@ -1,5 +1,6 @@ #------------------------------------------------------------------------------- # Copyright (c) 2019-2022 University of Newcastle upon Tyne. All rights reserved. +# Copyright (c) 2022-2025 Arjuna Technologies, Newcastle upon Tyne. All rights reserved. # # This program and the accompanying materials # are made available under the terms of the GNU Public License v3.0. @@ -12,7 +13,7 @@ # Set up # -context("ds.sqrt::smk::setup") +# context("ds.sqrt::smk::setup") connect.studies.dataset.cnsim(list("LAB_TSC")) @@ -24,7 +25,7 @@ test_that("setup", { # Tests # -context("ds.sqrt::smk") +# context("ds.sqrt::smk") test_that("simple c", { res <- ds.sqrt("D$LAB_TSC", newobj = "sqrt.newobj") @@ -50,7 +51,7 @@ test_that("simple c", { # Done # -context("ds.sqrt::smk::shutdown") +# context("ds.sqrt::smk::shutdown") test_that("setup", { ds_expect_variables(c("D", "sqrt.newobj")) @@ -58,4 +59,4 @@ test_that("setup", { disconnect.studies.dataset.cnsim() -context("ds.sqrt::smk::done") +# context("ds.sqrt::smk::done") diff --git a/tests/testthat/test-smk-ds.subset.R b/tests/testthat/test-smk-ds.subset.R new file mode 100644 index 000000000..88fecdd2d --- /dev/null +++ b/tests/testthat/test-smk-ds.subset.R @@ -0,0 +1,92 @@ +#------------------------------------------------------------------------------- +# Copyright (c) 2018-2022 University of Newcastle upon Tyne. All rights reserved. +# Copyright (c) 2022-2025 Arjuna Technologies, Newcastle upon Tyne. All rights reserved. +# +# This program and the accompanying materials +# are made available under the terms of the GNU Public License v3.0. +# +# You should have received a copy of the GNU General Public License +# along with this program. If not, see . +#------------------------------------------------------------------------------- + +# +# Set up +# + +# context("ds.subset::smk::setup") + +connect.studies.dataset.cnsim(list("DIS_DIAB","PM_BMI_CONTINUOUS","LAB_HDL", "GENDER")) + +test_that("setup", { + ds_expect_variables(c("D")) +}) + +# +# Tests +# + +# context("ds.subset::smk::generate a subset of the assigned table (by default the table is named 'D') with the first 50 observations and the two first columns") +ds.subset(datasources=ds.test_env$connections, subset='subD', x='D', rows=c(1:50), cols=c(1,2)) +res <- ds.exists('subD') +test_that("subD_exists", { + expect_length(res, 3) + expect_true(res$sim1) + expect_true(res$sim2) + expect_true(res$sim3) +}) + +# context("ds.subset::smk::generate a subset of the assigned table (by default the table is named 'D') with the first 50 observations and the two first columns referred to by their names") +ds.subset(subset='subD2', x='D', rows=c(1:50), cols = c('DIS_DIAB','PM_BMI_CONTINUOUS')) +res <- ds.exists('subD2') +test_that("subD2_exists", { + expect_length(res, 3) + expect_true(res$sim1) + expect_true(res$sim2) + expect_true(res$sim3) +}) + +# context("ds.subset::smk::generate a subset of the table D with bmi values greater than or equal to 25.") +ds.subset(datasources=ds.test_env$connections, subset='subD3', x='D', logical='PM_BMI_CONTINUOUS>=', threshold=25) +res <- ds.exists('subD3') +test_that("subD3_exists", { + expect_length(res, 3) + expect_true(res$sim1) + expect_true(res$sim2) + expect_true(res$sim3) +}) + +# context("ds.subset::smk::get the logarithmic values of the variable 'lab_hdl' and generate a subset with the first 50 observations of that new vector.") +# ds.assign(toAssign='log(D$LAB_HDL)', newobj='logHDL') +# ds.subset(datasources=ds.test_env$connections, subset="subLAB_HDL", x="logHDL", rows=c(1:50)) +# res <- ds.exists('subLAB_HDL') +# test_that("subLAB_HDL_exists", { +# expect_length(res, 3) +# expect_true(res$sim1) +# expect_true(res$sim2) +# expect_true(res$sim3) +# }) + +# context("ds.subset::smk::get the variable 'PM_BMI_CONTINUOUS' from the dataframe 'D' and generate a subset bmi vector with bmi values greater than or equal to 25") +# ds.assign(toAssign='D$PM_BMI_CONTINUOUS', newobj='BMI') +# ds.subset(datasources=ds.test_env$connections, subset='subBMI', x='BMI', logical='>=', threshold=25) +# res <- ds.exists('subBMI') +# test_that("subBMI_exists", { +# expect_length(res, 3) +# expect_true(res$sim1) +# expect_true(res$sim2) +# expect_true(res$sim3) +# }) + +# +# Tear down +# + +# context("ds.subset::smk::shutdown") + +test_that("shutdown", { + ds_expect_variables(c("D", "subD", "subD2", "subD3")) +}) + +disconnect.studies.dataset.cnsim() + +# context("ds.subset::smk::done") diff --git a/tests/testthat/test-smk-ds.subsetByClass.R b/tests/testthat/test-smk-ds.subsetByClass.R new file mode 100644 index 000000000..71420fcbe --- /dev/null +++ b/tests/testthat/test-smk-ds.subsetByClass.R @@ -0,0 +1,79 @@ +#------------------------------------------------------------------------------- +# Copyright (c) 2018-2022 University of Newcastle upon Tyne. All rights reserved. +# Copyright (c) 2022-2025 Arjuna Technologies, Newcastle upon Tyne. All rights reserved. +# +# This program and the accompanying materials +# are made available under the terms of the GNU Public License v3.0. +# +# You should have received a copy of the GNU General Public License +# along with this program. If not, see . +#------------------------------------------------------------------------------- + +# +# Set up +# + +# context("ds.subsetByClass::smk::setup") + +connect.studies.dataset.cnsim(list("LAB_TSC", "GENDER")) + +test_that("setup", { + ds_expect_variables(c("D")) +}) + +# +# Tests +# + +# context("ds.subsetByClass::smk") +test_that("gender implicit", { + res <- ds.subsetByClass(x='D', subsets='subclasses1') + + expect_true(is.null(res)) + + check <- ds.names('subclasses1') + + expect_length(check, 3) + expect_length(check$sim1, 2) + expect_equal(check$sim1[1], 'GENDER.level_0') + expect_equal(check$sim1[2], 'GENDER.level_1') + expect_length(check$sim2, 2) + expect_equal(check$sim2[1], 'GENDER.level_0') + expect_equal(check$sim2[2], 'GENDER.level_1') + expect_length(check$sim3, 2) + expect_equal(check$sim3[1], 'GENDER.level_0') + expect_equal(check$sim3[2], 'GENDER.level_1') +}) + +test_that("gender explicit", { + res <- ds.subsetByClass(x='D', subsets='subclasses2', variables='GENDER') + + expect_true(is.null(res)) + + check <- ds.names('subclasses2') + + expect_length(check, 3) + expect_length(check$sim1, 2) + expect_equal(check$sim1[1], 'GENDER.level_0') + expect_equal(check$sim1[2], 'GENDER.level_1') + expect_length(check$sim2, 2) + expect_equal(check$sim2[1], 'GENDER.level_0') + expect_equal(check$sim2[2], 'GENDER.level_1') + expect_length(check$sim3, 2) + expect_equal(check$sim3[1], 'GENDER.level_0') + expect_equal(check$sim3[2], 'GENDER.level_1') +}) + +# +# Tear down +# + +# context("ds.subsetByClass::smk::shutdown") + +test_that("shutdown", { + ds_expect_variables(c("D", "subclasses1", "subclasses2")) +}) + +disconnect.studies.dataset.cnsim() + +# context("ds.subsetByClass::smk::done") diff --git a/tests/testthat/test-smk-ds.summary.R b/tests/testthat/test-smk-ds.summary.R index fd39b021c..750c0392d 100644 --- a/tests/testthat/test-smk-ds.summary.R +++ b/tests/testthat/test-smk-ds.summary.R @@ -1,5 +1,6 @@ #------------------------------------------------------------------------------- # Copyright (c) 2019-2022 University of Newcastle upon Tyne. All rights reserved. +# Copyright (c) 2022-2025 Arjuna Technologies, Newcastle upon Tyne. All rights reserved. # # This program and the accompanying materials # are made available under the terms of the GNU Public License v3.0. @@ -12,7 +13,7 @@ # Set up # -context("ds.summary::smk::setup") +# context("ds.summary::smk::setup") connect.studies.dataset.cnsim(list('LAB_TSC', 'LAB_TRIG', 'LAB_HDL', 'LAB_GLUC_ADJUSTED', 'PM_BMI_CONTINUOUS', 'DIS_CVA', 'MEDI_LPD', 'DIS_DIAB', 'DIS_AMI', 'GENDER', 'PM_BMI_CATEGORICAL')) @@ -23,7 +24,7 @@ test_that("setup", { # # Tests # -context("ds.summary::smk::summary of a dataframe variable") +# context("ds.summary::smk::summary of a dataframe variable") test_that("summary_dataframe_variable", { res <- ds.summary(x='D') @@ -42,7 +43,7 @@ test_that("summary_dataframe_variable", { expect_length(res$sim3$`variables held`, 11) }) -context("ds.summary::smk::summary of a numerical variable") +# context("ds.summary::smk::summary of a numerical variable") test_that("summary_numerical_variable", { res <- ds.summary(x='D$LAB_TSC') @@ -51,7 +52,7 @@ test_that("summary_numerical_variable", { expect_equal(res$sim3$`quantiles & mean`[[4]], 5.786) }) -context("ds.summary::smk::summary of a character variable") +# context("ds.summary::smk::summary of a character variable") test_that("summary_character_variable", { ds.asCharacter(x='D$GENDER', newobj="a_character") res <- ds.summary(x='a_character') @@ -60,7 +61,7 @@ test_that("summary_character_variable", { expect_equal(res$sim2$length, 3088) }) -context("ds.summary::smk::summary of a factor variable") +# context("ds.summary::smk::summary of a factor variable") test_that("summary_factor_variable", { ds.asFactor('D$PM_BMI_CATEGORICAL', newobj="a_factor") res <- ds.summary(x='a_factor') @@ -89,7 +90,7 @@ test_that("summary_factor_variable", { expect_equal(res$sim3$`count of '3'`, 1154) }) -context("ds.summary::smk::summary of a list variable") +# context("ds.summary::smk::summary of a list variable") test_that("summary_list_variable", { ds.asList(x.name='D$PM_BMI_CATEGORICAL', newobj="a_list") res <- ds.summary(x='a_list') @@ -106,7 +107,7 @@ test_that("summary_list_variable", { expect_equal(res$sim3$length, 4128) }) -context("ds.summary::smk::summary of a data frame") +# context("ds.summary::smk::summary of a data frame") test_that("summary_data_frame", { res <- ds.summary(x='D') @@ -122,7 +123,7 @@ test_that("summary_data_frame", { # Tear down # -context("ds.summary::smk::teardown") +# context("ds.summary::smk::teardown") test_that("shutdown", { ds_expect_variables(c("D", "a_character", "a_factor", "a_list")) @@ -130,4 +131,4 @@ test_that("shutdown", { disconnect.studies.dataset.cnsim() -context("ds.summary::smk::done") +# context("ds.summary::smk::done") diff --git a/tests/testthat/test-smk-ds.table.R b/tests/testthat/test-smk-ds.table.R index bae8aae42..0dd48cef1 100644 --- a/tests/testthat/test-smk-ds.table.R +++ b/tests/testthat/test-smk-ds.table.R @@ -1,5 +1,6 @@ #------------------------------------------------------------------------------- # Copyright (c) 2019-2022 University of Newcastle upon Tyne. All rights reserved. +# Copyright (c) 2022-2025 Arjuna Technologies, Newcastle upon Tyne. All rights reserved. # # This program and the accompanying materials # are made available under the terms of the GNU Public License v3.0. @@ -11,7 +12,7 @@ # # Set up # -context("ds.table::smk::setup") +# context("ds.table::smk::setup") connect.all.datasets() @@ -23,7 +24,7 @@ test_that("setup", { # Tests # -context("ds.table::smk::dataframe setup") +# context("ds.table::smk::dataframe setup") test_that("simple dataframe input setup", { ds.asFactor(input.var.name="D$FACTOR_CHARACTER", newobj.name="factorCharacter") ds.asFactor(input.var.name="D$FACTOR_INTEGER", newobj.name="factorInteger") @@ -38,7 +39,7 @@ test_that("simple dataframe input setup", { expect_equal(subset.res$validity.check, " appears valid in all sources") }) -context("ds.table::smk::simple table 1D") +# context("ds.table::smk::simple table 1D") test_that("simple table 1D", { table1.res <- ds.table(rvar='tablesource_subset$factorCharacter') @@ -53,7 +54,7 @@ test_that("simple table 1D", { expect_equal(table1.res$validity.message, "Data in all studies were valid") }) -context("ds.table::smk::simple table 2D") +# context("ds.table::smk::simple table 2D") test_that("simple table 2D", { table1.res <- ds.table(rvar='tablesource_subset$factorInteger', cvar='tablesource_subset$factorCharacter') @@ -75,7 +76,7 @@ test_that("simple table 2D", { expect_equal(table1.res$validity.message, "Data in all studies were valid") }) -context("ds.table::smk::simple table 3D") +# context("ds.table::smk::simple table 3D") test_that("simple table 3D", { expect_error(ds.table(rvar='tablesource_subset$factorInteger', cvar='tablesource_subset$factorCharacter', stvar='tablesource_subset$factorCategory'), "There are some DataSHIELD errors, list them with datashield.errors()", fixed = TRUE) @@ -141,7 +142,7 @@ test_that("simple table 3D, with assign", { # Done # -context("ds.table::smk::shutdown") +# context("ds.table::smk::shutdown") test_that("shutdown", { ds_expect_variables(c("D", "factorCharacter", "factorInteger", "factorCategory", "tablesource", "tablesource_subset", "new_table1", "new_table2", "new_table3")) @@ -149,4 +150,4 @@ test_that("shutdown", { disconnect.all.datasets() -context("ds.table::smk::done") +# context("ds.table::smk::done") diff --git a/tests/testthat/test-smk-ds.table1D.R b/tests/testthat/test-smk-ds.table1D.R index 013cdf322..a875f5929 100644 --- a/tests/testthat/test-smk-ds.table1D.R +++ b/tests/testthat/test-smk-ds.table1D.R @@ -1,5 +1,6 @@ #------------------------------------------------------------------------------- # Copyright (c) 2018-2022 University of Newcastle upon Tyne. All rights reserved. +# Copyright (c) 2022-2025 Arjuna Technologies, Newcastle upon Tyne. All rights reserved. # # This program and the accompanying materials # are made available under the terms of the GNU Public License v3.0. @@ -12,7 +13,7 @@ # Set up # -context("ds.table1D::smk::setup") +# context("ds.table1D::smk::setup") connect.studies.dataset.cnsim(list("DIS_CVA","GENDER")) @@ -24,7 +25,7 @@ test_that("setup", { # Tests # -context("ds.table1D::smk::generate a one dimensional table, outputting combined contingency tables") +# context("ds.table1D::smk::generate a one dimensional table, outputting combined contingency tables") test_that("GENDER_normal", { res <- expect_warning(ds.table1D(x='D$GENDER'), "'ds.table1D' is deprecated.\nUse 'ds.table' instead.", fixed = TRUE) @@ -33,7 +34,7 @@ test_that("GENDER_normal", { expect_equal(res$counts[3], 9379) }) -context("ds.table1D::smk::generate a one dimensional table, outputting combined contingency tables fail") +# context("ds.table1D::smk::generate a one dimensional table, outputting combined contingency tables fail") test_that("DIS_CVA_invalid", { res <- expect_warning(ds.table1D(x='D$DIS_CVA'), "'ds.table1D' is deprecated.\nUse 'ds.table' instead.", fixed = TRUE) @@ -45,7 +46,7 @@ test_that("DIS_CVA_invalid", { expect_equal(res$validity, "All tables are valid!") }) -context("ds.table1D::smk::generate a one dimensional table, outputting combined contingency tables fail split") +# context("ds.table1D::smk::generate a one dimensional table, outputting combined contingency tables fail split") test_that("DIS_CVA_invalid_split", { res <- expect_warning(ds.table1D(x='D$DIS_CVA', type="split"), "'ds.table1D' is deprecated.\nUse 'ds.table' instead.", fixed = TRUE) @@ -57,7 +58,7 @@ test_that("DIS_CVA_invalid_split", { expect_equal(res$validity, "All tables are valid!") }) -context("ds.table1D::smk::generate a one dimensional table, outputting study specific contingency tables") +# context("ds.table1D::smk::generate a one dimensional table, outputting study specific contingency tables") test_that("GENDER_split", { res <- expect_warning(ds.table1D(x='D$GENDER', type="split"), "'ds.table1D' is deprecated.\nUse 'ds.table' instead.", fixed = TRUE) @@ -67,7 +68,7 @@ test_that("GENDER_split", { expect_equal(res$counts$sim3[1], 2091) }) -context("ds.table1D::smk::generate a one dimensional table, outputting study specific contingency tables for study 1 and 2") +# context("ds.table1D::smk::generate a one dimensional table, outputting study specific contingency tables for study 1 and 2") test_that("GENDER_split_12", { res <- expect_warning(ds.table1D(datasources=ds.test_env$connections[1:2], x='D$GENDER', type="split"), "'ds.table1D' is deprecated.\nUse 'ds.table' instead.", fixed = TRUE) @@ -77,7 +78,7 @@ test_that("GENDER_split_12", { expect_equal(res$counts$sim3[1], NULL) }) -context("ds.table1D::smk::generate a one dimensional table, outputting study specific and combined contingency tables") +# context("ds.table1D::smk::generate a one dimensional table, outputting study specific and combined contingency tables") test_that("GENDER_normal_2", { res <- expect_warning(ds.table1D(datasources=ds.test_env$connections, x='D$GENDER'), "'ds.table1D' is deprecated.\nUse 'ds.table' instead.", fixed = TRUE) @@ -90,7 +91,7 @@ test_that("GENDER_normal_2", { # Tear down # -context("ds.table1D::smk::shutdown") +# context("ds.table1D::smk::shutdown") test_that("shutdown", { ds_expect_variables(c("D")) @@ -98,4 +99,4 @@ test_that("shutdown", { disconnect.studies.dataset.cnsim() -context("ds.table1D::smk::done") +# context("ds.table1D::smk::done") diff --git a/tests/testthat/test-smk-ds.table2D.R b/tests/testthat/test-smk-ds.table2D.R index 09fc859ce..596ae5080 100644 --- a/tests/testthat/test-smk-ds.table2D.R +++ b/tests/testthat/test-smk-ds.table2D.R @@ -1,5 +1,6 @@ #------------------------------------------------------------------------------- # Copyright (c) 2019-2022 University of Newcastle upon Tyne. All rights reserved. +# Copyright (c) 2022-2025 Arjuna Technologies, Newcastle upon Tyne. All rights reserved. # # This program and the accompanying materials # are made available under the terms of the GNU Public License v3.0. @@ -12,7 +13,7 @@ # Set up # -context("ds.table2D::smk::setup") +# context("ds.table2D::smk::setup") connect.studies.dataset.cnsim(list("DIS_DIAB", "GENDER")) @@ -24,7 +25,7 @@ test_that("setup", { # Tests # -context("ds.table2D::smk") +# context("ds.table2D::smk") test_that("simple table2D", { table2D.res <- expect_warning(ds.table2D(x='D$DIS_DIAB', y='D$GENDER'), "'ds.table2D' is deprecated.\nUse 'ds.table' instead.", fixed = TRUE) @@ -56,7 +57,7 @@ test_that("simple table2D", { # Done # -context("ds.table2D::smk::shutdown") +# context("ds.table2D::smk::shutdown") test_that("shutdown", { ds_expect_variables(c("D")) @@ -64,4 +65,4 @@ test_that("shutdown", { disconnect.studies.dataset.cnsim() -context("ds.table2D::smk::done") +# context("ds.table2D::smk::done") diff --git a/tests/testthat/test-smk-ds.tapply.R b/tests/testthat/test-smk-ds.tapply.R index b79876ff0..67aad82c9 100644 --- a/tests/testthat/test-smk-ds.tapply.R +++ b/tests/testthat/test-smk-ds.tapply.R @@ -1,6 +1,7 @@ #------------------------------------------------------------------------------- # Copyright (c) 2014 OBiBa, # 2019-2022 University of Newcastle upon Tyne. All rights reserved. +# 2022-2025 Arjuna Technologies, Newcastle upon Tyne. All rights reserved. # # This program and the accompanying materials # are made available under the terms of the GNU Public License v3.0. @@ -13,7 +14,7 @@ # Set up # -context("ds.tapply::smk::setup") +# context("ds.tapply::smk::setup") connect.studies.dataset.cnsim(list("LAB_TSC", "GENDER")) @@ -28,7 +29,7 @@ test_that("setup", { ds.assign('D$LAB_TSC', 'LAB_TSC') ds.assign('D$GENDER', 'GENDER') -context("ds.tapply::smk::fun=mean") +# context("ds.tapply::smk::fun=mean") test_that("simplest 'ds.tapply', fun=mean", { list <- ds.tapply('LAB_TSC', INDEX.names=c('GENDER'), FUN.name='mean') @@ -56,7 +57,7 @@ test_that("simplest 'ds.tapply', fun=mean", { expect_equal(list$sim3$N[[2]], 1700) }) -context("ds.tapply::smk::fun=sd") +# context("ds.tapply::smk::fun=sd") test_that("simplest 'ds.tapply', fun=sd", { list <- ds.tapply('LAB_TSC', INDEX.names=c('GENDER'), FUN.name='sd') @@ -84,7 +85,7 @@ test_that("simplest 'ds.tapply', fun=sd", { expect_equal(list$sim3$N[[2]], 1700) }) -context("ds.tapply::smk::fun=sum") +# context("ds.tapply::smk::fun=sum") test_that("simplest 'ds.tapply', fun=sum", { list <- ds.tapply('LAB_TSC', INDEX.names=c('GENDER'), FUN.name='sum') @@ -112,7 +113,7 @@ test_that("simplest 'ds.tapply', fun=sum", { expect_equal(list$sim3$N[[2]], 1700) }) -context("ds.tapply::smk::fun=quantile") +# context("ds.tapply::smk::fun=quantile") test_that("simplest 'ds.tapply', fun=quantile", { list <- ds.tapply('LAB_TSC', INDEX.names=c('GENDER'), FUN.name='quantile') @@ -132,7 +133,7 @@ test_that("simplest 'ds.tapply', fun=quantile", { # Tear down # -context("ds.tapply::smk::shutdown") +# context("ds.tapply::smk::shutdown") test_that("shutdown", { ds_expect_variables(c("D", "GENDER", "LAB_TSC")) @@ -140,4 +141,4 @@ test_that("shutdown", { disconnect.studies.dataset.cnsim() -context("ds.tapply::smk::done") +# context("ds.tapply::smk::done") diff --git a/tests/testthat/test-smk-ds.tapply.assign.R b/tests/testthat/test-smk-ds.tapply.assign.R index ba13f39df..8fd4918d2 100644 --- a/tests/testthat/test-smk-ds.tapply.assign.R +++ b/tests/testthat/test-smk-ds.tapply.assign.R @@ -1,6 +1,7 @@ #------------------------------------------------------------------------------- # Copyright (c) 2014 OBiBa, # 2019-2022 University of Newcastle upon Tyne. All rights reserved. +# 2022-2025 Arjuna Technologies, Newcastle upon Tyne. All rights reserved. # # This program and the accompanying materials # are made available under the terms of the GNU Public License v3.0. @@ -13,7 +14,7 @@ # Set up # -context("ds.tapply.assign::smk::setup") +# context("ds.tapply.assign::smk::setup") connect.studies.dataset.cnsim(list("LAB_TSC", "GENDER")) @@ -28,7 +29,7 @@ test_that("setup", { ds.assign('D$LAB_TSC', 'LAB_TSC') ds.assign('D$GENDER', 'GENDER') -context("ds.tapply.assign::smk::fun=mean") +# context("ds.tapply.assign::smk::fun=mean") test_that("simplest 'ds.tapply.assign', fun=mean", { list <- ds.tapply.assign('LAB_TSC', INDEX.names=c('GENDER'), FUN.name='mean', newobj="fun_mean.newobj") @@ -44,7 +45,7 @@ test_that("simplest 'ds.tapply.assign', fun=mean", { expect_equal(res.length$`total length of fun_mean.newobj in all studies combined`, 6) }) -context("ds.tapply.assign::smk::fun=sd") +# context("ds.tapply.assign::smk::fun=sd") test_that("simplest 'ds.tapply.assign', fun=sd", { list <- ds.tapply.assign('LAB_TSC', INDEX.names=c('GENDER'), FUN.name='sd', newobj="fun_sd.newobj") @@ -60,7 +61,7 @@ test_that("simplest 'ds.tapply.assign', fun=sd", { expect_equal(res.length$`total length of fun_sd.newobj in all studies combined`, 6) }) -context("ds.tapply.assign::smk::fun=sum") +# context("ds.tapply.assign::smk::fun=sum") test_that("simplest 'ds.tapply.assign', fun=sum", { list <- ds.tapply.assign('LAB_TSC', INDEX.names=c('GENDER'), FUN.name='sum', newobj="fun_sum.newobj") @@ -76,7 +77,7 @@ test_that("simplest 'ds.tapply.assign', fun=sum", { expect_equal(res.length$`total length of fun_sum.newobj in all studies combined`, 6) }) -context("ds.tapply.assign::smk::fun=quantile") +# context("ds.tapply.assign::smk::fun=quantile") test_that("simplest 'ds.tapply.assign', fun=quantile", { list <- ds.tapply.assign('LAB_TSC', INDEX.names=c('GENDER'), FUN.name='quantile', newobj="fun_quantile.newobj") @@ -96,7 +97,7 @@ test_that("simplest 'ds.tapply.assign', fun=quantile", { # Tear down # -context("ds.tapply.assign::smk::shutdown") +# context("ds.tapply.assign::smk::shutdown") test_that("shutdown", { ds_expect_variables(c("D", "GENDER", "LAB_TSC", "fun_mean.newobj", "fun_sd.newobj", "fun_sum.newobj", "fun_quantile.newobj")) @@ -108,4 +109,4 @@ disconnect.studies.dataset.cnsim() # Done # -context("ds.tapply.assign::smk::done") +# context("ds.tapply.assign::smk::done") diff --git a/tests/testthat/test-smk-ds.testObjExists-discordant.R b/tests/testthat/test-smk-ds.testObjExists-discordant.R index a7d89a3ec..5163217fd 100644 --- a/tests/testthat/test-smk-ds.testObjExists-discordant.R +++ b/tests/testthat/test-smk-ds.testObjExists-discordant.R @@ -1,5 +1,6 @@ #------------------------------------------------------------------------------- # Copyright (c) 2019-2022 University of Newcastle upon Tyne. All rights reserved. +# Copyright (c) 2022-2025 Arjuna Technologies, Newcastle upon Tyne. All rights reserved. # # This program and the accompanying materials # are made available under the terms of the GNU Public License v3.0. @@ -12,7 +13,7 @@ # Set up # -context("ds.testObjExists::smk::setup") +# context("ds.testObjExists::smk::setup") connect.discordant.dataset.simple(list("A", "B", "C")) @@ -24,7 +25,7 @@ test_that("setup", { # Tests # -context("ds.testObjExists::smk::discordant") +# context("ds.testObjExists::smk::discordant") test_that("simple testObjExists, discordant", { res <- ds.testObjExists('D') @@ -59,7 +60,7 @@ test_that("data.frame testObjExists, discordant", { # Done # -context("ds.testObjExists::smk::shutdown") +# context("ds.testObjExists::smk::shutdown") test_that("shutdown", { ds_expect_variables(c("D")) @@ -67,4 +68,4 @@ test_that("shutdown", { disconnect.discordant.dataset.simple() -context("ds.testObjExists::smk::done") +# context("ds.testObjExists::smk::done") diff --git a/tests/testthat/test-smk-ds.testObjExists.R b/tests/testthat/test-smk-ds.testObjExists.R index 5b2b2c383..857fe823c 100644 --- a/tests/testthat/test-smk-ds.testObjExists.R +++ b/tests/testthat/test-smk-ds.testObjExists.R @@ -1,5 +1,6 @@ #------------------------------------------------------------------------------- # Copyright (c) 2019-2022 University of Newcastle upon Tyne. All rights reserved. +# Copyright (c) 2022-2025 Arjuna Technologies, Newcastle upon Tyne. All rights reserved. # # This program and the accompanying materials # are made available under the terms of the GNU Public License v3.0. @@ -12,7 +13,7 @@ # Set up # -context("ds.testObjExists::smk::setup") +# context("ds.testObjExists::smk::setup") connect.studies.dataset.cnsim(list("LAB_TSC", "LAB_HDL")) @@ -24,7 +25,7 @@ test_that("setup", { # Tests # -context("ds.testObjExists::smk") +# context("ds.testObjExists::smk") test_that("simple testObjExists", { res <- ds.testObjExists('D') @@ -92,7 +93,7 @@ test_that("data.frame testObjExists", { # Done # -context("ds.testObjExists::smk::shutdown") +# context("ds.testObjExists::smk::shutdown") test_that("shutdown", { ds_expect_variables(c("D", "dataframe.newobj")) @@ -100,4 +101,4 @@ test_that("shutdown", { disconnect.studies.dataset.cnsim() -context("ds.testObjExists::smk::done") +# context("ds.testObjExists::smk::done") diff --git a/tests/testthat/test-smk-ds.unList.R b/tests/testthat/test-smk-ds.unList.R index 98fbaa986..806b13315 100644 --- a/tests/testthat/test-smk-ds.unList.R +++ b/tests/testthat/test-smk-ds.unList.R @@ -1,5 +1,6 @@ #------------------------------------------------------------------------------- # Copyright (c) 2018-2022 University of Newcastle upon Tyne. All rights reserved. +# Copyright (c) 2022-2025 Arjuna Technologies, Newcastle upon Tyne. All rights reserved. # # This program and the accompanying materials # are made available under the terms of the GNU Public License v3.0. @@ -12,7 +13,7 @@ # Set up # -context("ds.unList::smk::setup") +# context("ds.unList::smk::setup") connect.studies.dataset.cnsim(list("GENDER")) @@ -24,7 +25,7 @@ test_that("setup", { # Tests # -context("ds.unList::smk::simple test") +# context("ds.unList::smk::simple test") test_that("simple test", { ds.asList(x.name="D$GENDER", newobj="GENDER.list") @@ -39,7 +40,7 @@ test_that("simple test", { # Done # -context("ds.unList::smk::shutdown") +# context("ds.unList::smk::shutdown") test_that("shutdown", { ds_expect_variables(c("D", "GENDER.list", "unlist.newobj")) @@ -47,4 +48,4 @@ test_that("shutdown", { disconnect.studies.dataset.cnsim() -context("ds.unList::smk::done") +# context("ds.unList::smk::done") diff --git a/tests/testthat/test-smk-ds.unique.R b/tests/testthat/test-smk-ds.unique.R index 9aca375ca..21f6f5f03 100644 --- a/tests/testthat/test-smk-ds.unique.R +++ b/tests/testthat/test-smk-ds.unique.R @@ -1,5 +1,6 @@ #------------------------------------------------------------------------------- # Copyright (c) 2018-2022 University of Newcastle upon Tyne. All rights reserved. +# Copyright (c) 2022-2025 Arjuna Technologies, Newcastle upon Tyne. All rights reserved. # # This program and the accompanying materials # are made available under the terms of the GNU Public License v3.0. @@ -12,7 +13,7 @@ # Set up # -context("ds.unique::smk::setup") +# context("ds.unique::smk::setup") connect.studies.dataset.cnsim(list("GENDER")) @@ -24,7 +25,7 @@ test_that("setup", { # Tests # -context("ds.unique::smk::simple test") +# context("ds.unique::smk::simple test") test_that("simple test", { original.newobj.length <- ds.length("D$GENDER") @@ -51,7 +52,7 @@ test_that("simple test", { # Done # -context("ds.unique::smk::shutdown") +# context("ds.unique::smk::shutdown") test_that("shutdown", { ds_expect_variables(c("D", "unique.newobj")) @@ -59,4 +60,4 @@ test_that("shutdown", { disconnect.studies.dataset.cnsim() -context("ds.unique::smk::done") +#context("ds.unique::smk::done") diff --git a/tests/testthat/test-smk-ds.var.R b/tests/testthat/test-smk-ds.var.R index bc2aceb6d..834ece232 100644 --- a/tests/testthat/test-smk-ds.var.R +++ b/tests/testthat/test-smk-ds.var.R @@ -1,5 +1,6 @@ #------------------------------------------------------------------------------- # Copyright (c) 2019-2022 University of Newcastle upon Tyne. All rights reserved. +# Copyright (c) 2022-2025 Arjuna Technologies, Newcastle upon Tyne. All rights reserved. # # This program and the accompanying materials # are made available under the terms of the GNU Public License v3.0. @@ -12,7 +13,7 @@ # Set up # -context("ds.var::smk::setup") +# context("ds.var::smk::setup") connect.studies.dataset.cnsim(list("LAB_TSC")) @@ -24,7 +25,7 @@ test_that("setup", { # Tests # -context("ds.var::smk::split") +# context("ds.var::smk::split") test_that("simple var, split", { var.res <- ds.var(x = 'D$LAB_TSC', type='split') @@ -49,7 +50,7 @@ test_that("simple var, split", { expect_equal(var.res$ValidityMessage[3], "VALID ANALYSIS") }) -context("ds.var::smk::combine") +# context("ds.var::smk::combine") test_that("simple var, combine", { var.res <- ds.var(x = 'D$LAB_TSC', type='combine') @@ -66,7 +67,7 @@ test_that("simple var, combine", { expect_equal(var.res$ValidityMessage[3], "VALID ANALYSIS") }) -context("ds.var::smk::both") +# context("ds.var::smk::both") test_that("simple var, both", { var.res <- ds.var(x = 'D$LAB_TSC', type='both') @@ -100,7 +101,7 @@ test_that("simple var, both", { # Done # -context("ds.var::smk::shutdown") +# context("ds.var::smk::shutdown") test_that("shutdown", { ds_expect_variables(c("D")) @@ -108,4 +109,4 @@ test_that("shutdown", { disconnect.studies.dataset.cnsim() -context("ds.var::smk::done") +# context("ds.var::smk::done") diff --git a/tests/testthat/test-smk-ds.vectorCalc.R b/tests/testthat/test-smk-ds.vectorCalc.R index e318c7477..3c03191fe 100644 --- a/tests/testthat/test-smk-ds.vectorCalc.R +++ b/tests/testthat/test-smk-ds.vectorCalc.R @@ -1,5 +1,6 @@ #------------------------------------------------------------------------------- # Copyright (c) 2018-2022 University of Newcastle upon Tyne. All rights reserved. +# Copyright (c) 2022-2025 Arjuna Technologies, Newcastle upon Tyne. All rights reserved. # # This program and the accompanying materials # are made available under the terms of the GNU Public License v3.0. @@ -12,7 +13,7 @@ # Set up # -context("ds.vectorCalc::smk::setup") +# context("ds.vectorCalc::smk::setup") connect.studies.dataset.cnsim(list('LAB_TSC', 'LAB_HDL')) @@ -24,7 +25,7 @@ test_that("setup", { # Tests # -context("ds.vectorCalc::smk") +# context("ds.vectorCalc::smk") test_that("simple test", { vectors <- c('D$LAB_TSC', 'D$LAB_HDL') res <- expect_warning(ds.vectorCalc(x=vectors, calc='+'), "'ds.vectorCalc' is deprecated.\nUse 'ds.make' instead.", fixed = TRUE) @@ -58,7 +59,7 @@ test_that("simple test", { # Done # -context("ds.vectorCalc::smk::shutdown") +# context("ds.vectorCalc::smk::shutdown") test_that("shutdown", { ds_expect_variables(c("D", "vectorcalc.newobj")) @@ -66,4 +67,4 @@ test_that("shutdown", { disconnect.studies.dataset.cnsim() -context("ds.vectorCalc::smk::done") +# context("ds.vectorCalc::smk::done") diff --git a/tests/testthat/test-smk-isDefined.R b/tests/testthat/test-smk-isDefined.R index 5f37b0aa6..ab3f43b07 100644 --- a/tests/testthat/test-smk-isDefined.R +++ b/tests/testthat/test-smk-isDefined.R @@ -1,6 +1,6 @@ #------------------------------------------------------------------------------- # Copyright (c) 2018-2022 University of Newcastle upon Tyne. All rights reserved. -# Copyright (c) 2022 Arjuna Technologies, Newcastle upon Tyne. All rights reserved. +# Copyright (c) 2022-2025 Arjuna Technologies, Newcastle upon Tyne. All rights reserved. # # This program and the accompanying materials # are made available under the terms of the GNU Public License v3.0. @@ -13,7 +13,7 @@ # Set up # -context("isDefined::smk::setup") +# context("isDefined::smk::setup") connect.discordant.dataset.simple(list("A", "B", "C")) @@ -27,7 +27,7 @@ test_that("setup", { # default -context("isDefined::smk::default") +# context("isDefined::smk::default") test_that("default test, dataframe D", { res <- isDefined(ds.test_env$connections, "D") @@ -91,7 +91,7 @@ test_that("default test, dataframe columns D$A,D$B", { # error.message = FALSE -context("isDefined::smk::error.message=FALSE") +# context("isDefined::smk::error.message=FALSE") test_that("error.message=FALSE test, dataframe D", { res <- isDefined(ds.test_env$connections, "D", error.message = FALSE) @@ -197,7 +197,7 @@ test_that("error.message=FALSE test, dataframe columns D$A,D$B", { # error.message = TRUE -context("isDefined::smk::error.message=TRUE") +# context("isDefined::smk::error.message=TRUE") test_that("error.message=TRUE test, dataframe D", { res <- isDefined(ds.test_env$connections, "D", error.message = TRUE) @@ -263,7 +263,7 @@ test_that("error.message=TRUE test, dataframe columns D$A,D$B", { # Done # -context("isDefined::smk::shutdown") +# context("isDefined::smk::shutdown") test_that("shutdown", { ds_expect_variables(c("D")) @@ -271,4 +271,4 @@ test_that("shutdown", { disconnect.discordant.dataset.simple() -context("isDefined::smk::done") +# context("isDefined::smk::done") diff --git a/tests/testthat/test-smk_bug-ds.listOpals.R b/tests/testthat/test-smk_bug-ds.listOpals.R new file mode 100644 index 000000000..72b28ccdb --- /dev/null +++ b/tests/testthat/test-smk_bug-ds.listOpals.R @@ -0,0 +1,34 @@ +#------------------------------------------------------------------------------- +# Copyright (c) 2014 OBiBa, +# 2018-2022 University of Newcastle upon Tyne. All rights reserved. +# 2022-2025 Arjuna Technologies, Newcastle upon Tyne. All rights reserved. +# +# This program and the accompanying materials +# are made available under the terms of the GNU Public License v3.0. +# +# You should have received a copy of the GNU General Public License +# along with this program. If not, see . +#------------------------------------------------------------------------------- + +# +# Set up +# + +connect.studies.dataset.cnsim(list("LAB_TSC", "LAB_HDL")) + +# +# Tests +# + +# context("ds.listOpals::smk::check results") +test_that("check results", { + message <- "\n* This function lists all Opal objects in the R analysis environment\n\n\n* There is only one set of opals available,\n that is: 'ds.test_env$connections'\n\n\n\n* This set of Opals has been copied to create 'default.opals',\n which all DataSHIELD functions will now use by default.\n If you want to change the default Opal object,\n please run the function ds.setDefaultOpals() again. \n\n\n\n" + + expect_message(res <- ds.listOpals(), message, fixed=TRUE) +}) + +# +# Done +# + +disconnect.studies.dataset.cnsim() diff --git a/tests/testthat/test-smk_dgr-ds.asCharacter.R b/tests/testthat/test-smk_dgr-ds.asCharacter.R index 7f9e7c45a..48a2fbd12 100644 --- a/tests/testthat/test-smk_dgr-ds.asCharacter.R +++ b/tests/testthat/test-smk_dgr-ds.asCharacter.R @@ -1,5 +1,6 @@ #------------------------------------------------------------------------------- # Copyright (c) 2018-2022 University of Newcastle upon Tyne. All rights reserved. +# Copyright (c) 2022-2025 Arjuna Technologies, Newcastle upon Tyne. All rights reserved. # # This program and the accompanying materials # are made available under the terms of the GNU Public License v3.0. @@ -12,7 +13,7 @@ # Set up # -context("ds.asCharacter::smk_dgr::setup") +# context("ds.asCharacter::smk_dgr::setup") require(dsDangerClient) @@ -26,7 +27,7 @@ test_that("setup", { # Tests # -context("ds.asCharacter::smk_dgr::simple test") +# context("ds.asCharacter::smk_dgr::simple test") test_that("simple test", { res <- ds.asCharacter("D$LAB_TSC") @@ -39,7 +40,7 @@ test_that("simple test", { # Shutdown # -context("ds.asCharacter::smk_dgr::stutdown") +# context("ds.asCharacter::smk_dgr::stutdown") test_that("setup", { ds_expect_variables(c("D", "ascharacter.newobj")) @@ -51,4 +52,4 @@ disconnect.studies.dataset.cnsim() # Done # -context("ds.asCharacter::smk_dgr::done") +# context("ds.asCharacter::smk_dgr::done") diff --git a/tests/testthat/test-smk_dgr-ds.listClientsideFunctions.R b/tests/testthat/test-smk_dgr-ds.listClientsideFunctions.R index 52807e3be..64399ac1b 100644 --- a/tests/testthat/test-smk_dgr-ds.listClientsideFunctions.R +++ b/tests/testthat/test-smk_dgr-ds.listClientsideFunctions.R @@ -1,5 +1,6 @@ #------------------------------------------------------------------------------- # Copyright (c) 2019-2022 University of Newcastle upon Tyne. All rights reserved. +# Copyright (c) 2022-2025 Arjuna Technologies, Newcastle upon Tyne. All rights reserved. # # This program and the accompanying materials # are made available under the terms of the GNU Public License v3.0. @@ -12,7 +13,7 @@ # Set up # -context("ds.listClientsideFunctions::smk_dgr::setup") +# context("ds.listClientsideFunctions::smk_dgr::setup") require(dsDangerClient) @@ -26,7 +27,7 @@ test_that("setup", { # Tests # -context("ds.listClientsideFunctions::smk_dgr::check results") +# context("ds.listClientsideFunctions::smk_dgr::check results") test_that("check results", { output <- list( "ds.DANGERc2sMATDF", @@ -51,7 +52,7 @@ test_that("check results", { # Shutdown # -context("ds.listClientsideFunctions::smk_dgr::shutdown") +# context("ds.listClientsideFunctions::smk_dgr::shutdown") test_that("shutdown", { ds_expect_variables(c("D")) @@ -63,4 +64,4 @@ disconnect.studies.dataset.cnsim() # Done # -context("ds.listClientsideFunctions::smk_dgr::done") +# context("ds.listClientsideFunctions::smk_dgr::done") diff --git a/tests/testthat/test-smk_dgr-ds.listServersideFunctions.R b/tests/testthat/test-smk_dgr-ds.listServersideFunctions.R index 27d2e297c..9ed962278 100644 --- a/tests/testthat/test-smk_dgr-ds.listServersideFunctions.R +++ b/tests/testthat/test-smk_dgr-ds.listServersideFunctions.R @@ -1,5 +1,6 @@ #------------------------------------------------------------------------------- # Copyright (c) 2019-2022 University of Newcastle upon Tyne. All rights reserved. +# Copyright (c) 2022-2025 Arjuna Technologies, Newcastle upon Tyne. All rights reserved. # # This program and the accompanying materials # are made available under the terms of the GNU Public License v3.0. @@ -12,7 +13,7 @@ # Set up # -context("ds.listServersideFunctions::smk_dgr::setup") +# context("ds.listServersideFunctions::smk_dgr::setup") require(dsDangerClient) @@ -26,7 +27,7 @@ test_that("setup", { # Tests # -context("ds.listServersideFunctions::smk_dgr::check results") +# context("ds.listServersideFunctions::smk_dgr::check results") test_that("check results", { assign.functions <- factor(c( )) @@ -73,7 +74,7 @@ test_that("check results", { # Done # -context("ds.listServersideFunctions::smk_dgr::shtudown") +# context("ds.listServersideFunctions::smk_dgr::shtudown") test_that("shutdown", { ds_expect_variables(c("D")) @@ -85,4 +86,4 @@ disconnect.studies.dataset.cnsim() # Done # -context("ds.listServersideFunctions::smk_dgr::done") +# context("ds.listServersideFunctions::smk_dgr::done") diff --git a/tests/testthat/test-smk_dgr-ds.recodeValues-factor.R b/tests/testthat/test-smk_dgr-ds.recodeValues-factor.R index 840276726..180278c93 100644 --- a/tests/testthat/test-smk_dgr-ds.recodeValues-factor.R +++ b/tests/testthat/test-smk_dgr-ds.recodeValues-factor.R @@ -1,5 +1,6 @@ #------------------------------------------------------------------------------- # Copyright (c) 2018-2022 University of Newcastle upon Tyne. All rights reserved. +# Copyright (c) 2022-2025 Arjuna Technologies, Newcastle upon Tyne. All rights reserved. # # This program and the accompanying materials # are made available under the terms of the GNU Public License v3.0. @@ -12,7 +13,7 @@ # Set up # -context("ds.recodeValues::smk_dgr::factor::setup") +# context("ds.recodeValues::smk_dgr::factor::setup") connect.studies.dataset.cnsim(list("GENDER", "PM_BMI_CATEGORICAL")) @@ -24,7 +25,7 @@ test_that("setup", { # Tests # -context("ds.recodeValues::smk_dgr::factor::simple factor 1") +# context("ds.recodeValues::smk_dgr::factor::simple factor 1") test_that("simple factor 1", { res <- ds.recodeValues("D$GENDER", values2replace.vector=c('0'), new.values.vector=c('2'), newobj="GENDER") @@ -79,7 +80,7 @@ test_that("simple factor 1", { expect_length((subset(ndf.sim3, GENDER == 2))$GENDER, 2091) }) -context("ds.recodeValues::smk_dgr::factor::simple factor 2") +# context("ds.recodeValues::smk_dgr::factor::simple factor 2") test_that("simple factor 2", { res <- ds.recodeValues("D$GENDER", values2replace.vector=c(0), new.values.vector=c(2), newobj="GENDER") @@ -134,7 +135,7 @@ test_that("simple factor 2", { expect_length((subset(ndf.sim3, GENDER == 2))$GENDER, 2091) }) -context("ds.recodeValues::smk_dgr::factor::simple factor 3") +# context("ds.recodeValues::smk_dgr::factor::simple factor 3") test_that("simple factor 3", { res <- ds.recodeValues("D$GENDER", values2replace.vector=c(0), new.values.vector=c(2), missing='3', newobj="GENDER") @@ -195,7 +196,7 @@ test_that("simple factor 3", { expect_length((subset(ndf.sim3, GENDER == 3))$GENDER, 0) }) -context("ds.recodeValues::smk_dgr::factor::simple factor 4") +# context("ds.recodeValues::smk_dgr::factor::simple factor 4") test_that("simple factor 4", { res <- ds.recodeValues("D$GENDER", values2replace.vector=c(0,1), new.values.vector=c(10,20), newobj="GENDER") @@ -259,7 +260,7 @@ test_that("simple factor 4", { # # Done # -context("ds.recodeValues::smk_dgr::factor::shutdown") +# context("ds.recodeValues::smk_dgr::factor::shutdown") test_that("shutdown", { ds_expect_variables(c("D", "GENDER", "odf_1", "ndf_1", "odf_2", "ndf_2", "odf_3", "ndf_3", "odf_4", "ndf_4")) @@ -267,4 +268,4 @@ test_that("shutdown", { disconnect.studies.dataset.cnsim() -context("ds.recodeValues::smk_dgr::factor::done") +# context("ds.recodeValues::smk_dgr::factor::done") diff --git a/tests/testthat/test-smk_dgr-ds.recodeValues-factor_missing.R b/tests/testthat/test-smk_dgr-ds.recodeValues-factor_missing.R index c6cc808b3..2172c27fd 100644 --- a/tests/testthat/test-smk_dgr-ds.recodeValues-factor_missing.R +++ b/tests/testthat/test-smk_dgr-ds.recodeValues-factor_missing.R @@ -1,5 +1,6 @@ #------------------------------------------------------------------------------- # Copyright (c) 2018-2022 University of Newcastle upon Tyne. All rights reserved. +# Copyright (c) 2022-2025 Arjuna Technologies, Newcastle upon Tyne. All rights reserved. # # This program and the accompanying materials # are made available under the terms of the GNU Public License v3.0. @@ -12,7 +13,7 @@ # Set up # -context("ds.recodeValues::smk_dgr::factor_missing::setup") +# context("ds.recodeValues::smk_dgr::factor_missing::setup") connect.studies.dataset.cnsim(list("GENDER", "PM_BMI_CATEGORICAL")) @@ -24,7 +25,7 @@ test_that("setup", { # Tests # -context("ds.recodeValues::smk_dgr::factor_missing::simple missing factor 1") +# context("ds.recodeValues::smk_dgr::factor_missing::simple missing factor 1") test_that("simple missing factor 1", { res <- ds.recodeValues("D$PM_BMI_CATEGORICAL", values2replace.vector=c(1,2,3), new.values.vector=c(10,20,30), missing='999', newobj="PM_BMI_CATEGORICAL") @@ -109,7 +110,7 @@ test_that("simple missing factor 1", { expect_length((subset(ndf.sim3, PM_BMI_CATEGORICAL == 999))$PM_BMI_CATEGORICAL, 205) }) -context("ds.recodeValues::smk_dgr::factor_missing::simple missing factor 2") +# context("ds.recodeValues::smk_dgr::factor_missing::simple missing factor 2") test_that("simple missing factor 2", { res <- ds.recodeValues("D$PM_BMI_CATEGORICAL", values2replace.vector=c(1,2), new.values.vector=c(1,2), missing=99, newobj="PM_BMI_CATEGORICAL") @@ -176,7 +177,7 @@ test_that("simple missing factor 2", { expect_length((subset(ndf.sim3, PM_BMI_CATEGORICAL == 99))$PM_BMI_CATEGORICAL, 205) }) -context("ds.recodeValues::smk_dgr::factor_missing::simple missing factor 3") +# context("ds.recodeValues::smk_dgr::factor_missing::simple missing factor 3") test_that("simple missing factor 3", { res <- ds.recodeValues("D$PM_BMI_CATEGORICAL", values2replace.vector=c(1,2,3), new.values.vector=c('low','medium','high'), newobj="PM_BMI_CATEGORICAL") @@ -252,7 +253,7 @@ test_that("simple missing factor 3", { # # Done # -context("ds.recodeValues::smk_dgr::factor_missing::shutdown") +# context("ds.recodeValues::smk_dgr::factor_missing::shutdown") test_that("shutdown", { ds_expect_variables(c("D", "PM_BMI_CATEGORICAL", "odf_1", "ndf_1", "odf_2", "ndf_2", "odf_3", "ndf_3")) @@ -260,4 +261,4 @@ test_that("shutdown", { disconnect.studies.dataset.cnsim() -context("ds.recodeValues::smk_dgr::factor_missing::done") +# context("ds.recodeValues::smk_dgr::factor_missing::done") diff --git a/tests/testthat/test-smk_dgr-ds.recodeValues.R b/tests/testthat/test-smk_dgr-ds.recodeValues.R index a7f798210..a7bf78805 100644 --- a/tests/testthat/test-smk_dgr-ds.recodeValues.R +++ b/tests/testthat/test-smk_dgr-ds.recodeValues.R @@ -1,5 +1,6 @@ #------------------------------------------------------------------------------- # Copyright (c) 2018-2022 University of Newcastle upon Tyne. All rights reserved. +# Copyright (c) 2022-2025 Arjuna Technologies, Newcastle upon Tyne. All rights reserved. # # This program and the accompanying materials # are made available under the terms of the GNU Public License v3.0. @@ -12,7 +13,7 @@ # Set up # -context("ds.recodeValues::smk_dgr::setup") +# context("ds.recodeValues::smk_dgr::setup") connect.studies.dataset.survival(list("time.id")) @@ -24,7 +25,7 @@ test_that("setup", { # Tests # -context("ds.recodeValues::smk_dgr::simple numeric") +# context("ds.recodeValues::smk_dgr::simple numeric") test_that("simple test", { res <- ds.recodeValues("D$time.id", values2replace.vector=c(1,2), new.values.vector=c(10,20), newobj="time.id") @@ -88,7 +89,7 @@ test_that("simple test", { # # Done # -context("ds.recodeValues::smk_dgr::shutdown") +# context("ds.recodeValues::smk_dgr::shutdown") test_that("shutdown", { ds_expect_variables(c("D", "time.id", "odf", "ndf")) @@ -96,4 +97,4 @@ test_that("shutdown", { disconnect.studies.dataset.survival() -context("ds.recodeValues::smk_dgr::done") +# context("ds.recodeValues::smk_dgr::done") diff --git a/tests/testthat/test-smk_expt-ds.mean.R b/tests/testthat/test-smk_expt-ds.mean.R index 3d1d22fa3..c2682730d 100644 --- a/tests/testthat/test-smk_expt-ds.mean.R +++ b/tests/testthat/test-smk_expt-ds.mean.R @@ -1,5 +1,6 @@ #------------------------------------------------------------------------------- # Copyright (c) 2018-2022 University of Newcastle upon Tyne. All rights reserved. +# Copyright (c) 2022-2025 Arjuna Technologies, Newcastle upon Tyne. All rights reserved. # # This program and the accompanying materials # are made available under the terms of the GNU Public License v3.0. @@ -18,112 +19,112 @@ connect.studies.dataset.cnsim(list("LAB_TSC", "LAB_TRIG", "LAB_HDL", "LAB_GLUC_A # Tests # -context("ds.mean::smk_expt::type=combine") +# context("ds.mean::smk_expt::type=combine") test_that("mean values [combine]", { stat.mean <- ds.mean(x='D$LAB_TSC',type='combine') expect_equal_to_reference(stat.mean, 'smk_expt-results/ds.mean-LAB_TSC-combine.rds') }) -context("ds.mean::smk_expt::type=split") +# context("ds.mean::smk_expt::type=split") test_that("mean values [split]", { stat.mean <- ds.mean(x='D$LAB_TSC', type='split') expect_equal_to_reference(stat.mean, 'smk_expt-results/ds.mean-LAB_TSC-split.rds') }) -context("ds.mean::smk_expt::type=both") +# context("ds.mean::smk_expt::type=both") test_that("mean values [both]", { stat.mean <- ds.mean(x='D$LAB_TSC', type='both') expect_equal_to_reference(stat.mean, 'smk_expt-results/ds.mean-LAB_TSC-both.rds') }) -context("ds.mean::smk_expt::type=combine") +# context("ds.mean::smk_expt::type=combine") test_that("mean values [combine]", { # stat.mean <- ds.mean(x='D$LAB_TRIG',type='combine') # expect_equal_to_reference(stat.mean, 'smk_expt-results/ds.mean-LAB_TRIG-combine.rds') }) -context("ds.mean::smk_expt::type=split") +# context("ds.mean::smk_expt::type=split") test_that("mean values [split]", { # stat.mean <- ds.mean(x='D$LAB_TRIG', type='split') # expect_equal_to_reference(stat.mean, 'smk_expt-results/ds.mean-LAB_TRIG-split.rds') }) -context("ds.mean::smk_expt::type=both") +# context("ds.mean::smk_expt::type=both") test_that("mean values [both]", { # stat.mean <- ds.mean(x='D$LAB_TRIG', type='both') # expect_equal_to_reference(stat.mean, 'smk_expt-results/ds.mean-LAB_TRIG-both.rds') }) -context("ds.mean::smk_expt::type=combine") +# context("ds.mean::smk_expt::type=combine") test_that("mean values [combine]", { stat.mean <- ds.mean(x='D$LAB_HDL',type='combine') expect_equal_to_reference(stat.mean, 'smk_expt-results/ds.mean-LAB_HDL-combine.rds') }) -context("ds.mean::smk_expt::type=split") +# context("ds.mean::smk_expt::type=split") test_that("mean values [split]", { stat.mean <- ds.mean(x='D$LAB_HDL', type='split') expect_equal_to_reference(stat.mean, 'smk_expt-results/ds.mean-LAB_HDL-split.rds') }) -context("ds.mean::smk_expt::type=both") +# context("ds.mean::smk_expt::type=both") test_that("mean values [both]", { stat.mean <- ds.mean(x='D$LAB_HDL', type='both') expect_equal_to_reference(stat.mean, 'smk_expt-results/ds.mean-LAB_HDL-both.rds') }) -context("ds.mean::smk_expt::type=combine") +# context("ds.mean::smk_expt::type=combine") test_that("mean values [combine]", { stat.mean <- ds.mean(x='D$LAB_GLUC_ADJUSTED',type='combine') expect_equal_to_reference(stat.mean, 'smk_expt-results/ds.mean-LAB_GLUC_ADJUSTED-combine.rds') }) -context("ds.mean::smk_expt::type=split") +# context("ds.mean::smk_expt::type=split") test_that("mean values [split]", { stat.mean <- ds.mean(x='D$LAB_GLUC_ADJUSTED', type='split') expect_equal_to_reference(stat.mean, 'smk_expt-results/ds.mean-LAB_GLUC_ADJUSTED-split.rds') }) -context("ds.mean::smk_expt::type=both") +# context("ds.mean::smk_expt::type=both") test_that("mean values [both]", { stat.mean <- ds.mean(x='D$LAB_GLUC_ADJUSTED', type='both') expect_equal_to_reference(stat.mean, 'smk_expt-results/ds.mean-LAB_GLUC_ADJUSTED-both.rds') }) -context("ds.mean::smk_expt::type=combine") +# context("ds.mean::smk_expt::type=combine") test_that("mean values [combine]", { stat.mean <- ds.mean(x='D$PM_BMI_CONTINUOUS',type='combine') expect_equal_to_reference(stat.mean, 'smk_expt-results/ds.mean-PM_BMI_CONTINUOUS-combine.rds') }) -context("ds.mean::smk_expt::type=split") +# context("ds.mean::smk_expt::type=split") test_that("mean values [split]", { stat.mean <- ds.mean(x='D$PM_BMI_CONTINUOUS', type='split') expect_equal_to_reference(stat.mean, 'smk_expt-results/ds.mean-PM_BMI_CONTINUOUS-split.rds') }) -context("ds.mean::smk_expt::type=both") +# context("ds.mean::smk_expt::type=both") test_that("mean values [both]", { stat.mean <- ds.mean(x='D$PM_BMI_CONTINUOUS', type='both') expect_equal_to_reference(stat.mean, 'smk_expt-results/ds.mean-PM_BMI_CONTINUOUS-both.rds') }) -context("ds.mean::smk_expt::type=combine") +# context("ds.mean::smk_expt::type=combine") test_that("mean values [combine]", { ds.asNumeric(x.name="D$DIS_CVA", newobj="DIS_CVA") @@ -132,7 +133,7 @@ test_that("mean values [combine]", { expect_equal_to_reference(stat.mean, 'smk_expt-results/ds.mean-DIS_CVA-combine.rds') }) -context("ds.mean::smk_expt::type=split") +# context("ds.mean::smk_expt::type=split") test_that("mean values [split]", { ds.asNumeric(x.name="D$DIS_CVA", newobj="DIS_CVA") @@ -141,7 +142,7 @@ test_that("mean values [split]", { expect_equal_to_reference(stat.mean, 'smk_expt-results/ds.mean-DIS_CVA-split.rds') }) -context("ds.mean::smk_expt::type=both") +# context("ds.mean::smk_expt::type=both") test_that("mean values [both]", { ds.asNumeric(x.name="D$DIS_CVA", newobj="DIS_CVA") @@ -150,7 +151,7 @@ test_that("mean values [both]", { expect_equal_to_reference(stat.mean, 'smk_expt-results/ds.mean-DIS_CVA-both.rds') }) -context("ds.mean::smk_expt::type=combine") +# context("ds.mean::smk_expt::type=combine") test_that("mean values [combine]", { ds.asNumeric(x.name="D$MEDI_LPD", newobj="MEDI_LPD") @@ -159,7 +160,7 @@ test_that("mean values [combine]", { expect_equal_to_reference(stat.mean, 'smk_expt-results/ds.mean-MEDI_LPD-combine.rds') }) -context("ds.mean::smk_expt::type=split") +# context("ds.mean::smk_expt::type=split") test_that("mean values [split]", { ds.asNumeric(x.name="D$MEDI_LPD", newobj="MEDI_LPD") @@ -168,7 +169,7 @@ test_that("mean values [split]", { expect_equal_to_reference(stat.mean, 'smk_expt-results/ds.mean-MEDI_LPD-split.rds') }) -context("ds.mean::smk_expt::type=both") +# context("ds.mean::smk_expt::type=both") test_that("mean values [both]", { ds.asNumeric(x.name="D$MEDI_LPD", newobj="MEDI_LPD") @@ -177,7 +178,7 @@ test_that("mean values [both]", { expect_equal_to_reference(stat.mean, 'smk_expt-results/ds.mean-MEDI_LPD-both.rds') }) -context("ds.mean::smk_expt::type=combine") +# context("ds.mean::smk_expt::type=combine") test_that("mean values [combine]", { ds.asNumeric(x.name="D$DIS_DIAB", newobj="DIS_DIAB") @@ -186,7 +187,7 @@ test_that("mean values [combine]", { expect_equal_to_reference(stat.mean, 'smk_expt-results/ds.mean-DIS_DIAB-combine.rds') }) -context("ds.mean::smk_expt::type=split") +# context("ds.mean::smk_expt::type=split") test_that("mean values [split]", { ds.asNumeric(x.name="D$DIS_DIAB", newobj="DIS_DIAB") @@ -195,7 +196,7 @@ test_that("mean values [split]", { expect_equal_to_reference(stat.mean, 'smk_expt-results/ds.mean-DIS_DIAB-split.rds') }) -context("ds.mean::smk_expt::type=both") +# context("ds.mean::smk_expt::type=both") test_that("mean values [both]", { ds.asNumeric(x.name="D$DIS_DIAB", newobj="DIS_DIAB") @@ -204,7 +205,7 @@ test_that("mean values [both]", { expect_equal_to_reference(stat.mean, 'smk_expt-results/ds.mean-DIS_DIAB-both.rds') }) -context("ds.mean::smk_expt::type=combine") +# context("ds.mean::smk_expt::type=combine") test_that("mean values [combine]", { ds.asNumeric(x.name="D$DIS_AMI", newobj="DIS_AMI") @@ -213,7 +214,7 @@ test_that("mean values [combine]", { expect_equal_to_reference(stat.mean, 'smk_expt-results/ds.mean-DIS_AMI-combine.rds') }) -context("ds.mean::smk_expt::type=split") +# context("ds.mean::smk_expt::type=split") test_that("mean values [split]", { ds.asNumeric(x.name="D$DIS_AMI", newobj="DIS_AMI") @@ -222,7 +223,7 @@ test_that("mean values [split]", { expect_equal_to_reference(stat.mean, 'smk_expt-results/ds.mean-DIS_AMI-split.rds') }) -context("ds.mean::smk_expt::type=both") +# context("ds.mean::smk_expt::type=both") test_that("mean values [both]", { ds.asNumeric(x.name="D$DIS_AMI", newobj="DIS_AMI") @@ -231,7 +232,7 @@ test_that("mean values [both]", { expect_equal_to_reference(stat.mean, 'smk_expt-results/ds.mean-DIS_AMI-both.rds') }) -context("ds.mean::smk_expt::type=combine") +# context("ds.mean::smk_expt::type=combine") test_that("mean values [combine]", { ds.asNumeric(x.name="D$GENDER", newobj="GENDER") @@ -240,7 +241,7 @@ test_that("mean values [combine]", { expect_equal_to_reference(stat.mean, 'smk_expt-results/ds.mean-GENDER-combine.rds') }) -context("ds.mean::smk_expt::type=split") +# context("ds.mean::smk_expt::type=split") test_that("mean values [split]", { ds.asNumeric(x.name="D$GENDER", newobj="GENDER") @@ -249,7 +250,7 @@ test_that("mean values [split]", { expect_equal_to_reference(stat.mean, 'smk_expt-results/ds.mean-GENDER-split.rds') }) -context("ds.mean::smk_expt::type=both") +# context("ds.mean::smk_expt::type=both") test_that("mean values [both]", { ds.asNumeric(x.name="D$GENDER", newobj="GENDER") @@ -258,7 +259,7 @@ test_that("mean values [both]", { expect_equal_to_reference(stat.mean, 'smk_expt-results/ds.mean-GENDER-both.rds') }) -context("ds.mean::smk_expt::type=combine") +# context("ds.mean::smk_expt::type=combine") test_that("mean values [combine]", { ds.asNumeric(x.name="D$PM_BMI_CATEGORICAL", newobj="PM_BMI_CATEGORICAL") @@ -267,7 +268,7 @@ test_that("mean values [combine]", { expect_equal_to_reference(stat.mean, 'smk_expt-results/ds.mean-PM_BMI_CATEGORICAL-combine.rds') }) -context("ds.mean::smk_expt::type=split") +# context("ds.mean::smk_expt::type=split") test_that("mean values [split]", { ds.asNumeric(x.name="D$PM_BMI_CATEGORICAL", newobj="PM_BMI_CATEGORICAL") @@ -276,7 +277,7 @@ test_that("mean values [split]", { expect_equal_to_reference(stat.mean, 'smk_expt-results/ds.mean-PM_BMI_CATEGORICAL-split.rds') }) -context("ds.mean::smk_expt::type=both") +# context("ds.mean::smk_expt::type=both") test_that("mean values [both]", { ds.asNumeric(x.name="D$PM_BMI_CATEGORICAL", newobj="PM_BMI_CATEGORICAL") diff --git a/tests/testthat/test-smk_expt-ds.ranksSecure.R b/tests/testthat/test-smk_expt-ds.ranksSecure.R index 0061df2ce..edb86cd2e 100644 --- a/tests/testthat/test-smk_expt-ds.ranksSecure.R +++ b/tests/testthat/test-smk_expt-ds.ranksSecure.R @@ -1,5 +1,6 @@ #------------------------------------------------------------------------------- # Copyright (c) 2019-2022 University of Newcastle upon Tyne. All rights reserved. +# Copyright (c) 2022-2025 Arjuna Technologies, Newcastle upon Tyne. All rights reserved. # # This program and the accompanying materials # are made available under the terms of the GNU Public License v3.0. @@ -12,7 +13,7 @@ # Set up # -context("ds.ranksSecure::smk_expt::setup") +# context("ds.ranksSecure::smk_expt::setup") connect.studies.dataset.cnsim(list("LAB_TRIG", "LAB_TSC")) @@ -24,7 +25,7 @@ test_that("setup", { # Tests # -context("ds.ranksSecure::smk_expt::continous, without NAs, all positive") +# context("ds.ranksSecure::smk_expt::continous, without NAs, all positive") test_that("continous, without NAs, all positive", { res.cc <- ds.completeCases("D$LAB_TSC", newobj="CC_LAB_TSC") expect_equal(res.cc$validity.check, " appears valid in all sources") @@ -40,7 +41,7 @@ test_that("continous, without NAs, all positive", { expect_equal_to_reference(res, 'smk_expt-results/ds.ranksSecure-cont.rds') }) -context("ds.ranksSecure::smk_expt::continous, without NAs, with negative") +# context("ds.ranksSecure::smk_expt::continous, without NAs, with negative") test_that("continous, without NAs, with negative", { res.cc <- ds.completeCases("D$LAB_TRIG", newobj="CC_LAB_TRIG") expect_equal(res.cc$validity.check, " appears valid in all sources") @@ -56,14 +57,14 @@ test_that("continous, without NAs, with negative", { expect_equal_to_reference(res, 'smk_expt-results/ds.ranksSecure-cont_neg.rds') }) -context("ds.ranksSecure::smk_expt::continous, with NAs, all positive") +# context("ds.ranksSecure::smk_expt::continous, with NAs, all positive") test_that("continous, with NAs, all positive", { res <- ds.ranksSecure("D$LAB_TSC") expect_equal_to_reference(res, 'smk_expt-results/ds.ranksSecure-cont_nas.rds') }) -context("ds.ranksSecure::smk_expt::continous, with NAs, with negative") +# context("ds.ranksSecure::smk_expt::continous, with NAs, with negative") test_that("continous, with NAs, with negative", { res <- ds.ranksSecure("D$LAB_TRIG") @@ -74,7 +75,7 @@ test_that("continous, with NAs, with negative", { # Done # -context("ds.ranksSecure::smk_expt::shutdown") +# context("ds.ranksSecure::smk_expt::shutdown") test_that("setup", { ds_expect_variables(c("D", "CC_LAB_TSC", "CC_LAB_TRIG", "final.quantile.df", "summary.ranks.df", "testvar.ranks")) @@ -82,4 +83,4 @@ test_that("setup", { disconnect.studies.dataset.cnsim() -context("ds.ranksSecure::smk_expt::done") +# context("ds.ranksSecure::smk_expt::done")