diff --git a/.Rbuildignore b/.Rbuildignore index e0515161..b66ab898 100644 --- a/.Rbuildignore +++ b/.Rbuildignore @@ -17,8 +17,8 @@ ^R/secure.global.ranking.md$ ^_pkgdown\.yml$ ^docs$ -^dsBase_6.3.4.tar.gz$ -^dsBase_6.3.4-permissive.tar.gz$ +^dsBase_6.3.5.tar.gz$ +^dsBase_6.3.5-permissive.tar.gz$ ^dsDanger_6.3.4.tar.gz$ ^\.circleci$ ^\.circleci/config\.yml$ diff --git a/.github/workflows/dsBaseClient_test_suite.yaml b/.github/workflows/dsBaseClient_test_suite.yaml new file mode 100644 index 00000000..17e13f1d --- /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/DESCRIPTION b/DESCRIPTION index cc110b7f..e0f278a5 100644 --- a/DESCRIPTION +++ b/DESCRIPTION @@ -1,11 +1,11 @@ Package: dsBaseClient Title: 'DataSHIELD' Client Side Base Functions -Version: 6.3.4 +Version: 6.3.5 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. For more details, see 'citation("dsBaseClient")'. + the automated output checks. For more details, see citation('dsBaseClient'). Authors@R: c(person(given = "Paul", family = "Burton", role = c("aut"), @@ -36,10 +36,6 @@ Authors@R: c(person(given = "Paul", family = "Avraam", role = c("aut"), comment = c(ORCID = "0000-0001-8908-2441")), - person(given = "Demetris", - family = "Avraam", - role = c("aut"), - comment = c(ORCID = "0000-0001-8908-2441")), person(given = "Yannick", family = "Marcon", role = c("aut"), diff --git a/NAMESPACE b/NAMESPACE index ec905eb6..28959252 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) @@ -118,6 +118,7 @@ export(ds.unList) export(ds.unique) export(ds.var) export(ds.vectorCalc) +export(subsetHelper) import(DSI) import(data.table) importFrom(stats,as.formula) diff --git a/R/computeWeightedMeans.R b/R/computeWeightedMeans.R index 0f04fc91..1284ffc0 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 476f00f8..8e5fbd09 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.boxPlot.R b/R/ds.boxPlot.R index d89c5470..7d86a79b 100644 --- a/R/ds.boxPlot.R +++ b/R/ds.boxPlot.R @@ -21,7 +21,7 @@ #' ## Version 6, for version 5 see the Wiki #' #' ### Please ensure you have a training Virtual Machine running, -#' or that you have a live connection to a server. +#' # or that you have a live connection to a server. #' #' # Connecting to the Opal servers #' @@ -48,37 +48,37 @@ #' symbol = "D") #' #' ## Create a boxplot of one variable -#' ds.boxPlot("D", "LAB_HDL", datasources = connections) +#' ds.boxPlot("D", "LAB_HDL", datasources = connections) #' #' ## Create a boxplot that is split by study: -#' ds.boxPlot("D", "LAB_HDL", type= "split", datasources = connections) +#' ds.boxPlot("D", "LAB_HDL", type= "split", datasources = connections) #' #' ## Create a boxplot of two variables variable -#' ds.boxPlot("D", c("LAB_HDL", "LAB_TRIG", type="pooled", -#' datasources = connections) +#' ds.boxPlot("D", c("LAB_HDL", "LAB_TRIG"), type="pooled", +#' datasources = connections) #' # only one plot is created (of the aggregated results of all servers) #' #' ## Create a boxplot of two variables, which are split by a factor -#' ds.boxPlot("D", c("LAB_HDL", "LAB_TRIG"), group = "GENDER", +#' ds.boxPlot("D", c("LAB_HDL", "LAB_TRIG"), group = "GENDER", #' datasources = connections) #' #' ## Create a boxplot with x- and y-axis labels -#' ds.boxPlot("D", c("LAB_HDL", "LAB_TRIG"), group = "GENDER", +#' ds.boxPlot("D", c("LAB_HDL", "LAB_TRIG"), group = "GENDER", #' xlabel = "Variable", ylabel = "Measurement", datasources = connections) #' #' ## Improve the presentation of ds.boxplot output using ggplot: #' ### User must save the output, which is in a ggplot format already: -#' a <- ds.boxPlot("D", c("LAB_HDL", "LAB_TRIG"), group = "GENDER", +#' a <- ds.boxPlot("D", c("LAB_HDL", "LAB_TRIG"), group = "GENDER", #' xlabel = "Variable", ylabel = "Measurement", datasources = connections) #' #' ### Then customise output "a" using ggplot tools: #' a + ggplot2::scale_fill_discrete(name = "Gender", labels = c("Male", "Female")) #' #' ### Or use an alternative way, to maintain the aesthetics: -#' a + ggplot2::scale_fill_brewer(name = "Gender", labels = c("Male", "Female")) +#' a + ggplot2::scale_fill_brewer(name = "Gender", labels = c("Male", "Female")) #' #' # Clear the Datashield R sessions and logout -#' datashield.logout(connections) +#' datashield.logout(connections) #' #' } #' diff --git a/R/ds.cbind.R b/R/ds.cbind.R index d943e017..e21cb961 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 a4b98b1a..a9e80252 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 4e195e48..f1fbb3bd 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.dataFrame.R b/R/ds.dataFrame.R index 5837747c..eeddcdd9 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 1c5ff6a0..1ae6278d 100644 --- a/R/ds.dataFrameSubset.R +++ b/R/ds.dataFrameSubset.R @@ -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.densityGrid.R b/R/ds.densityGrid.R index b0766418..fbd5b909 100644 --- a/R/ds.densityGrid.R +++ b/R/ds.densityGrid.R @@ -66,11 +66,11 @@ #' # Example2: generate a grid density object for each study separately #' ds.densityGrid(x="D$LAB_TSC", #' y="D$LAB_HDL", -#' type="split" +#' type="split", #' datasources = connections[1])#only the first Opal server is used ("study1") #' #' # Example3: generate a grid density object where the number of intervals is set to 15, for -#' each study separately +#' # each study separately #' ds.densityGrid(x="D$LAB_TSC", #' y="D$LAB_HDL", #' type="split", diff --git a/R/ds.dmtC2S.R b/R/ds.dmtC2S.R index ee2e4be6..085d198f 100644 --- a/R/ds.dmtC2S.R +++ b/R/ds.dmtC2S.R @@ -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.extractQuantiles.R b/R/ds.extractQuantiles.R index ba39dd51..4068f8f3 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 60227913..e1bc21c1 100644 --- a/R/ds.forestplot.R +++ b/R/ds.forestplot.R @@ -10,6 +10,7 @@ #' 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 13cba2d9..8b1dbceb 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.glmSLMA.R b/R/ds.glmSLMA.R index 9b46a6a4..3c9d0edb 100644 --- a/R/ds.glmSLMA.R +++ b/R/ds.glmSLMA.R @@ -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 5629d937..9fc259c5 100644 --- a/R/ds.glmSummary.R +++ b/R/ds.glmSummary.R @@ -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 8bb8aa36..b996707e 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 262b1d70..f42b6baf 100644 --- a/R/ds.heatmapPlot.R +++ b/R/ds.heatmapPlot.R @@ -133,7 +133,7 @@ #' datasources = connections[1]) #only the first server is used (study1) #' #' # Example 3: Plot a combined heat map plot using the method 'deterministic' centroids of each -#' k = 7 nearest neighbours for numints = 40 +#' # k = 7 nearest neighbours for numints = 40 #' ds.heatmapPlot(x = 'D$LAB_TSC', #' y = 'D$LAB_HDL', #' numints = 40, @@ -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 0f5357b7..562bebcb 100644 --- a/R/ds.histogram.R +++ b/R/ds.histogram.R @@ -120,7 +120,7 @@ #' datasources = connections) #all studies are used #' #' # Example 2: generate a combined histogram with the default small cells counts -#' suppression rule +#' # suppression rule #' ds.histogram(x = 'D$PM_BMI_CONTINUOUS', #' method = 'smallCellsRule', #' type = 'combine', @@ -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.listClientsideFunctions.R b/R/ds.listClientsideFunctions.R index ba7c57a8..75240147 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 b6d05c9b..8b7c69b2 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.matrix.R b/R/ds.matrix.R index b90356c5..69ad3a72 100644 --- a/R/ds.matrix.R +++ b/R/ds.matrix.R @@ -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 8c8ca877..2deef1a0 100644 --- a/R/ds.matrixDiag.R +++ b/R/ds.matrixDiag.R @@ -112,7 +112,7 @@ #' datasources = connections) #' #' #Example 2: Create a square matrix with the server-side scalar as all diagonal values -#' and all the other values = 0 +#' #and all the other values = 0 #' #' #Create a scalar in the server-side #' @@ -152,7 +152,7 @@ #' datasources = connections) #' #' #Example 4: Create a square matrix with the client-side vector as a diagonal -#' and all the other values = 0 +#' #and all the other values = 0 #' #' ds.matrixDiag(x1 = c(2,6,9,10), #' aim = "clientside.vector.2.matrix", @@ -161,7 +161,7 @@ #' datasources = connections) #' #' #Example 5: Create a square matrix with the client-side scalar as all diagonal values -#' and all the other values = 0 +#' #and all the other values = 0 #' #' ds.matrixDiag(x1 = 4, #' aim = "clientside.scalar.2.matrix", @@ -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 00000000..af59498e --- /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.rBinom.R b/R/ds.rBinom.R index 2f39f8b1..ec8b4f88 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 6100c850..76d885f1 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 2d2c7f01..74be7fdf 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 d98fa28f..ea74766b 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 1d9d98ed..8ffa6a97 100644 --- a/R/ds.ranksSecure.R +++ b/R/ds.ranksSecure.R @@ -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 47e9165c..d0aca96a 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 184ccea2..adeae5bf 100644 --- a/R/ds.recodeValues.R +++ b/R/ds.recodeValues.R @@ -69,7 +69,7 @@ #' values2replace.vector = c(1,2), #' new.values.vector = c(1,2), #' missing = 99, -#' newobj = 'bmi_recoded' +#' newobj = 'bmi_recoded', #' datasources = connections) #' #' # Clear the Datashield R sessions and logout diff --git a/R/ds.rep.R b/R/ds.rep.R index 2d2ce951..2f3e0301 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 08c1b04c..9bd6780f 100644 --- a/R/ds.sample.R +++ b/R/ds.sample.R @@ -207,18 +207,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 6c2c7805..55804b3b 100644 --- a/R/ds.scatterPlot.R +++ b/R/ds.scatterPlot.R @@ -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.table.R b/R/ds.table.R index 780f9f86..0f6ea996 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) } @@ -1540,6 +1539,12 @@ if(num.table.dims==1) }#END second dim=1 loop +################################################# +# Setup on.exit() to restore options 'warn' value +################################################# + +old_warn_option <- base::getOption("warn") +on.exit(base::options(warn = old_warn_option), add = TRUE) ################################ #NOW UNDERTAKE CHISQUARED TESTS# diff --git a/R/ds.table2D.R b/R/ds.table2D.R index 0dee00ab..d632755a 100644 --- a/R/ds.table2D.R +++ b/R/ds.table2D.R @@ -56,7 +56,7 @@ #' # Example 2: generate a two dimensional table, outputting study specific contingency tables #' ds.table2D(x='D$DIS_DIAB', y='D$GENDER', type='split') #' # display the 5 results items, one at a time to avoid having too much information displayed -#' at the same time +#' # at the same time #' output$counts #' output$rowPercent #' output$colPercent @@ -112,6 +112,13 @@ ds.table2D <- function(x=NULL, y=NULL, type='both', warningMessage=TRUE, datasou stop("Function argument 'type' has to be either 'combine', 'split' or 'both'") } + ################################################# + # Setup on.exit() to restore options 'warn' value + ################################################# + + old_warn_option <- base::getOption("warn") + on.exit(base::options(warn = old_warn_option), add = TRUE) + # the input variable might be given as column table (i.e. D$x) # or just as a vector not attached to a table (i.e. x) # we have to make sure the function deals with each case diff --git a/R/glmChecks.R b/R/glmChecks.R index 6dcfe2ee..b469c7c7 100644 --- a/R/glmChecks.R +++ b/R/glmChecks.R @@ -52,6 +52,14 @@ glmChecks <- function(formula, data, offset, weights, datasources){ varIdentifier <- append(varIdentifier, "weights") } + ################################################# + # Setup on.exit() to restore options 'warn' value + ################################################# + + old_warn_option <- base::getOption("warn") + on.exit(base::options(warn = old_warn_option), add = TRUE) + + # check that each variable is defined and not empty and each study. Stop the process if any check fails stdnames <- names(datasources) for(i in 1:length(elts)){ diff --git a/R/subsetHelper.R b/R/subsetHelper.R index 025a0680..82eae727 100644 --- a/R/subsetHelper.R +++ b/R/subsetHelper.R @@ -17,6 +17,7 @@ #' @keywords internal #' @return \code{subsetHelper} returns a message or the class of the object if the #' object has the same class in all studies. +#' @export #' @examples #' \dontrun{ #' diff --git a/README.md b/README.md index c82341b5..616c30dc 100644 --- a/README.md +++ b/README.md @@ -23,8 +23,8 @@ And the development version from install.packages("remotes") remotes::install_github("datashield/dsBaseClient", "") -# Install v6.3.4 with the following -remotes::install_github("datashield/dsBaseClient", "6.3.4") +# 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 @@ -50,7 +50,7 @@ The code here is organised as: [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.4. + _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, diff --git a/armadillo_azure-pipelines.yml b/armadillo_azure-pipelines.yml index 8439c8ce..4ff1f497 100644 --- a/armadillo_azure-pipelines.yml +++ b/armadillo_azure-pipelines.yml @@ -58,10 +58,10 @@ schedules: - master always: true - cron: "0 2 * * *" - displayName: Nightly build - v6.3.4-dev + displayName: Nightly build - v6.3.5-dev branches: include: - - v6.3.4-dev + - v6.3.5-dev always: true ######################################################################################### @@ -132,7 +132,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('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')" @@ -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.3.4-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.3.5-permissive.tar.gz" -X POST http://localhost:8080/install-package sleep 60 docker container restart dsbaseclient_armadillo_1 diff --git a/azure-pipelines.yml b/azure-pipelines.yml index 6c6103d4..db3d7a18 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: @@ -58,10 +44,10 @@ schedules: - master always: true - cron: "0 2 * * *" - displayName: Nightly build - v6.3.4-dev + displayName: Nightly build - v6.3.5-dev branches: include: - - v6.3.4-dev + - v6.3.5-dev always: true ######################################################################################### @@ -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 @@ -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 = 'v6.3.4-dev'); 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 @@ -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 7a791d39..37c44cda 100644 --- a/docker-compose_armadillo.yml +++ b/docker-compose_armadillo.yml @@ -3,7 +3,7 @@ services: hostname: armadillo ports: - 8080:8080 - image: datashield/armadillo_citest:latest + image: datashield/armadillo_citest:5.11.0 environment: LOGGING_CONFIG: 'classpath:logback-file.xml' AUDIT_LOG_PATH: '/app/logs/audit.log' @@ -16,6 +16,7 @@ services: default: hostname: default - image: datashield/rock-omicron-karma-permissive:devel + image: datashield/rock-quebrada-lamda:latest +# image: datashield/rserver-panda-lamda:devel environment: DEBUG: "FALSE" diff --git a/docker-compose_opal.yml b/docker-compose_opal.yml index 40b3bf26..a62dec67 100644 --- a/docker-compose_opal.yml +++ b/docker-compose_opal.yml @@ -20,6 +20,6 @@ services: - MONGO_INITDB_ROOT_USERNAME=root - MONGO_INITDB_ROOT_PASSWORD=foobar rock: - image: datashield/rock-omicron-karma-permissive:devel + image: datashield/rock-quebrada-lamda-permissive:latest environment: DEBUG: "FALSE" diff --git a/docs/404.html b/docs/404.html index 761ee0b9..c37c451a 100644 --- a/docs/404.html +++ b/docs/404.html @@ -32,7 +32,7 @@ dsBaseClient - 6.3.4 + 6.3.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 b495f548..b18449a1 100644 --- a/docs/LICENSE.html +++ b/docs/LICENSE.html @@ -17,7 +17,7 @@ dsBaseClient - 6.3.4 + 6.3.5 @@ -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 177847f6..827877ce 100644 --- a/docs/authors.html +++ b/docs/authors.html @@ -17,7 +17,7 @@ dsBaseClient - 6.3.4 + 6.3.5 @@ -71,10 +71,6 @@

Authors and Citation

Demetris Avraam. Author.

-
  • -

    Demetris Avraam. Author. -

    -
  • Yannick Marcon. Author.

    @@ -104,14 +100,14 @@

    Citation

    -

    Burton P, Wilson R, Butters O, Ryser-Welch P, Westerberg A, Abarrategui L, Villegas-Diaz R, Avraam D, Avraam D, Marcon Y, Bishop T, Gaye A, Escribà-Montagut X, Wheater S (2025). +

    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.3.4. +R package version 6.3.5.

    @Manual{,
       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 Demetris Avraam and Yannick Marcon and Tom Bishop and Amadou Gaye and Xavier Escribà-Montagut and Stuart Wheater},
    -  note = {R package version 6.3.4},
    +  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.3.5},
     }

    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.” @@ -168,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 cc91e149..b3d66be0 100644 --- a/docs/index.html +++ b/docs/index.html @@ -12,7 +12,7 @@ - + Pool 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 b3e3b55e..8024db82 100644 --- a/docs/reference/ds.Boole.html +++ b/docs/reference/ds.Boole.html @@ -20,7 +20,7 @@ dsBaseClient - 6.3.4 + 6.3.5 @@ -200,11 +200,11 @@

    Examples

    -

    Site built with pkgdown 2.1.3.

    +

    Site built with pkgdown 2.2.0.

    diff --git a/docs/reference/ds.abs.html b/docs/reference/ds.abs.html index d986834a..3ca2945f 100644 --- a/docs/reference/ds.abs.html +++ b/docs/reference/ds.abs.html @@ -18,7 +18,7 @@ dsBaseClient - 6.3.4 + 6.3.5 @@ -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.asCharacter.html b/docs/reference/ds.asCharacter.html index 9b2b1fda..1ea041a6 100644 --- a/docs/reference/ds.asCharacter.html +++ b/docs/reference/ds.asCharacter.html @@ -18,7 +18,7 @@ dsBaseClient - 6.3.4 + 6.3.5 @@ -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.asDataMatrix.html b/docs/reference/ds.asDataMatrix.html index eb7b66e3..43145cc6 100644 --- a/docs/reference/ds.asDataMatrix.html +++ b/docs/reference/ds.asDataMatrix.html @@ -18,7 +18,7 @@ dsBaseClient - 6.3.4 + 6.3.5 @@ -135,11 +135,11 @@

    Examples

    -

    Site built with pkgdown 2.1.3.

    +

    Site built with pkgdown 2.2.0.

    diff --git a/docs/reference/ds.asFactor.html b/docs/reference/ds.asFactor.html index a2db6d26..7c3ea953 100644 --- a/docs/reference/ds.asFactor.html +++ b/docs/reference/ds.asFactor.html @@ -17,7 +17,7 @@ dsBaseClient - 6.3.4 + 6.3.5 @@ -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 32283795..c29a0462 100644 --- a/docs/reference/ds.asFactorSimple.html +++ b/docs/reference/ds.asFactorSimple.html @@ -18,7 +18,7 @@ dsBaseClient - 6.3.4 + 6.3.5 @@ -103,11 +103,11 @@

    Author

    -

    Site built with pkgdown 2.1.3.

    +

    Site built with pkgdown 2.2.0.

    diff --git a/docs/reference/ds.asInteger.html b/docs/reference/ds.asInteger.html index 0bb6cce0..f491af4a 100644 --- a/docs/reference/ds.asInteger.html +++ b/docs/reference/ds.asInteger.html @@ -18,7 +18,7 @@ dsBaseClient - 6.3.4 + 6.3.5 @@ -148,11 +148,11 @@

    Examples

    -

    Site built with pkgdown 2.1.3.

    +

    Site built with pkgdown 2.2.0.

    diff --git a/docs/reference/ds.asList.html b/docs/reference/ds.asList.html index 45437c4b..d9d70b03 100644 --- a/docs/reference/ds.asList.html +++ b/docs/reference/ds.asList.html @@ -18,7 +18,7 @@ dsBaseClient - 6.3.4 + 6.3.5 @@ -133,11 +133,11 @@

    Examples

    -

    Site built with pkgdown 2.1.3.

    +

    Site built with pkgdown 2.2.0.

    diff --git a/docs/reference/ds.asLogical.html b/docs/reference/ds.asLogical.html index 58658647..a30586d4 100644 --- a/docs/reference/ds.asLogical.html +++ b/docs/reference/ds.asLogical.html @@ -18,7 +18,7 @@ dsBaseClient - 6.3.4 + 6.3.5 @@ -134,11 +134,11 @@

    Examples

    -

    Site built with pkgdown 2.1.3.

    +

    Site built with pkgdown 2.2.0.

    diff --git a/docs/reference/ds.asMatrix.html b/docs/reference/ds.asMatrix.html index c961e258..b4997553 100644 --- a/docs/reference/ds.asMatrix.html +++ b/docs/reference/ds.asMatrix.html @@ -18,7 +18,7 @@ dsBaseClient - 6.3.4 + 6.3.5 @@ -136,11 +136,11 @@

    Examples

    -

    Site built with pkgdown 2.1.3.

    +

    Site built with pkgdown 2.2.0.

    diff --git a/docs/reference/ds.asNumeric.html b/docs/reference/ds.asNumeric.html index 76ec5136..db255308 100644 --- a/docs/reference/ds.asNumeric.html +++ b/docs/reference/ds.asNumeric.html @@ -18,7 +18,7 @@ dsBaseClient - 6.3.4 + 6.3.5 @@ -147,11 +147,11 @@

    Examples

    -

    Site built with pkgdown 2.1.3.

    +

    Site built with pkgdown 2.2.0.

    diff --git a/docs/reference/ds.assign.html b/docs/reference/ds.assign.html index af6b3e02..ff9c513d 100644 --- a/docs/reference/ds.assign.html +++ b/docs/reference/ds.assign.html @@ -17,7 +17,7 @@ dsBaseClient - 6.3.4 + 6.3.5 @@ -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 2c93a308..1343b260 100644 --- a/docs/reference/ds.auc.html +++ b/docs/reference/ds.auc.html @@ -18,7 +18,7 @@ dsBaseClient - 6.3.4 + 6.3.5 @@ -89,11 +89,11 @@

    Author

    -

    Site built with pkgdown 2.1.3.

    +

    Site built with pkgdown 2.2.0.

    diff --git a/docs/reference/ds.boxPlot.html b/docs/reference/ds.boxPlot.html index c7b9a1e0..00449f1e 100644 --- a/docs/reference/ds.boxPlot.html +++ b/docs/reference/ds.boxPlot.html @@ -18,7 +18,7 @@ dsBaseClient - 6.3.4 + 6.3.5 @@ -103,7 +103,72 @@

    Value

    Examples

    - +
    if (FALSE) { # \dontrun{
    +  ## Version 6, for version 5 see the Wiki
    +  
    +  ### Please ensure you have a training Virtual Machine running,
    +  # or that you have a live connection to a server.
    +     
    +  # 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") 
    +  
    +  ## Create a boxplot of one variable
    +  ds.boxPlot("D", "LAB_HDL", datasources = connections) 
    + 
    +  ## Create a boxplot that is split by study:
    +  ds.boxPlot("D", "LAB_HDL", type= "split", datasources = connections) 
    +  
    +  ## Create a boxplot of two variables variable
    +  ds.boxPlot("D", c("LAB_HDL", "LAB_TRIG"), type="pooled", 
    +  datasources = connections)  
    +  # only one plot is created (of the aggregated results of all servers)
    +  
    +  ## Create a boxplot of two variables, which are split by a factor
    +  ds.boxPlot("D", c("LAB_HDL", "LAB_TRIG"), group = "GENDER", 
    +  datasources = connections)
    +  
    +  ## Create a boxplot with x- and y-axis labels
    +  ds.boxPlot("D", c("LAB_HDL", "LAB_TRIG"), group = "GENDER", 
    +  xlabel = "Variable", ylabel = "Measurement", datasources = connections)
    +  
    +  ## Improve the presentation of ds.boxplot output using ggplot:
    +  ### User must save the output, which is in a ggplot format already:
    +  a <- ds.boxPlot("D", c("LAB_HDL", "LAB_TRIG"), group = "GENDER", 
    +  xlabel = "Variable", ylabel = "Measurement", datasources = connections)
    +                 
    +  ### Then customise output "a" using ggplot tools:
    +  a + ggplot2::scale_fill_discrete(name = "Gender", labels = c("Male", "Female"))
    +  
    +  ### Or use an alternative way, to maintain the aesthetics:
    +  a + ggplot2::scale_fill_brewer(name = "Gender", labels = c("Male", "Female")) 
    +                                                                                
    +  # Clear the Datashield R sessions and logout                 
    +  datashield.logout(connections) 
    +  
    +} # }   
    +
    +
    diff --git a/docs/reference/ds.boxPlotGG.html b/docs/reference/ds.boxPlotGG.html index 1d545639..3e779c1c 100644 --- a/docs/reference/ds.boxPlotGG.html +++ b/docs/reference/ds.boxPlotGG.html @@ -18,7 +18,7 @@ dsBaseClient - 6.3.4 + 6.3.5 @@ -108,11 +108,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.html b/docs/reference/ds.boxPlotGG_data_Treatment.html index 4ad0dbdc..3fcb2e8c 100644 --- a/docs/reference/ds.boxPlotGG_data_Treatment.html +++ b/docs/reference/ds.boxPlotGG_data_Treatment.html @@ -17,7 +17,7 @@ dsBaseClient - 6.3.4 + 6.3.5 @@ -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 4e760a43..f4cdd49a 100644 --- a/docs/reference/ds.boxPlotGG_data_Treatment_numeric.html +++ b/docs/reference/ds.boxPlotGG_data_Treatment_numeric.html @@ -17,7 +17,7 @@ dsBaseClient - 6.3.4 + 6.3.5 @@ -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 a2f69f98..c9c63d12 100644 --- a/docs/reference/ds.boxPlotGG_numeric.html +++ b/docs/reference/ds.boxPlotGG_numeric.html @@ -17,7 +17,7 @@ dsBaseClient - 6.3.4 + 6.3.5 @@ -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 46f7ed91..267ba461 100644 --- a/docs/reference/ds.boxPlotGG_table.html +++ b/docs/reference/ds.boxPlotGG_table.html @@ -17,7 +17,7 @@ dsBaseClient - 6.3.4 + 6.3.5 @@ -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 e3ab71fd..27cc3024 100644 --- a/docs/reference/ds.bp_standards.html +++ b/docs/reference/ds.bp_standards.html @@ -20,7 +20,7 @@ dsBaseClient - 6.3.4 + 6.3.5 @@ -126,11 +126,11 @@

    Author

    -

    Site built with pkgdown 2.1.3.

    +

    Site built with pkgdown 2.2.0.

    diff --git a/docs/reference/ds.c.html b/docs/reference/ds.c.html index d15251ba..a10858a7 100644 --- a/docs/reference/ds.c.html +++ b/docs/reference/ds.c.html @@ -17,7 +17,7 @@ dsBaseClient - 6.3.4 + 6.3.5 @@ -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 91ef0d49..5b12f78e 100644 --- a/docs/reference/ds.cbind.html +++ b/docs/reference/ds.cbind.html @@ -18,7 +18,7 @@ dsBaseClient - 6.3.4 + 6.3.5 @@ -206,11 +206,11 @@

    Examples

    -

    Site built with pkgdown 2.1.3.

    +

    Site built with pkgdown 2.2.0.

    diff --git a/docs/reference/ds.changeRefGroup.html b/docs/reference/ds.changeRefGroup.html index 30b39d21..10b57d0b 100644 --- a/docs/reference/ds.changeRefGroup.html +++ b/docs/reference/ds.changeRefGroup.html @@ -19,7 +19,7 @@ dsBaseClient - 6.3.4 + 6.3.5 @@ -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.class.html b/docs/reference/ds.class.html index 7906dc57..67503eac 100644 --- a/docs/reference/ds.class.html +++ b/docs/reference/ds.class.html @@ -18,7 +18,7 @@ dsBaseClient - 6.3.4 + 6.3.5 @@ -130,11 +130,11 @@

    Examples

    -

    Site built with pkgdown 2.1.3.

    +

    Site built with pkgdown 2.2.0.

    diff --git a/docs/reference/ds.colnames.html b/docs/reference/ds.colnames.html index 64853c41..d4cbaf16 100644 --- a/docs/reference/ds.colnames.html +++ b/docs/reference/ds.colnames.html @@ -18,7 +18,7 @@ dsBaseClient - 6.3.4 + 6.3.5 @@ -94,28 +94,28 @@

    Examples

    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) } # } @@ -127,11 +127,11 @@

    Examples

    -

    Site built with pkgdown 2.1.3.

    +

    Site built with pkgdown 2.2.0.

    diff --git a/docs/reference/ds.completeCases.html b/docs/reference/ds.completeCases.html index 6fa86c83..5c54c139 100644 --- a/docs/reference/ds.completeCases.html +++ b/docs/reference/ds.completeCases.html @@ -18,7 +18,7 @@ dsBaseClient - 6.3.4 + 6.3.5 @@ -147,11 +147,11 @@

    Examples

    -

    Site built with pkgdown 2.1.3.

    +

    Site built with pkgdown 2.2.0.

    diff --git a/docs/reference/ds.contourPlot.html b/docs/reference/ds.contourPlot.html index 2c4cd97d..0a8a57ff 100644 --- a/docs/reference/ds.contourPlot.html +++ b/docs/reference/ds.contourPlot.html @@ -18,7 +18,7 @@ dsBaseClient - 6.3.4 + 6.3.5 @@ -203,11 +203,11 @@

    Examples

    -

    Site built with pkgdown 2.1.3.

    +

    Site built with pkgdown 2.2.0.

    diff --git a/docs/reference/ds.cor.html b/docs/reference/ds.cor.html index 19251198..2690c2ca 100644 --- a/docs/reference/ds.cor.html +++ b/docs/reference/ds.cor.html @@ -18,7 +18,7 @@ dsBaseClient - 6.3.4 + 6.3.5 @@ -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.corTest.html b/docs/reference/ds.corTest.html index fdd369b9..f508a53d 100644 --- a/docs/reference/ds.corTest.html +++ b/docs/reference/ds.corTest.html @@ -17,7 +17,7 @@ dsBaseClient - 6.3.4 + 6.3.5 @@ -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 3637997c..645ea779 100644 --- a/docs/reference/ds.cov.html +++ b/docs/reference/ds.cov.html @@ -18,7 +18,7 @@ dsBaseClient - 6.3.4 + 6.3.5 @@ -181,11 +181,11 @@

    Examples

    -

    Site built with pkgdown 2.1.3.

    +

    Site built with pkgdown 2.2.0.

    diff --git a/docs/reference/ds.dataFrame.html b/docs/reference/ds.dataFrame.html index 791095af..e197076d 100644 --- a/docs/reference/ds.dataFrame.html +++ b/docs/reference/ds.dataFrame.html @@ -18,7 +18,7 @@ dsBaseClient - 6.3.4 + 6.3.5 @@ -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.dataFrameFill.html b/docs/reference/ds.dataFrameFill.html index 7278740e..e99a1b5b 100644 --- a/docs/reference/ds.dataFrameFill.html +++ b/docs/reference/ds.dataFrameFill.html @@ -17,7 +17,7 @@ dsBaseClient - 6.3.4 + 6.3.5 @@ -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 99e75c79..a1e355fa 100644 --- a/docs/reference/ds.dataFrameSort.html +++ b/docs/reference/ds.dataFrameSort.html @@ -17,7 +17,7 @@ dsBaseClient - 6.3.4 + 6.3.5 @@ -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 73448ea5..18b2ed85 100644 --- a/docs/reference/ds.dataFrameSubset.html +++ b/docs/reference/ds.dataFrameSubset.html @@ -17,7 +17,7 @@ dsBaseClient - 6.3.4 + 6.3.5 @@ -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 4390d2b4..8b8ac928 100644 --- a/docs/reference/ds.densityGrid.html +++ b/docs/reference/ds.densityGrid.html @@ -18,7 +18,7 @@ dsBaseClient - 6.3.4 + 6.3.5 @@ -110,7 +110,59 @@

    Author

    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")
    +  builder$append(server = "study3",
    +                 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") 
    + 
    +  #Generate the density grid
    +  # Example1: generate a combined grid density object (default)
    +  ds.densityGrid(x="D$LAB_TSC",
    +                 y="D$LAB_HDL",
    +                 datasources = connections)#all opal servers are used
    +
    +  # Example2: generate a grid density object for each study separately
    +  ds.densityGrid(x="D$LAB_TSC",
    +                 y="D$LAB_HDL",
    +                 type="split",
    +                 datasources = connections[1])#only the first Opal server is used ("study1")
    +
    +  # Example3: generate a grid density object where the number of intervals is set to 15, for
    +  #           each study separately
    +  ds.densityGrid(x="D$LAB_TSC",
    +                 y="D$LAB_HDL",
    +                 type="split",
    +                 numints=15,
    +                 datasources = connections)
    +
    +  # clear the Datashield R sessions and logout
    +  datashield.logout(connections)
    +
    +} # }
    +
    +
    diff --git a/docs/reference/ds.dim.html b/docs/reference/ds.dim.html index 037e87c7..3b979bac 100644 --- a/docs/reference/ds.dim.html +++ b/docs/reference/ds.dim.html @@ -18,7 +18,7 @@ dsBaseClient - 6.3.4 + 6.3.5 @@ -167,11 +167,11 @@

    Examples

    -

    Site built with pkgdown 2.1.3.

    +

    Site built with pkgdown 2.2.0.

    diff --git a/docs/reference/ds.dmtC2S.html b/docs/reference/ds.dmtC2S.html index b0c53132..5992efa0 100644 --- a/docs/reference/ds.dmtC2S.html +++ b/docs/reference/ds.dmtC2S.html @@ -18,7 +18,7 @@ dsBaseClient - 6.3.4 + 6.3.5 @@ -120,11 +120,11 @@

    Author

    -

    Site built with pkgdown 2.1.3.

    +

    Site built with pkgdown 2.2.0.

    diff --git a/docs/reference/ds.elspline.html b/docs/reference/ds.elspline.html index b2a8d5d8..ac1b671e 100644 --- a/docs/reference/ds.elspline.html +++ b/docs/reference/ds.elspline.html @@ -20,7 +20,7 @@ dsBaseClient - 6.3.4 + 6.3.5 @@ -119,11 +119,11 @@

    Author

    -

    Site built with pkgdown 2.1.3.

    +

    Site built with pkgdown 2.2.0.

    diff --git a/docs/reference/ds.exists.html b/docs/reference/ds.exists.html index f5db40ba..472c4485 100644 --- a/docs/reference/ds.exists.html +++ b/docs/reference/ds.exists.html @@ -18,7 +18,7 @@ dsBaseClient - 6.3.4 + 6.3.5 @@ -138,11 +138,11 @@

    Examples

    -

    Site built with pkgdown 2.1.3.

    +

    Site built with pkgdown 2.2.0.

    diff --git a/docs/reference/ds.exp.html b/docs/reference/ds.exp.html index eff91413..0922474a 100644 --- a/docs/reference/ds.exp.html +++ b/docs/reference/ds.exp.html @@ -18,7 +18,7 @@ dsBaseClient - 6.3.4 + 6.3.5 @@ -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.extractQuantiles.html b/docs/reference/ds.extractQuantiles.html index 0984ace6..f0f7af68 100644 --- a/docs/reference/ds.extractQuantiles.html +++ b/docs/reference/ds.extractQuantiles.html @@ -26,7 +26,7 @@ dsBaseClient - 6.3.4 + 6.3.5 @@ -176,11 +176,11 @@

    Author

    -

    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 8ad597e4..1a5a3f5b 100644 --- a/docs/reference/ds.forestplot.html +++ b/docs/reference/ds.forestplot.html @@ -18,7 +18,7 @@ dsBaseClient - 6.3.4 + 6.3.5 @@ -73,6 +73,10 @@

    Arguments

    See details from ?meta::metagen for the different options.

    +
    +

    Value

    +

    Results a foresplot object created with `meta::forest`.

    +

    Examples

    @@ -118,11 +122,11 @@

    Examples

    -

    Site built with pkgdown 2.1.3.

    +

    Site built with pkgdown 2.2.0.

    diff --git a/docs/reference/ds.gamlss.html b/docs/reference/ds.gamlss.html index 6ea9d060..6362d6b3 100644 --- a/docs/reference/ds.gamlss.html +++ b/docs/reference/ds.gamlss.html @@ -23,7 +23,7 @@ dsBaseClient - 6.3.4 + 6.3.5 @@ -215,11 +215,11 @@

    Author

    -

    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 2b697ccb..f704cf59 100644 --- a/docs/reference/ds.getWGSR.html +++ b/docs/reference/ds.getWGSR.html @@ -18,7 +18,7 @@ dsBaseClient - 6.3.4 + 6.3.5 @@ -204,11 +204,11 @@

    Examples

    -

    Site built with pkgdown 2.1.3.

    +

    Site built with pkgdown 2.2.0.

    diff --git a/docs/reference/ds.glm.html b/docs/reference/ds.glm.html index 651c41e0..9bba0894 100644 --- a/docs/reference/ds.glm.html +++ b/docs/reference/ds.glm.html @@ -18,7 +18,7 @@ dsBaseClient - 6.3.4 + 6.3.5 @@ -427,11 +427,11 @@

    Examples

    -

    Site built with pkgdown 2.1.3.

    +

    Site built with pkgdown 2.2.0.

    diff --git a/docs/reference/ds.glmPredict.html b/docs/reference/ds.glmPredict.html index 2d4434a0..d1139d4a 100644 --- a/docs/reference/ds.glmPredict.html +++ b/docs/reference/ds.glmPredict.html @@ -18,7 +18,7 @@ dsBaseClient - 6.3.4 + 6.3.5 @@ -227,11 +227,11 @@

    Author

    -

    Site built with pkgdown 2.1.3.

    +

    Site built with pkgdown 2.2.0.

    diff --git a/docs/reference/ds.glmSLMA.html b/docs/reference/ds.glmSLMA.html index d5ab72ff..09833a2d 100644 --- a/docs/reference/ds.glmSLMA.html +++ b/docs/reference/ds.glmSLMA.html @@ -18,7 +18,7 @@ dsBaseClient - 6.3.4 + 6.3.5 @@ -493,11 +493,11 @@

    Examples

    -

    Site built with pkgdown 2.1.3.

    +

    Site built with pkgdown 2.2.0.

    diff --git a/docs/reference/ds.glmSummary.html b/docs/reference/ds.glmSummary.html index 5bacf7ad..dfffeb2a 100644 --- a/docs/reference/ds.glmSummary.html +++ b/docs/reference/ds.glmSummary.html @@ -20,7 +20,7 @@ dsBaseClient - 6.3.4 + 6.3.5 @@ -154,11 +154,11 @@

    Author

    -

    Site built with pkgdown 2.1.3.

    +

    Site built with pkgdown 2.2.0.

    diff --git a/docs/reference/ds.glmerSLMA.html b/docs/reference/ds.glmerSLMA.html index ccc7ec13..7d1eea67 100644 --- a/docs/reference/ds.glmerSLMA.html +++ b/docs/reference/ds.glmerSLMA.html @@ -18,7 +18,7 @@ dsBaseClient - 6.3.4 + 6.3.5 @@ -379,11 +379,11 @@

    Examples

    -

    Site built with pkgdown 2.1.3.

    +

    Site built with pkgdown 2.2.0.

    diff --git a/docs/reference/ds.heatmapPlot.html b/docs/reference/ds.heatmapPlot.html index b45a3e6f..73d3a684 100644 --- a/docs/reference/ds.heatmapPlot.html +++ b/docs/reference/ds.heatmapPlot.html @@ -17,7 +17,7 @@ dsBaseClient - 6.3.4 + 6.3.5 @@ -189,7 +189,65 @@

    Author

    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")
    +  builder$append(server = "study3",
    +                 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") 
    +  
    +  # Compute the heat map plot 
    +  # Example 1: Plot a combined (default) heat map plot of the variables 'LAB_TSC'
    +  # and 'LAB_HDL' using the method 'smallCellsRule' (default)
    +  ds.heatmapPlot(x = 'D$LAB_TSC',
    +                 y = 'D$LAB_HDL',
    +                 datasources = connections) #all servers are used
    +                 
    +  # Example 2: Plot a split heat map  plot of the variables 'LAB_TSC'
    +  # and 'LAB_HDL' using the method 'smallCellsRule' (default)
    +  ds.heatmapPlot(x = 'D$LAB_TSC', 
    +                 y = 'D$LAB_HDL',
    +                 method = 'smallCellsRule', 
    +                 type = 'split',
    +                 datasources = connections[1]) #only the first server is used (study1)
    +                 
    +  # Example 3: Plot a combined heat map plot using the method 'deterministic' centroids of each 
    +  # k = 7 nearest neighbours for numints = 40
    +  ds.heatmapPlot(x = 'D$LAB_TSC',
    +                 y = 'D$LAB_HDL', 
    +                 numints = 40, 
    +                 method = 'deterministic',
    +                 k = 7,
    +                 type = 'split',
    +                 datasources = connections[2]) #only the second server is used (study2)
    +
    +
    +  # clear the Datashield R sessions and logout
    +  datashield.logout(connections)
    +
    +} # }
    +
    +
    diff --git a/docs/reference/ds.hetcor.html b/docs/reference/ds.hetcor.html index 2373f711..79ad610c 100644 --- a/docs/reference/ds.hetcor.html +++ b/docs/reference/ds.hetcor.html @@ -17,7 +17,7 @@ dsBaseClient - 6.3.4 + 6.3.5 @@ -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 329bbf7a..ee742708 100644 --- a/docs/reference/ds.histogram.html +++ b/docs/reference/ds.histogram.html @@ -17,7 +17,7 @@ dsBaseClient - 6.3.4 + 6.3.5 @@ -180,7 +180,72 @@

    Author

    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")
    +  builder$append(server = "study3",
    +                 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") 
    +  
    +  # Compute the histogram
    +  # Example 1: generate a histogram for each study separately 
    +  ds.histogram(x = 'D$PM_BMI_CONTINUOUS',
    +              type = "split",
    +              datasources = connections) #all studies are used
    +
    +  # Example 2: generate a combined histogram with the default small cells counts
    +  #             suppression rule
    +  ds.histogram(x = 'D$PM_BMI_CONTINUOUS',
    +               method = 'smallCellsRule',
    +               type = 'combine',
    +               datasources = connections[1]) #only the first study is used (study1)
    +
    +  # Example 3: if a variable is of type factor the function returns an error
    +  ds.histogram(x = 'D$PM_BMI_CATEGORICAL',
    +               datasources = connections)
    +
    +  # Example 4: generate a combined histogram with the deterministic method for k=50
    +  ds.histogram(x = 'D$PM_BMI_CONTINUOUS',
    +               k = 50, 
    +               method = 'deterministic',
    +               type = 'combine',
    +               datasources = connections[2])#only the second study is used (study2)
    +
    +
    +  # Example 5: create a histogram and the probability density on the plot
    +  hist <- ds.histogram(x = 'D$PM_BMI_CONTINUOUS',
    +                       method = 'probabilistic', type='combine',
    +                       num.breaks = 30, 
    +                       vertical.axis = 'Density',
    +                       datasources = connections)
    +  lines(hist$mids, hist$density)
    +
    +  # clear the Datashield R sessions and logout
    +  datashield.logout(connections)
    +  } # }
    +
    +
    +
    diff --git a/docs/reference/ds.igb_standards.html b/docs/reference/ds.igb_standards.html index 1f04c7bb..05c0bdf5 100644 --- a/docs/reference/ds.igb_standards.html +++ b/docs/reference/ds.igb_standards.html @@ -17,7 +17,7 @@ dsBaseClient - 6.3.4 + 6.3.5 @@ -141,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 7fa98292..1c815968 100644 --- a/docs/reference/ds.isNA.html +++ b/docs/reference/ds.isNA.html @@ -18,7 +18,7 @@ dsBaseClient - 6.3.4 + 6.3.5 @@ -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.isValid.html b/docs/reference/ds.isValid.html index 3ad491a0..51be2e36 100644 --- a/docs/reference/ds.isValid.html +++ b/docs/reference/ds.isValid.html @@ -18,7 +18,7 @@ dsBaseClient - 6.3.4 + 6.3.5 @@ -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.kurtosis.html b/docs/reference/ds.kurtosis.html index 8c2012be..f77013ae 100644 --- a/docs/reference/ds.kurtosis.html +++ b/docs/reference/ds.kurtosis.html @@ -17,7 +17,7 @@ dsBaseClient - 6.3.4 + 6.3.5 @@ -103,11 +103,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 f71fef07..98950b90 100644 --- a/docs/reference/ds.length.html +++ b/docs/reference/ds.length.html @@ -19,7 +19,7 @@ dsBaseClient - 6.3.4 + 6.3.5 @@ -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.levels.html b/docs/reference/ds.levels.html index c2f42b3c..addda2b4 100644 --- a/docs/reference/ds.levels.html +++ b/docs/reference/ds.levels.html @@ -19,7 +19,7 @@ dsBaseClient - 6.3.4 + 6.3.5 @@ -133,11 +133,11 @@

    Examples

    -

    Site built with pkgdown 2.1.3.

    +

    Site built with pkgdown 2.2.0.

    diff --git a/docs/reference/ds.lexis.html b/docs/reference/ds.lexis.html index 2f5e87db..c01e9475 100644 --- a/docs/reference/ds.lexis.html +++ b/docs/reference/ds.lexis.html @@ -19,7 +19,7 @@ dsBaseClient - 6.3.4 + 6.3.5 @@ -298,11 +298,11 @@

    Examples

    -

    Site built with pkgdown 2.1.3.

    +

    Site built with pkgdown 2.2.0.

    diff --git a/docs/reference/ds.list.html b/docs/reference/ds.list.html index b6acfeb3..48facb73 100644 --- a/docs/reference/ds.list.html +++ b/docs/reference/ds.list.html @@ -17,7 +17,7 @@ dsBaseClient - 6.3.4 + 6.3.5 @@ -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 46871aa7..6e285862 100644 --- a/docs/reference/ds.listClientsideFunctions.html +++ b/docs/reference/ds.listClientsideFunctions.html @@ -17,7 +17,7 @@ dsBaseClient - 6.3.4 + 6.3.5 @@ -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 205f07cf..9fc5b9a1 100644 --- a/docs/reference/ds.listDisclosureSettings.html +++ b/docs/reference/ds.listDisclosureSettings.html @@ -17,7 +17,7 @@ dsBaseClient - 6.3.4 + 6.3.5 @@ -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 977c9afc..01f2240e 100644 --- a/docs/reference/ds.listOpals.html +++ b/docs/reference/ds.listOpals.html @@ -18,7 +18,7 @@ dsBaseClient - 6.3.4 + 6.3.5 @@ -80,11 +80,11 @@

    Author

    -

    Site built with pkgdown 2.1.3.

    +

    Site built with pkgdown 2.2.0.

    diff --git a/docs/reference/ds.listServersideFunctions.html b/docs/reference/ds.listServersideFunctions.html index 9dd4dc55..aad5a343 100644 --- a/docs/reference/ds.listServersideFunctions.html +++ b/docs/reference/ds.listServersideFunctions.html @@ -17,7 +17,7 @@ dsBaseClient - 6.3.4 + 6.3.5 @@ -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 acc1a825..7564f289 100644 --- a/docs/reference/ds.lmerSLMA.html +++ b/docs/reference/ds.lmerSLMA.html @@ -19,7 +19,7 @@ dsBaseClient - 6.3.4 + 6.3.5 @@ -328,11 +328,11 @@

    Examples

    -

    Site built with pkgdown 2.1.3.

    +

    Site built with pkgdown 2.2.0.

    diff --git a/docs/reference/ds.log.html b/docs/reference/ds.log.html index 2380a59f..4b9682dc 100644 --- a/docs/reference/ds.log.html +++ b/docs/reference/ds.log.html @@ -18,7 +18,7 @@ dsBaseClient - 6.3.4 + 6.3.5 @@ -138,11 +138,11 @@

    Examples

    -

    Site built with pkgdown 2.1.3.

    +

    Site built with pkgdown 2.2.0.

    diff --git a/docs/reference/ds.look.html b/docs/reference/ds.look.html index 398e3095..99845990 100644 --- a/docs/reference/ds.look.html +++ b/docs/reference/ds.look.html @@ -18,7 +18,7 @@ dsBaseClient - 6.3.4 + 6.3.5 @@ -147,11 +147,11 @@

    Examples

    -

    Site built with pkgdown 2.1.3.

    +

    Site built with pkgdown 2.2.0.

    diff --git a/docs/reference/ds.ls.html b/docs/reference/ds.ls.html index 6fd23b81..f1083a61 100644 --- a/docs/reference/ds.ls.html +++ b/docs/reference/ds.ls.html @@ -18,7 +18,7 @@ dsBaseClient - 6.3.4 + 6.3.5 @@ -198,11 +198,11 @@

    Examples

    -

    Site built with pkgdown 2.1.3.

    +

    Site built with pkgdown 2.2.0.

    diff --git a/docs/reference/ds.lspline.html b/docs/reference/ds.lspline.html index 4b78e6eb..224100e4 100644 --- a/docs/reference/ds.lspline.html +++ b/docs/reference/ds.lspline.html @@ -20,7 +20,7 @@ dsBaseClient - 6.3.4 + 6.3.5 @@ -116,11 +116,11 @@

    Author

    -

    Site built with pkgdown 2.1.3.

    +

    Site built with pkgdown 2.2.0.

    diff --git a/docs/reference/ds.make.html b/docs/reference/ds.make.html index fc098055..eb70c397 100644 --- a/docs/reference/ds.make.html +++ b/docs/reference/ds.make.html @@ -19,7 +19,7 @@ dsBaseClient - 6.3.4 + 6.3.5 @@ -201,11 +201,11 @@

    Examples

    -

    Site built with pkgdown 2.1.3.

    +

    Site built with pkgdown 2.2.0.

    diff --git a/docs/reference/ds.matrix.html b/docs/reference/ds.matrix.html index 6301c538..c9174403 100644 --- a/docs/reference/ds.matrix.html +++ b/docs/reference/ds.matrix.html @@ -20,7 +20,7 @@ dsBaseClient - 6.3.4 + 6.3.5 @@ -246,11 +246,11 @@

    Examples

    -

    Site built with pkgdown 2.1.3.

    +

    Site built with pkgdown 2.2.0.

    diff --git a/docs/reference/ds.matrixDet.html b/docs/reference/ds.matrixDet.html index 09e6bab9..958f7a63 100644 --- a/docs/reference/ds.matrixDet.html +++ b/docs/reference/ds.matrixDet.html @@ -20,7 +20,7 @@ dsBaseClient - 6.3.4 + 6.3.5 @@ -164,11 +164,11 @@

    Examples

    -

    Site built with pkgdown 2.1.3.

    +

    Site built with pkgdown 2.2.0.

    diff --git a/docs/reference/ds.matrixDet.report.html b/docs/reference/ds.matrixDet.report.html index 4fdbd6b1..28c8f403 100644 --- a/docs/reference/ds.matrixDet.report.html +++ b/docs/reference/ds.matrixDet.report.html @@ -18,7 +18,7 @@ dsBaseClient - 6.3.4 + 6.3.5 @@ -152,11 +152,11 @@

    Examples

    -

    Site built with pkgdown 2.1.3.

    +

    Site built with pkgdown 2.2.0.

    diff --git a/docs/reference/ds.matrixDiag.html b/docs/reference/ds.matrixDiag.html index 84200fc8..1429313a 100644 --- a/docs/reference/ds.matrixDiag.html +++ b/docs/reference/ds.matrixDiag.html @@ -19,7 +19,7 @@ dsBaseClient - 6.3.4 + 6.3.5 @@ -145,7 +145,118 @@

    Author

    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")
    +  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") 
    +  
    +  #Example 1: Create a square matrix with the server-side vector as its diagonal
    +  #and all the other values = 0
    +  
    +  # Create a vector in the server-side 
    +  
    +  ds.rUnif(samp.size = 9,
    +           min = -10.5,
    +           max = 10.5,
    +           newobj = "ss.vector.9",
    +           seed.as.integer = 5575,
    +           force.output.to.k.decimal.places = 0,
    +           datasources = connections)
    +   
    +            
    +  #Calculate the diagonal of the matrix
    +  
    +  ds.matrixDiag(x1 = "ss.vector.9",
    +                aim = "serverside.vector.2.matrix",
    +                nrows.scalar = NULL,
    +                newobj = "matrix.diag1",
    +                datasources = connections)
    +                
    +  #Example 2: Create a square matrix with the server-side scalar as all diagonal values 
    +  #and all the other values = 0
    +  
    +  #Create a scalar in the server-side
    +  
    +  ds.rUnif(samp.size = 1,
    +           min = -10.5,
    +           max = 10.5,
    +           newobj = "ss.scalar",
    +           seed.as.integer = 5575,
    +           force.output.to.k.decimal.places = 0,
    +           datasources = connections)
    +           
    +  #Calculate the diagonal of the matrix
    +           
    + ds.matrixDiag(x1 = "ss.scalar",
    +               aim = "serverside.scalar.2.matrix",
    +               nrows.scalar = 4,
    +               newobj = "matrix.diag2",
    +               datasources = connections)
    +               
    + #Example 3: Create a vector that contains the server-side matrix diagonal values
    + 
    + #Create a matrix in the server-side
    + 
    + ds.matrix(mdata = 10,
    +           from = "clientside.scalar",
    +           nrows.scalar = 3,
    +           ncols.scalar = 8,
    +           newobj = "ss.matrix",
    +           datasources = connections)
    +           
    + #Extract the diagonal of the matrix
    +     
    + ds.matrixDiag(x1 = "ss.matrix",
    +               aim = "serverside.matrix.2.vector",
    +               nrows.scalar = NULL,
    +               newobj = "vector.diag3",
    +               datasources = connections)
    +                   
    + #Example 4: Create a square matrix with the client-side vector as a diagonal
    + #and all the other values = 0
    + 
    + ds.matrixDiag(x1 = c(2,6,9,10),
    +               aim = "clientside.vector.2.matrix",
    +               nrows.scalar = NULL,
    +               newobj = "matrix.diag4",
    +               datasources = connections)
    +               
    + #Example 5: Create a square matrix with the client-side scalar as all diagonal values 
    + #and all the other values = 0
    + 
    + ds.matrixDiag(x1 = 4,
    +               aim = "clientside.scalar.2.matrix",
    +               nrows.scalar = 5,
    +               newobj = "matrix.diag5",
    +               datasources = connections)
    +  
    +  
    +  # clear the Datashield R sessions and logout
    +  datashield.logout(connections)
    +} # }
    +
    diff --git a/docs/reference/ds.matrixDimnames.html b/docs/reference/ds.matrixDimnames.html index 8cc27186..5272176a 100644 --- a/docs/reference/ds.matrixDimnames.html +++ b/docs/reference/ds.matrixDimnames.html @@ -18,7 +18,7 @@ dsBaseClient - 6.3.4 + 6.3.5 @@ -170,11 +170,11 @@

    Examples

    -

    Site built with pkgdown 2.1.3.

    +

    Site built with pkgdown 2.2.0.

    diff --git a/docs/reference/ds.matrixInvert.html b/docs/reference/ds.matrixInvert.html index 0937e4bd..4d94199a 100644 --- a/docs/reference/ds.matrixInvert.html +++ b/docs/reference/ds.matrixInvert.html @@ -17,7 +17,7 @@ dsBaseClient - 6.3.4 + 6.3.5 @@ -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 737b4cca..0f7b11da 100644 --- a/docs/reference/ds.matrixMult.html +++ b/docs/reference/ds.matrixMult.html @@ -18,7 +18,7 @@ dsBaseClient - 6.3.4 + 6.3.5 @@ -174,11 +174,11 @@

    Examples

    -

    Site built with pkgdown 2.1.3.

    +

    Site built with pkgdown 2.2.0.

    diff --git a/docs/reference/ds.matrixTranspose.html b/docs/reference/ds.matrixTranspose.html index 8e3dabe4..ff0f88cd 100644 --- a/docs/reference/ds.matrixTranspose.html +++ b/docs/reference/ds.matrixTranspose.html @@ -17,7 +17,7 @@ dsBaseClient - 6.3.4 + 6.3.5 @@ -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 00000000..77d923ad --- /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 5bac04db..0bc64806 100644 --- a/docs/reference/ds.mean.html +++ b/docs/reference/ds.mean.html @@ -18,7 +18,7 @@ dsBaseClient - 6.3.4 + 6.3.5 @@ -185,11 +185,11 @@

    Examples

    -

    Site built with pkgdown 2.1.3.

    +

    Site built with pkgdown 2.2.0.

    diff --git a/docs/reference/ds.meanByClass.html b/docs/reference/ds.meanByClass.html index 411ed733..d7a1e210 100644 --- a/docs/reference/ds.meanByClass.html +++ b/docs/reference/ds.meanByClass.html @@ -18,7 +18,7 @@ dsBaseClient - 6.3.4 + 6.3.5 @@ -169,11 +169,11 @@

    Examples

    -

    Site built with pkgdown 2.1.3.

    +

    Site built with pkgdown 2.2.0.

    diff --git a/docs/reference/ds.meanSdGp.html b/docs/reference/ds.meanSdGp.html index ffc0c2bf..e472a390 100644 --- a/docs/reference/ds.meanSdGp.html +++ b/docs/reference/ds.meanSdGp.html @@ -18,7 +18,7 @@ dsBaseClient - 6.3.4 + 6.3.5 @@ -214,11 +214,11 @@

    Examples

    -

    Site built with pkgdown 2.1.3.

    +

    Site built with pkgdown 2.2.0.

    diff --git a/docs/reference/ds.merge.html b/docs/reference/ds.merge.html index 1ad185ef..cefb07ad 100644 --- a/docs/reference/ds.merge.html +++ b/docs/reference/ds.merge.html @@ -18,7 +18,7 @@ dsBaseClient - 6.3.4 + 6.3.5 @@ -232,11 +232,11 @@

    Examples

    -

    Site built with pkgdown 2.1.3.

    +

    Site built with pkgdown 2.2.0.

    diff --git a/docs/reference/ds.message.html b/docs/reference/ds.message.html index bbbb5cd7..edbb9df4 100644 --- a/docs/reference/ds.message.html +++ b/docs/reference/ds.message.html @@ -18,7 +18,7 @@ dsBaseClient - 6.3.4 + 6.3.5 @@ -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.metadata.html b/docs/reference/ds.metadata.html index 64330a09..9a864665 100644 --- a/docs/reference/ds.metadata.html +++ b/docs/reference/ds.metadata.html @@ -18,7 +18,7 @@ dsBaseClient - 6.3.4 + 6.3.5 @@ -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.mice.html b/docs/reference/ds.mice.html index 2bc5ccc7..b92f4c72 100644 --- a/docs/reference/ds.mice.html +++ b/docs/reference/ds.mice.html @@ -25,7 +25,7 @@ dsBaseClient - 6.3.4 + 6.3.5 @@ -160,11 +160,11 @@

    Author

    -

    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 aa35230e..8f246c3b 100644 --- a/docs/reference/ds.names.html +++ b/docs/reference/ds.names.html @@ -17,7 +17,7 @@ dsBaseClient - 6.3.4 + 6.3.5 @@ -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 1a30398f..f09603f1 100644 --- a/docs/reference/ds.ns.html +++ b/docs/reference/ds.ns.html @@ -19,7 +19,7 @@ dsBaseClient - 6.3.4 + 6.3.5 @@ -129,11 +129,11 @@

    Author

    -

    Site built with pkgdown 2.1.3.

    +

    Site built with pkgdown 2.2.0.

    diff --git a/docs/reference/ds.numNA.html b/docs/reference/ds.numNA.html index 7cfea2ca..28cc8b35 100644 --- a/docs/reference/ds.numNA.html +++ b/docs/reference/ds.numNA.html @@ -18,7 +18,7 @@ dsBaseClient - 6.3.4 + 6.3.5 @@ -127,11 +127,11 @@

    Examples

    -

    Site built with pkgdown 2.1.3.

    +

    Site built with pkgdown 2.2.0.

    diff --git a/docs/reference/ds.qlspline.html b/docs/reference/ds.qlspline.html index b5039387..29e9f725 100644 --- a/docs/reference/ds.qlspline.html +++ b/docs/reference/ds.qlspline.html @@ -20,7 +20,7 @@ dsBaseClient - 6.3.4 + 6.3.5 @@ -128,11 +128,11 @@

    Author

    -

    Site built with pkgdown 2.1.3.

    +

    Site built with pkgdown 2.2.0.

    diff --git a/docs/reference/ds.quantileMean.html b/docs/reference/ds.quantileMean.html index 7f935afb..7fc50ee5 100644 --- a/docs/reference/ds.quantileMean.html +++ b/docs/reference/ds.quantileMean.html @@ -18,7 +18,7 @@ dsBaseClient - 6.3.4 + 6.3.5 @@ -146,11 +146,11 @@

    Examples

    -

    Site built with pkgdown 2.1.3.

    +

    Site built with pkgdown 2.2.0.

    diff --git a/docs/reference/ds.rBinom.html b/docs/reference/ds.rBinom.html index ea94d67c..e512c35d 100644 --- a/docs/reference/ds.rBinom.html +++ b/docs/reference/ds.rBinom.html @@ -18,7 +18,7 @@ dsBaseClient - 6.3.4 + 6.3.5 @@ -198,11 +198,11 @@

    Examples

    -

    Site built with pkgdown 2.1.3.

    +

    Site built with pkgdown 2.2.0.

    diff --git a/docs/reference/ds.rNorm.html b/docs/reference/ds.rNorm.html index bdddcf80..837a091e 100644 --- a/docs/reference/ds.rNorm.html +++ b/docs/reference/ds.rNorm.html @@ -18,7 +18,7 @@ dsBaseClient - 6.3.4 + 6.3.5 @@ -213,11 +213,11 @@

    Examples

    -

    Site built with pkgdown 2.1.3.

    +

    Site built with pkgdown 2.2.0.

    diff --git a/docs/reference/ds.rPois.html b/docs/reference/ds.rPois.html index cd46f0a0..dec9552e 100644 --- a/docs/reference/ds.rPois.html +++ b/docs/reference/ds.rPois.html @@ -19,7 +19,7 @@ dsBaseClient - 6.3.4 + 6.3.5 @@ -188,11 +188,11 @@

    Examples

    -

    Site built with pkgdown 2.1.3.

    +

    Site built with pkgdown 2.2.0.

    diff --git a/docs/reference/ds.rUnif.html b/docs/reference/ds.rUnif.html index 5823f42f..1f5e91c3 100644 --- a/docs/reference/ds.rUnif.html +++ b/docs/reference/ds.rUnif.html @@ -18,7 +18,7 @@ dsBaseClient - 6.3.4 + 6.3.5 @@ -219,11 +219,11 @@

    Examples

    -

    Site built with pkgdown 2.1.3.

    +

    Site built with pkgdown 2.2.0.

    diff --git a/docs/reference/ds.ranksSecure.html b/docs/reference/ds.ranksSecure.html index 963c254e..02253270 100644 --- a/docs/reference/ds.ranksSecure.html +++ b/docs/reference/ds.ranksSecure.html @@ -18,7 +18,7 @@ dsBaseClient - 6.3.4 + 6.3.5 @@ -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 6a117c6d..755e0e8a 100644 --- a/docs/reference/ds.rbind.html +++ b/docs/reference/ds.rbind.html @@ -18,7 +18,7 @@ dsBaseClient - 6.3.4 + 6.3.5 @@ -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.reShape.html b/docs/reference/ds.reShape.html index 069891e6..75859ac1 100644 --- a/docs/reference/ds.reShape.html +++ b/docs/reference/ds.reShape.html @@ -18,7 +18,7 @@ dsBaseClient - 6.3.4 + 6.3.5 @@ -194,11 +194,11 @@

    Examples

    -

    Site built with pkgdown 2.1.3.

    +

    Site built with pkgdown 2.2.0.

    diff --git a/docs/reference/ds.recodeLevels.html b/docs/reference/ds.recodeLevels.html index 1272061b..ca6c9f6b 100644 --- a/docs/reference/ds.recodeLevels.html +++ b/docs/reference/ds.recodeLevels.html @@ -17,7 +17,7 @@ dsBaseClient - 6.3.4 + 6.3.5 @@ -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 ef260dde..c6013d53 100644 --- a/docs/reference/ds.recodeValues.html +++ b/docs/reference/ds.recodeValues.html @@ -18,7 +18,7 @@ dsBaseClient - 6.3.4 + 6.3.5 @@ -122,7 +122,53 @@

    Author

    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")
    +  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") 
    +  
    +  # Example 1: recode the levels of D$GENDER
    +  ds.recodeValues(var.name = "D$GENDER", 
    +                  values2replace.vector = c(0,1), 
    +                  new.values.vector = c(10,20),
    +                  newobj = 'gender_recoded',
    +                  datasources = connections)
    +                  
    +  # Example 2: recode NAs in D$PM_BMI_CATEGORICAL          
    +  ds.recodeValues(var.name = "D$PM_BMI_CATEGORICAL", 
    +                  values2replace.vector = c(1,2), 
    +                  new.values.vector = c(1,2),
    +                  missing = 99, 
    +                  newobj = 'bmi_recoded',
    +                  datasources = connections)
    +                 
    +  # Clear the Datashield R sessions and logout                 
    +  datashield.logout(connections) 
    +  
    +} # }   
    +
    diff --git a/docs/reference/ds.rep.html b/docs/reference/ds.rep.html index 71db19a6..91407cb6 100644 --- a/docs/reference/ds.rep.html +++ b/docs/reference/ds.rep.html @@ -18,7 +18,7 @@ dsBaseClient - 6.3.4 + 6.3.5 @@ -206,11 +206,11 @@

    Examples

    -

    Site built with pkgdown 2.1.3.

    +

    Site built with pkgdown 2.2.0.

    diff --git a/docs/reference/ds.replaceNA.html b/docs/reference/ds.replaceNA.html index 8fe3ba9a..5ddb38a8 100644 --- a/docs/reference/ds.replaceNA.html +++ b/docs/reference/ds.replaceNA.html @@ -18,7 +18,7 @@ dsBaseClient - 6.3.4 + 6.3.5 @@ -170,11 +170,11 @@

    Examples

    -

    Site built with pkgdown 2.1.3.

    +

    Site built with pkgdown 2.2.0.

    diff --git a/docs/reference/ds.rm.html b/docs/reference/ds.rm.html index 7403ff28..aa4d2c3a 100644 --- a/docs/reference/ds.rm.html +++ b/docs/reference/ds.rm.html @@ -17,7 +17,7 @@ dsBaseClient - 6.3.4 + 6.3.5 @@ -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 bfbd7386..558173f9 100644 --- a/docs/reference/ds.rowColCalc.html +++ b/docs/reference/ds.rowColCalc.html @@ -18,7 +18,7 @@ dsBaseClient - 6.3.4 + 6.3.5 @@ -143,11 +143,11 @@

    Examples

    -

    Site built with pkgdown 2.1.3.

    +

    Site built with pkgdown 2.2.0.

    diff --git a/docs/reference/ds.sample.html b/docs/reference/ds.sample.html index bd9e1679..c685e920 100644 --- a/docs/reference/ds.sample.html +++ b/docs/reference/ds.sample.html @@ -19,7 +19,7 @@ dsBaseClient - 6.3.4 + 6.3.5 @@ -234,11 +234,11 @@

    Author

    -

    Site built with pkgdown 2.1.3.

    +

    Site built with pkgdown 2.2.0.

    diff --git a/docs/reference/ds.scatterPlot.html b/docs/reference/ds.scatterPlot.html index ae651863..4235320c 100644 --- a/docs/reference/ds.scatterPlot.html +++ b/docs/reference/ds.scatterPlot.html @@ -18,7 +18,7 @@ dsBaseClient - 6.3.4 + 6.3.5 @@ -222,11 +222,11 @@

    Examples

    -

    Site built with pkgdown 2.1.3.

    +

    Site built with pkgdown 2.2.0.

    diff --git a/docs/reference/ds.seq.html b/docs/reference/ds.seq.html index 08b34ac8..a76bf477 100644 --- a/docs/reference/ds.seq.html +++ b/docs/reference/ds.seq.html @@ -18,7 +18,7 @@ dsBaseClient - 6.3.4 + 6.3.5 @@ -213,11 +213,11 @@

    Examples

    -

    Site built with pkgdown 2.1.3.

    +

    Site built with pkgdown 2.2.0.

    diff --git a/docs/reference/ds.setDefaultOpals.html b/docs/reference/ds.setDefaultOpals.html index 3b34696d..2dc30336 100644 --- a/docs/reference/ds.setDefaultOpals.html +++ b/docs/reference/ds.setDefaultOpals.html @@ -17,7 +17,7 @@ dsBaseClient - 6.3.4 + 6.3.5 @@ -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 eac16115..fcf8633d 100644 --- a/docs/reference/ds.setSeed.html +++ b/docs/reference/ds.setSeed.html @@ -17,7 +17,7 @@ dsBaseClient - 6.3.4 + 6.3.5 @@ -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 ad9e9fa1..38222c0b 100644 --- a/docs/reference/ds.skewness.html +++ b/docs/reference/ds.skewness.html @@ -18,7 +18,7 @@ dsBaseClient - 6.3.4 + 6.3.5 @@ -154,11 +154,11 @@

    Examples

    -

    Site built with pkgdown 2.1.3.

    +

    Site built with pkgdown 2.2.0.

    diff --git a/docs/reference/ds.sqrt.html b/docs/reference/ds.sqrt.html index c0f0612e..693e97b5 100644 --- a/docs/reference/ds.sqrt.html +++ b/docs/reference/ds.sqrt.html @@ -18,7 +18,7 @@ dsBaseClient - 6.3.4 + 6.3.5 @@ -145,11 +145,11 @@

    Examples

    -

    Site built with pkgdown 2.1.3.

    +

    Site built with pkgdown 2.2.0.

    diff --git a/docs/reference/ds.subset.html b/docs/reference/ds.subset.html index ff9d08f2..0d8e25e2 100644 --- a/docs/reference/ds.subset.html +++ b/docs/reference/ds.subset.html @@ -19,7 +19,7 @@ dsBaseClient - 6.3.4 + 6.3.5 @@ -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 b401a156..25425047 100644 --- a/docs/reference/ds.subsetByClass.html +++ b/docs/reference/ds.subsetByClass.html @@ -18,7 +18,7 @@ dsBaseClient - 6.3.4 + 6.3.5 @@ -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.summary.html b/docs/reference/ds.summary.html index b0990fab..67c1d653 100644 --- a/docs/reference/ds.summary.html +++ b/docs/reference/ds.summary.html @@ -17,7 +17,7 @@ dsBaseClient - 6.3.4 + 6.3.5 @@ -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 bcd1b612..cb528a4d 100644 --- a/docs/reference/ds.table.html +++ b/docs/reference/ds.table.html @@ -18,7 +18,7 @@ dsBaseClient - 6.3.4 + 6.3.5 @@ -284,11 +284,11 @@

    Author

    -

    Site built with pkgdown 2.1.3.

    +

    Site built with pkgdown 2.2.0.

    diff --git a/docs/reference/ds.table1D.html b/docs/reference/ds.table1D.html index 354a9ef6..3e121b9d 100644 --- a/docs/reference/ds.table1D.html +++ b/docs/reference/ds.table1D.html @@ -19,7 +19,7 @@ dsBaseClient - 6.3.4 + 6.3.5 @@ -160,11 +160,11 @@

    Examples

    -

    Site built with pkgdown 2.1.3.

    +

    Site built with pkgdown 2.2.0.

    diff --git a/docs/reference/ds.table2D.html b/docs/reference/ds.table2D.html index 88dfcfd5..01da380a 100644 --- a/docs/reference/ds.table2D.html +++ b/docs/reference/ds.table2D.html @@ -18,7 +18,7 @@ dsBaseClient - 6.3.4 + 6.3.5 @@ -129,7 +129,60 @@

    Author

    Examples

    - +
    if (FALSE) { # \dontrun{
    +
    +  # load the file that contains the login details
    +  data(logindata)
    +
    +  # login and assign all the variables to R
    +  conns <- datashield.login(logins=logindata,assign=TRUE)
    +
    +  # Example 1: generate a two dimensional table, outputting combined contingency
    +  # tables - default behaviour
    +  output <- ds.table2D(x='D$DIS_DIAB', y='D$GENDER')
    +  # display the 5 results items, one at a time to avoid having too much information
    +  # displayed at the same time
    +  output$counts
    +  output$rowPercent
    +  output$colPercent
    +  output$chi2Test
    +  output$validity
    +
    +  # Example 2: generate a two dimensional table, outputting study specific contingency tables
    +  ds.table2D(x='D$DIS_DIAB', y='D$GENDER', type='split')
    +  # display the 5 results items, one at a time to avoid having too much information displayed
    +  # at the same time
    +  output$counts
    +  output$rowPercent
    +  output$colPercent
    +  output$chi2Test
    +  output$validity
    +
    +  # Example 3: generate a two dimensional table, outputting combined contingency tables
    +  # *** this example shows what happens when one or studies return an invalid table ***
    +  output <- ds.table2D(x='D$DIS_CVA', y='D$GENDER', type='combine')
    +  output$counts
    +  output$rowPercent
    +  output$colPercent
    +  output$chi2Test
    +  output$validity
    +
    +  # Example 4: same example as above but output is given for each study,
    +  # separately (i.e. type='split')
    +  # *** this example shows what happens when one or studies return an invalid table ***
    +  output <- ds.table2D(x='D$DIS_CVA', y='D$GENDER', type='split')
    +  output$counts
    +  output$rowPercent
    +  output$colPercent
    +  output$chi2Test
    +  output$validity
    +
    +  # clear the Datashield R sessions and logout
    +  datashield.logout(conns)
    +
    +} # }
    +
    +
    diff --git a/docs/reference/ds.tapply.assign.html b/docs/reference/ds.tapply.assign.html index 158d6245..0c0eb0df 100644 --- a/docs/reference/ds.tapply.assign.html +++ b/docs/reference/ds.tapply.assign.html @@ -19,7 +19,7 @@ dsBaseClient - 6.3.4 + 6.3.5 @@ -212,11 +212,11 @@

    Examples

    -

    Site built with pkgdown 2.1.3.

    +

    Site built with pkgdown 2.2.0.

    diff --git a/docs/reference/ds.tapply.html b/docs/reference/ds.tapply.html index 99f9338e..d87ec8f7 100644 --- a/docs/reference/ds.tapply.html +++ b/docs/reference/ds.tapply.html @@ -19,7 +19,7 @@ dsBaseClient - 6.3.4 + 6.3.5 @@ -203,11 +203,11 @@

    Examples

    -

    Site built with pkgdown 2.1.3.

    +

    Site built with pkgdown 2.2.0.

    diff --git a/docs/reference/ds.testObjExists.html b/docs/reference/ds.testObjExists.html index 241fcd88..03f05536 100644 --- a/docs/reference/ds.testObjExists.html +++ b/docs/reference/ds.testObjExists.html @@ -18,7 +18,7 @@ dsBaseClient - 6.3.4 + 6.3.5 @@ -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.unList.html b/docs/reference/ds.unList.html index c31ca868..67ff6e08 100644 --- a/docs/reference/ds.unList.html +++ b/docs/reference/ds.unList.html @@ -18,7 +18,7 @@ dsBaseClient - 6.3.4 + 6.3.5 @@ -149,11 +149,11 @@

    Examples

    -

    Site built with pkgdown 2.1.3.

    +

    Site built with pkgdown 2.2.0.

    diff --git a/docs/reference/ds.unique.html b/docs/reference/ds.unique.html index a887836e..6fd1077c 100644 --- a/docs/reference/ds.unique.html +++ b/docs/reference/ds.unique.html @@ -17,7 +17,7 @@ dsBaseClient - 6.3.4 + 6.3.5 @@ -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 109a1e78..6bd495c9 100644 --- a/docs/reference/ds.var.html +++ b/docs/reference/ds.var.html @@ -17,7 +17,7 @@ dsBaseClient - 6.3.4 + 6.3.5 @@ -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 385c3eca..dd8deeb0 100644 --- a/docs/reference/ds.vectorCalc.html +++ b/docs/reference/ds.vectorCalc.html @@ -18,7 +18,7 @@ dsBaseClient - 6.3.4 + 6.3.5 @@ -120,11 +120,11 @@

    Examples

    -

    Site built with pkgdown 2.1.3.

    +

    Site built with pkgdown 2.2.0.

    diff --git a/docs/reference/extract.html b/docs/reference/extract.html index ee10ef5d..23b12fac 100644 --- a/docs/reference/extract.html +++ b/docs/reference/extract.html @@ -17,7 +17,7 @@ dsBaseClient - 6.3.4 + 6.3.5 @@ -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 5f25fe1c..3047a8e0 100644 --- a/docs/reference/getPooledMean.html +++ b/docs/reference/getPooledMean.html @@ -17,7 +17,7 @@ dsBaseClient - 6.3.4 + 6.3.5 @@ -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 b1136e23..109330ed 100644 --- a/docs/reference/getPooledVar.html +++ b/docs/reference/getPooledVar.html @@ -17,7 +17,7 @@ dsBaseClient - 6.3.4 + 6.3.5 @@ -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 f2ea4435..8405d69c 100644 --- a/docs/reference/glmChecks.html +++ b/docs/reference/glmChecks.html @@ -18,7 +18,7 @@ dsBaseClient - 6.3.4 + 6.3.5 @@ -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 66ffc059..02009eb5 100644 --- a/docs/reference/index.html +++ b/docs/reference/index.html @@ -17,7 +17,7 @@ dsBaseClient - 6.3.4 + 6.3.5 @@ -42,10 +42,6 @@

    All functions

    -

    computeWeightedMeans()

    - -

    Compute Weighted Mean by Group

    -

    ds.Boole()

    Converts a server-side R object into Boolean indicators

    @@ -353,6 +349,10 @@

    All functions ds.matrixTranspose()

    Transposes a server-side matrix

    + +

    ds.mdPattern()

    + +

    Display missing data patterns with disclosure control

    ds.mean()

    @@ -538,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 8044eb8b..98ec0d4f 100644 --- a/docs/reference/isAssigned.html +++ b/docs/reference/isAssigned.html @@ -17,7 +17,7 @@ dsBaseClient - 6.3.4 + 6.3.5 @@ -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 f2cbb94b..9621e062 100644 --- a/docs/reference/isDefined.html +++ b/docs/reference/isDefined.html @@ -17,7 +17,7 @@ dsBaseClient - 6.3.4 + 6.3.5 @@ -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 34f4853f..4be60989 100644 --- a/docs/reference/logical2int.html +++ b/docs/reference/logical2int.html @@ -17,7 +17,7 @@ dsBaseClient - 6.3.4 + 6.3.5 @@ -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 98dd1e0e..377d13fc 100644 --- a/docs/reference/meanByClassHelper0a.html +++ b/docs/reference/meanByClassHelper0a.html @@ -17,7 +17,7 @@ dsBaseClient - 6.3.4 + 6.3.5 @@ -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 4e4fb247..024a5b4b 100644 --- a/docs/reference/meanByClassHelper0b.html +++ b/docs/reference/meanByClassHelper0b.html @@ -17,7 +17,7 @@ dsBaseClient - 6.3.4 + 6.3.5 @@ -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 9df03a52..ed31d1ba 100644 --- a/docs/reference/meanByClassHelper1.html +++ b/docs/reference/meanByClassHelper1.html @@ -17,7 +17,7 @@ dsBaseClient - 6.3.4 + 6.3.5 @@ -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 5466cbed..f5801dd0 100644 --- a/docs/reference/meanByClassHelper2.html +++ b/docs/reference/meanByClassHelper2.html @@ -17,7 +17,7 @@ dsBaseClient - 6.3.4 + 6.3.5 @@ -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 d3bcf8f1..8a4e29cd 100644 --- a/docs/reference/meanByClassHelper3.html +++ b/docs/reference/meanByClassHelper3.html @@ -17,7 +17,7 @@ dsBaseClient - 6.3.4 + 6.3.5 @@ -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 2b8f40b7..428c2064 100644 --- a/docs/reference/meanByClassHelper4.html +++ b/docs/reference/meanByClassHelper4.html @@ -17,7 +17,7 @@ dsBaseClient - 6.3.4 + 6.3.5 @@ -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 df968529..b89cc746 100644 --- a/docs/reference/rowPercent.html +++ b/docs/reference/rowPercent.html @@ -17,7 +17,7 @@ dsBaseClient - 6.3.4 + 6.3.5 @@ -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 0a94aa1b..e2080ac6 100644 --- a/docs/reference/subsetHelper.html +++ b/docs/reference/subsetHelper.html @@ -17,7 +17,7 @@ dsBaseClient - 6.3.4 + 6.3.5 @@ -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 39df9eef..fe21f864 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 @@ -84,6 +85,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.3.4.tar.gz b/dsBase_6.3.5-permissive.tar.gz similarity index 57% rename from dsBase_6.3.4.tar.gz rename to dsBase_6.3.5-permissive.tar.gz index c7725adf..3703315d 100644 Binary files a/dsBase_6.3.4.tar.gz and b/dsBase_6.3.5-permissive.tar.gz differ diff --git a/dsBase_6.3.4-permissive.tar.gz b/dsBase_6.3.5.tar.gz similarity index 51% rename from dsBase_6.3.4-permissive.tar.gz rename to dsBase_6.3.5.tar.gz index c7c2f2b2..0ea538d0 100644 Binary files a/dsBase_6.3.4-permissive.tar.gz and b/dsBase_6.3.5.tar.gz differ diff --git a/man/computeWeightedMeans.Rd b/man/computeWeightedMeans.Rd index 0b8b0879..c1f9bfc1 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 00000000..baabf3e9 --- /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 c412df38..24125632 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.boxPlot.Rd b/man/ds.boxPlot.Rd index 0e8e7a33..99319925 100644 --- a/man/ds.boxPlot.Rd +++ b/man/ds.boxPlot.Rd @@ -46,7 +46,7 @@ of grouping using categorical variables on the dataset (only for data frames) ## Version 6, for version 5 see the Wiki ### Please ensure you have a training Virtual Machine running, - or that you have a live connection to a server. + # or that you have a live connection to a server. # Connecting to the Opal servers @@ -73,37 +73,37 @@ of grouping using categorical variables on the dataset (only for data frames) symbol = "D") ## Create a boxplot of one variable - ds.boxPlot("D", "LAB_HDL", datasources = connections) + ds.boxPlot("D", "LAB_HDL", datasources = connections) ## Create a boxplot that is split by study: - ds.boxPlot("D", "LAB_HDL", type= "split", datasources = connections) + ds.boxPlot("D", "LAB_HDL", type= "split", datasources = connections) ## Create a boxplot of two variables variable - ds.boxPlot("D", c("LAB_HDL", "LAB_TRIG", type="pooled", - datasources = connections) + ds.boxPlot("D", c("LAB_HDL", "LAB_TRIG"), type="pooled", + datasources = connections) # only one plot is created (of the aggregated results of all servers) ## Create a boxplot of two variables, which are split by a factor - ds.boxPlot("D", c("LAB_HDL", "LAB_TRIG"), group = "GENDER", + ds.boxPlot("D", c("LAB_HDL", "LAB_TRIG"), group = "GENDER", datasources = connections) ## Create a boxplot with x- and y-axis labels - ds.boxPlot("D", c("LAB_HDL", "LAB_TRIG"), group = "GENDER", + ds.boxPlot("D", c("LAB_HDL", "LAB_TRIG"), group = "GENDER", xlabel = "Variable", ylabel = "Measurement", datasources = connections) ## Improve the presentation of ds.boxplot output using ggplot: ### User must save the output, which is in a ggplot format already: - a <- ds.boxPlot("D", c("LAB_HDL", "LAB_TRIG"), group = "GENDER", + a <- ds.boxPlot("D", c("LAB_HDL", "LAB_TRIG"), group = "GENDER", xlabel = "Variable", ylabel = "Measurement", datasources = connections) ### Then customise output "a" using ggplot tools: a + ggplot2::scale_fill_discrete(name = "Gender", labels = c("Male", "Female")) ### Or use an alternative way, to maintain the aesthetics: - a + ggplot2::scale_fill_brewer(name = "Gender", labels = c("Male", "Female")) + a + ggplot2::scale_fill_brewer(name = "Gender", labels = c("Male", "Female")) # Clear the Datashield R sessions and logout - datashield.logout(connections) + datashield.logout(connections) } diff --git a/man/ds.colnames.Rd b/man/ds.colnames.Rd index e7391081..9460a567 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.densityGrid.Rd b/man/ds.densityGrid.Rd index 89cc4348..0e2c5b78 100644 --- a/man/ds.densityGrid.Rd +++ b/man/ds.densityGrid.Rd @@ -88,11 +88,11 @@ Server function called: \code{densityGridDS} # Example2: generate a grid density object for each study separately ds.densityGrid(x="D$LAB_TSC", y="D$LAB_HDL", - type="split" + type="split", datasources = connections[1])#only the first Opal server is used ("study1") # Example3: generate a grid density object where the number of intervals is set to 15, for - each study separately + # each study separately ds.densityGrid(x="D$LAB_TSC", y="D$LAB_HDL", type="split", diff --git a/man/ds.forestplot.Rd b/man/ds.forestplot.Rd index 408dc2d3..66606601 100644 --- a/man/ds.forestplot.Rd +++ b/man/ds.forestplot.Rd @@ -19,6 +19,9 @@ 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 forestplot of the coefficients for Study-Level Meta-Analysis performed with DataSHIELD diff --git a/man/ds.heatmapPlot.Rd b/man/ds.heatmapPlot.Rd index 3ab17da9..dfd89d3c 100644 --- a/man/ds.heatmapPlot.Rd +++ b/man/ds.heatmapPlot.Rd @@ -163,7 +163,7 @@ Server function called: \code{heatmapPlotDS} datasources = connections[1]) #only the first server is used (study1) # Example 3: Plot a combined heat map plot using the method 'deterministic' centroids of each - k = 7 nearest neighbours for numints = 40 + # k = 7 nearest neighbours for numints = 40 ds.heatmapPlot(x = 'D$LAB_TSC', y = 'D$LAB_HDL', numints = 40, diff --git a/man/ds.histogram.Rd b/man/ds.histogram.Rd index 17de73da..d8173574 100644 --- a/man/ds.histogram.Rd +++ b/man/ds.histogram.Rd @@ -148,7 +148,7 @@ Server function called: \code{histogramDS2} datasources = connections) #all studies are used # Example 2: generate a combined histogram with the default small cells counts - suppression rule + # suppression rule ds.histogram(x = 'D$PM_BMI_CONTINUOUS', method = 'smallCellsRule', type = 'combine', diff --git a/man/ds.matrixDiag.Rd b/man/ds.matrixDiag.Rd index 268e5148..b58a0e62 100644 --- a/man/ds.matrixDiag.Rd +++ b/man/ds.matrixDiag.Rd @@ -136,7 +136,7 @@ Server function called: \code{matrixDiagDS} datasources = connections) #Example 2: Create a square matrix with the server-side scalar as all diagonal values - and all the other values = 0 + #and all the other values = 0 #Create a scalar in the server-side @@ -176,7 +176,7 @@ Server function called: \code{matrixDiagDS} datasources = connections) #Example 4: Create a square matrix with the client-side vector as a diagonal - and all the other values = 0 + #and all the other values = 0 ds.matrixDiag(x1 = c(2,6,9,10), aim = "clientside.vector.2.matrix", @@ -185,7 +185,7 @@ Server function called: \code{matrixDiagDS} datasources = connections) #Example 5: Create a square matrix with the client-side scalar as all diagonal values - and all the other values = 0 + #and all the other values = 0 ds.matrixDiag(x1 = 4, aim = "clientside.scalar.2.matrix", diff --git a/man/ds.mdPattern.Rd b/man/ds.mdPattern.Rd new file mode 100644 index 00000000..b1bacc0b --- /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.recodeValues.Rd b/man/ds.recodeValues.Rd index 6b775bc9..8c8a75d8 100644 --- a/man/ds.recodeValues.Rd +++ b/man/ds.recodeValues.Rd @@ -97,7 +97,7 @@ Server function called: \code{recodeValuesDS} values2replace.vector = c(1,2), new.values.vector = c(1,2), missing = 99, - newobj = 'bmi_recoded' + newobj = 'bmi_recoded', datasources = connections) # Clear the Datashield R sessions and logout diff --git a/man/ds.table2D.Rd b/man/ds.table2D.Rd index 3d0e2a2c..57982f3c 100644 --- a/man/ds.table2D.Rd +++ b/man/ds.table2D.Rd @@ -77,7 +77,7 @@ identify the cell(s) that had the small counts which render the table invalid. # Example 2: generate a two dimensional table, outputting study specific contingency tables ds.table2D(x='D$DIS_DIAB', y='D$GENDER', type='split') # display the 5 results items, one at a time to avoid having too much information displayed - at the same time + # at the same time output$counts output$rowPercent output$colPercent diff --git a/opal_azure-pipelines.yml b/opal_azure-pipelines.yml index 6c6103d4..6122fb03 100644 --- a/opal_azure-pipelines.yml +++ b/opal_azure-pipelines.yml @@ -58,10 +58,10 @@ schedules: - master always: true - cron: "0 2 * * *" - displayName: Nightly build - v6.3.4-dev + displayName: Nightly build - v6.3.5-dev branches: include: - - v6.3.4-dev + - v6.3.5-dev always: true ######################################################################################### @@ -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 = 'v6.3.4-dev'); 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 diff --git a/tests/docker/armadillo/standard/config/application.yml b/tests/docker/armadillo/standard/config/application.yml index 12b78ec8..54e90c36 100644 --- a/tests/docker/armadillo/standard/config/application.yml +++ b/tests/docker/armadillo/standard/config/application.yml @@ -14,17 +14,11 @@ armadillo: # oidc-admin-user: user@yourdomain.org profiles: - name: default - image: datashield/rock-omicron-karma:devel + image: datashield/rock-quebrada-lamda-permissive:latest port: 8085 host: default 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 3e6bbe15..389ee66c 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/data_files/dataBootstrapUnitTests.R b/tests/testthat/data_files/dataBootstrapUnitTests.R deleted file mode 100644 index 4c51af16..00000000 --- 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/perf_files/armadillo_azure-pipeline.csv b/tests/testthat/perf_files/armadillo_azure-pipeline.csv index 186e1d58..ca8a229c 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.1661","0.5","2" +"ds.abs::perf::0","6.247","0.5","2" +"ds.asInteger::perf:0","5.691","0.5","2" +"ds.asList::perf:0","12.50","0.5","2" +"ds.asNumeric::perf:0","5.723","0.5","2" +"ds.assign::perf::0","10.52","0.5","2" +"ds.class::perf::combine:0","13.73","0.5","2" +"ds.colnames::perf:0","25.64","0.5","2" +"ds.exists::perf::combine:0","25.73","0.5","2" +"ds.length::perf::combine:0","25.44","0.5","2" +"ds.mean::perf::combine:0","25.70","0.5","2" +"ds.mean::perf::split:0","25.72","0.5","2" +"void::perf::void::0","53016.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 6c6a3f33..9ac69853 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.06225260028207","0.5","2" -"ds.abs::perf::0","2.602332538044","0.5","2" -"ds.asInteger::perf:0","2.16574645464856","0.5","2" -"ds.asList::perf:0","5.125787987349","0.5","2" -"ds.asNumeric::perf:0","2.02140793909654","0.5","2" -"ds.assign::perf::0","4.25379741119624","0.5","2" -"ds.class::perf::combine:0","5.03264832363257","0.5","2" -"ds.colnames::perf:0","3.61308626946146","0.5","2" -"ds.exists::perf::combine:0","8.47538336211864","0.5","2" -"ds.length::perf::combine:0","9.49818979827918","0.5","2" -"ds.mean::perf::combine:0","9.66558925664494","0.5","2" -"ds.mean::perf::split:0","8.6304479562724","0.5","2" -"void::perf::void::0","19351.7615914652","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 cff24236..ca8a229c 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.1661","0.5","2" +"ds.abs::perf::0","6.247","0.5","2" +"ds.asInteger::perf:0","5.691","0.5","2" +"ds.asList::perf:0","12.50","0.5","2" +"ds.asNumeric::perf:0","5.723","0.5","2" +"ds.assign::perf::0","10.52","0.5","2" +"ds.class::perf::combine:0","13.73","0.5","2" +"ds.colnames::perf:0","25.64","0.5","2" +"ds.exists::perf::combine:0","25.73","0.5","2" +"ds.length::perf::combine:0","25.44","0.5","2" +"ds.mean::perf::combine:0","25.70","0.5","2" +"ds.mean::perf::split:0","25.72","0.5","2" +"void::perf::void::0","53016.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 cff24236..58614204 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","9.079","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_tests/perf_rate.R b/tests/testthat/perf_tests/perf_rate.R index 0384bf63..64b638db 100644 --- a/tests/testthat/perf_tests/perf_rate.R +++ b/tests/testthat/perf_tests/perf_rate.R @@ -8,7 +8,8 @@ # along with this program. If not, see . #------------------------------------------------------------------------------- -.perf.reference.filename <- 'perf_files/default_perf_profile.csv' +.perf.reference.filename <- 'perf_files/default_perf_profile.csv' +.perf.reference.save.filename <- NULL .perf.reference <- NULL @@ -22,7 +23,13 @@ perf.reference.save <- function(perf.ref.name, rate, tolerance.lower, tolerance. .perf.reference[nrow(.perf.reference)+1,] <- c(perf.ref.name, rate, tolerance.lower, tolerance.upper) - write.csv(.perf.reference, .perf.reference.filename, row.names = FALSE) + if (is.null(.perf.reference.save.filename)) + { + .perf.reference.save.filename <<- base::tempfile(pattern = "perf_file_", fileext = ".csv") + message(paste0("Additional perf record added to '", .perf.reference.save.filename, "'")) + } + + write.csv(.perf.reference, .perf.reference.save.filename, row.names = FALSE) .perf.reference <<- .perf.reference } diff --git a/tests/testthat/setup.R b/tests/testthat/setup.R index 4c55c6e7..512e649c 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 710dac81..5026a0db 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 952425f5..7b5af1f4 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 fdfc4502..d8fb3bed 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 a007ec6a..8d7d3544 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.asDataMatrix.R b/tests/testthat/test-arg-ds.asDataMatrix.R index e84e2281..ca65f6cb 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 bfc4662d..a264b040 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 a6a1196e..c6305012 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 c498d36c..92640188 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 64912059..39056cc3 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 5c7c8ebd..4a199dd0 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 b821c842..27626075 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 9c1cdac0..4fbd06c4 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 7c42585f..ade35211 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 3371d591..7a85cecb 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 d600ac83..a5198813 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 1baffe40..91a0fe24 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 c7240c7b..c0bf5c7d 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 bbbaa5e9..39ce9b87 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 a1385638..8bb99733 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 9f728e1a..47b5a5ab 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 ac80a40c..76adc6f1 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 0958c65a..29330c9d 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 9d76b7be..33fa65cf 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 0e71d2e5..2eb77e4f 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 65a1c2cf..52061313 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 4bd414e6..53ec07e3 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 8ee68198..27b4e8bd 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 7e920395..8ae2070d 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 d3a6d1ef..c851bba3 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 05cbde70..19f959f2 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 7a4ec473..c24f41ef 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 0724e206..fbf1a880 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 579fa5b5..52c70b5c 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 ce4dbe73..4180f91a 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 84662f7f..36c80bb5 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 27c9bffc..433857a7 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 65d843cc..37fbf21a 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 db80a078..0d8118e1 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 87d5f3b3..06ce3a7a 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 6f94c4ec..cf6bf974 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 681598e0..52d1657d 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 ffbcb749..b2bc229d 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 bd229260..d5f6510d 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 d2510c08..b51cdf7d 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 f1d7e695..705660be 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 f4405ee7..bf24b112 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,7 +25,7 @@ test_that("setup", { # Tests # -context("ds.ls::arg") +# context("ds.ls::arg") test_that("containing escape sequence", { res1 <- ds.ls(search.filter="_:A:_Environment") @@ -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 d4a4a6e0..170b6f11 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,7 +19,7 @@ connect.studies.dataset.cnsim(list("LAB_TSC")) # Tests # -context("ds.make::arg::test 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 2201a4f4..c6cf9089 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 37d633fa..c598d81b 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 6bb0bc6c..d76b9239 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 e022d23c..0dc152ff 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 02a1f33b..c6da0934 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 3718d6d0..dfed18dd 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 1ab87349..95564e0d 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 ff94f60f..d78c6904 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 b28fdcbd..96ef958b 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 b829e05b..c4de0a22 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 bacc7241..bac7b2c4 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 5f6ccf38..4bb0bb8b 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 960e9811..ea55ca13 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 6c05ee0a..b31209f9 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 4c2c21d3..a90c9c16 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 1c7fb10a..f8c04910 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 b63c944a..56fb58f5 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 62d1af6d..be436303 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 697b2898..c7ff7650 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 2f94db2c..4d158762 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 e031196a..8d4100bd 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 0f3cb82c..d4ec8075 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 047064f9..707ca381 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 bfe839e6..be046e8e 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 18778cca..fc6b99e1 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 e25b36a1..3a4ed9f2 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 f38f9ab7..ed8e8102 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 597b6e9c..88b4b36e 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 a5b747dc..74a2da50 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 0ac3a0df..f9c2ec6b 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 b768a93f..acd8c7b7 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 ee4f5e3f..bb674bca 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 9fc14230..76b8604b 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 0d14e79f..f84f4c3e 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 7ba77b7b..3d047e7e 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 44127581..1bf41b5c 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 cc1751a6..6a9440cc 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.subset.R b/tests/testthat/test-arg-ds.subset.R index a314d490..65a96c81 100644 --- a/tests/testthat/test-arg-ds.subset.R +++ b/tests/testthat/test-arg-ds.subset.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_DIAB","PM_BMI_CONTINUOUS","LAB_HDL", "GE # Tests # -context("ds.subset::arg::test errors") +# 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.subsetByClass.R b/tests/testthat/test-arg-ds.subsetByClass.R index 5aca7abf..9645b195 100644 --- a/tests/testthat/test-arg-ds.subsetByClass.R +++ b/tests/testthat/test-arg-ds.subsetByClass.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.subsetByClass::arg::test errors") +# 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) diff --git a/tests/testthat/test-arg-ds.summary.R b/tests/testthat/test-arg-ds.summary.R index 5a2aa982..e3d38656 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 b18ff949..094cf97c 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 b0bf5e6d..56c17dd4 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 35fa39db..e7b0623e 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 243de56e..5ac42edf 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 787628d1..14ea8389 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 c2f65781..bf01cc77 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 bddb5e06..2d3aa487 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 bd619015..a0e112a5 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 71c2d89e..8ececd0d 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 7a572365..4c331b86 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 2789755f..41a53637 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 8fc7deff..d86eddd1 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 3c61c9cb..842a5d40 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 7296f51b..afdfc821 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 bb6c06a2..5254897b 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 73421dba..f3a9e75c 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 d1db51fe..927e1cab 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 bc8c12bc..0d28eff5 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 5cc2332d..f89d4364 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 eb61ada6..88da21bb 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 751d54bf..2807a7b1 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 6f00f119..95d0c60b 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 f1b690c9..cb8311d7 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 2b6147f8..b1e7cedb 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 08cc01c7..ce74288a 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 f8211694..b51a75f9 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 08a445b9..39d6a506 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 80a5dc3d..29591402 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 da4a0caa..e4bfb577 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 a829185e..b1b3b79c 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 fe153c0e..fedde156 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 027c5d8e..e85a55bd 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 c43d0c80..155313cb 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 fb2099a7..95af08e9 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 05325f54..5690859f 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 c7c4a43d..8f57c17d 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 19e2318a..f8bc70d7 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 997e3fad..153d84e0 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 58b0667a..b0176ced 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 f2fd5e47..7327f366 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 28d3c030..b8036207 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 65f68eb6..ec759b69 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 9f4ab0ca..39551aa1 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 71580510..1bd6aa93 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 feeb56c9..4828cc8e 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 0991669f..863112a4 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 5045b06a..a74ba73a 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 351859c2..f32371b6 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 index 6b99c7c8..6da2146d 100644 --- a/tests/testthat/test-discctrl-ds.subset.R +++ b/tests/testthat/test-discctrl-ds.subset.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.subset::discctrl::setup") +# context("ds.subset::discctrl::setup") connect.studies.dataset.cnsim(list("DIS_DIAB","PM_BMI_CONTINUOUS","LAB_HDL", "GENDER")) @@ -24,7 +24,7 @@ test_that("setup", { # # Tests # -context("ds.subset::discctrl") +# 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) @@ -39,7 +39,7 @@ test_that("simple subset", { # Done # -context("ds.subset::discctrl::shutdown") +# context("ds.subset::discctrl::shutdown") test_that("shutdown", { ds_expect_variables(c("D")) @@ -47,4 +47,4 @@ test_that("shutdown", { disconnect.studies.dataset.cnsim() -context("ds.subset::discctrl::done") +# context("ds.subset::discctrl::done") diff --git a/tests/testthat/test-discctrl-ds.subsetByClass.R b/tests/testthat/test-discctrl-ds.subsetByClass.R index 414efb4d..a767cd54 100644 --- a/tests/testthat/test-discctrl-ds.subsetByClass.R +++ b/tests/testthat/test-discctrl-ds.subsetByClass.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.subsetByClass::discctrl::setup") +# context("ds.subsetByClass::discctrl::setup") connect.studies.dataset.cnsim(list("LAB_TSC", "GENDER")) @@ -23,7 +24,7 @@ test_that("setup", { # # Tests # -context("ds.subsetByClass::discctrl") +# 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) @@ -42,7 +43,7 @@ test_that("simple subsetByClass", { # Done # -context("ds.subsetByClass::discctrl::shutdown") +# context("ds.subsetByClass::discctrl::shutdown") test_that("shutdown", { ds_expect_variables(c("D")) @@ -50,4 +51,4 @@ test_that("shutdown", { disconnect.studies.dataset.cnsim() -context("ds.subsetByClass::discctrl::done") +# context("ds.subsetByClass::discctrl::done") diff --git a/tests/testthat/test-expt-ds.dataFrame.R b/tests/testthat/test-expt-ds.dataFrame.R index 0ec01ef2..3660038c 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 0ce25e86..8c6fe40b 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 271381c6..703a589d 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 8c6d6b44..782a4acb 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 853d31af..4e8f243b 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 d43bdce8..268ac3a1 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 e8a19fd4..e4764f32 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 16ca0853..b7f26c9e 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 7f4f065a..522c28ca 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 2b5005d0..1bcf320c 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 5e2b808a..41716ac9 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 845d3fa0..f026843c 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 4a35f9b2..4f6bf659 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 23844fdf..1834fca0 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 251170e7..9ff0bca2 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 222d41bd..278403ec 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 601e6a50..4c2a1559 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 47a7270d..e281c5d6 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 def587df..cb44c2fa 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 4a5de5d9..2823af00 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 4aa6f803..b920cfff 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 123314a9..7ca2da88 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 f34df1ea..b5e45239 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 4f221c64..db0bd51e 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 e7d68279..21d16647 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 39ac712b..c9a8e176 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 d6c8ab21..d743de0b 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 c1d1d9b5..3c8caf0e 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 fb56fb43..5a1ba273 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 72753d62..aa8d3d78 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 4590bbe4..5f95ea24 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 af09ede6..fa850fb8 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 c9c084e4..1e4ad232 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 b11e5999..c5034a71 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 133a93e1..666188ef 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 f482d54b..569fbdd9 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 a8385bfb..19c56ebc 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 59ec5438..12570b9c 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 e810f118..934aba3e 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 83a0af2b..d8f830c1 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 37532ba4..b0769bfd 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 68efb105..c6a827df 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 0d972006..4ad25a02 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 7d029fb3..906c1cdd 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 fb721374..a0419eff 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 302412ba..59b72dcc 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 76cedb04..297f87e4 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 58d85b33..b7c9bd76 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 cc262a1e..02275893 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 2ad3b717..c0c30233 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 d369bedf..85ff10d8 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 31b053eb..4e5f6791 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", @@ -141,7 +141,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) @@ -152,7 +152,7 @@ test_that("check results", { # Done # -context("ds.listClientsideFunctions::smk::shutdown") +# context("ds.listClientsideFunctions::smk::shutdown") test_that("shutdown", { ds_expect_variables(c("D")) @@ -160,4 +160,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 e1b13695..2d8e3484 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 4e098b12..0e3221fb 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 c552a65f..7d352a9c 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 cd18e6f1..c857408d 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 c8167430..f4a65683 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 1a9afe3d..91dd745a 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 9529babd..08d45470 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 57565fbe..cadb0470 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 c9295bd9..d4836760 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 3cf8f8b5..74626cbc 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 5854fbde..20850a5a 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 14bc8bab..2a9b30d7 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 f39a0479..6ac87d2f 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 b0ab7f41..8cd89a41 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 76ddb9af..001e36ef 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 234fbb38..fa1920a7 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 be89553c..5b2d7360 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 a9d1ef7c..2c5aba86 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 45da49e3..14561fd0 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 521483eb..fb58dcf5 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 ec967587..bc357263 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 a3f5329a..5acbb2ad 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 802cf866..71c0464a 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 97f3fef9..e73b7b57 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 a1f66c79..d925aa1e 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 ed332d7a..0c71e93f 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 2c55b0d5..e8b89701 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 59c5479d..1438fb77 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 000f4183..65746693 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 9996db9a..cc63c1c0 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 38ebe55c..68e74802 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 3682a0c3..f8fa681b 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 890ac263..43720c1f 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 20cc910c..af01b50e 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 5b96a861..2836d20b 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 cdc3d787..3b813074 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 187ec63d..a20d4db4 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 1a42fdbc..7d86a826 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 c65cba69..e3819cc7 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 9aad07fe..04bdfdf4 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 75be387a..f13b1dcf 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 002d763d..792bfb5e 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 8a251e3b..797caefa 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 f44c7e46..7da50458 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 eadf7fe1..fadeaae9 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 e607b9a9..d6f7eaec 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 9c106c73..ccb50c0c 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 index 4accdfe5..88fecdd2 100644 --- a/tests/testthat/test-smk-ds.subset.R +++ b/tests/testthat/test-smk-ds.subset.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.subset::smk::setup") +# context("ds.subset::smk::setup") connect.studies.dataset.cnsim(list("DIS_DIAB","PM_BMI_CONTINUOUS","LAB_HDL", "GENDER")) @@ -24,7 +25,7 @@ test_that("setup", { # 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") +# 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", { @@ -34,7 +35,7 @@ test_that("subD_exists", { 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") +# 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", { @@ -44,7 +45,7 @@ test_that("subD2_exists", { expect_true(res$sim3) }) -context("ds.subset::smk::generate a subset of the table D with bmi values greater than or equal to 25.") +# 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", { @@ -80,7 +81,7 @@ test_that("subD3_exists", { # Tear down # -context("ds.subset::smk::shutdown") +# context("ds.subset::smk::shutdown") test_that("shutdown", { ds_expect_variables(c("D", "subD", "subD2", "subD3")) @@ -88,4 +89,4 @@ test_that("shutdown", { disconnect.studies.dataset.cnsim() -context("ds.subset::smk::done") +# context("ds.subset::smk::done") diff --git a/tests/testthat/test-smk-ds.subsetByClass.R b/tests/testthat/test-smk-ds.subsetByClass.R index 95bf16eb..71420fcb 100644 --- a/tests/testthat/test-smk-ds.subsetByClass.R +++ b/tests/testthat/test-smk-ds.subsetByClass.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.subsetByClass::smk::setup") +# context("ds.subsetByClass::smk::setup") connect.studies.dataset.cnsim(list("LAB_TSC", "GENDER")) @@ -24,7 +25,7 @@ test_that("setup", { # Tests # -context("ds.subsetByClass::smk") +# context("ds.subsetByClass::smk") test_that("gender implicit", { res <- ds.subsetByClass(x='D', subsets='subclasses1') @@ -67,7 +68,7 @@ test_that("gender explicit", { # Tear down # -context("ds.subsetByClass::smk::shutdown") +# context("ds.subsetByClass::smk::shutdown") test_that("shutdown", { ds_expect_variables(c("D", "subclasses1", "subclasses2")) @@ -75,4 +76,4 @@ test_that("shutdown", { disconnect.studies.dataset.cnsim() -context("ds.subsetByClass::smk::done") +# context("ds.subsetByClass::smk::done") diff --git a/tests/testthat/test-smk-ds.summary.R b/tests/testthat/test-smk-ds.summary.R index fd39b021..750c0392 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 bae8aae4..0dd48cef 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 013cdf32..a875f592 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 09fc859c..596ae508 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 b79876ff..67aad82c 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 ba13f39d..8fd4918d 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 a7d89a3e..5163217f 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 5b2b2c38..857fe823 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 98fbaa98..806b1331 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 9aca375c..21f6f5f0 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 bc2aceb6..834ece23 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 e318c747..3c03191f 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 5f37b0aa..ab3f43b0 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 index d6b35ff6..72b28ccd 100644 --- a/tests/testthat/test-smk_bug-ds.listOpals.R +++ b/tests/testthat/test-smk_bug-ds.listOpals.R @@ -1,6 +1,7 @@ #------------------------------------------------------------------------------- # 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. @@ -19,7 +20,7 @@ connect.studies.dataset.cnsim(list("LAB_TSC", "LAB_HDL")) # Tests # -context("ds.listOpals::smk::check results") +# 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" diff --git a/tests/testthat/test-smk_dgr-ds.asCharacter.R b/tests/testthat/test-smk_dgr-ds.asCharacter.R index 7f9e7c45..48a2fbd1 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 52807e3b..64399ac1 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 27d2e297..9ed96227 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 84027672..180278c9 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 c6cc808b..2172c27f 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 a7f79821..a7bf7880 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 3d1d22fa..c2682730 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 0061df2c..edb86cd2 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")