diff --git a/.Rbuildignore b/.Rbuildignore index b66ab898..d62ee9e9 100644 --- a/.Rbuildignore +++ b/.Rbuildignore @@ -17,8 +17,8 @@ ^R/secure.global.ranking.md$ ^_pkgdown\.yml$ ^docs$ -^dsBase_6.3.5.tar.gz$ -^dsBase_6.3.5-permissive.tar.gz$ +^dsBase_6.3.6.tar.gz$ +^dsBase_6.3.6-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 index 17e13f1d..93c12871 100644 --- a/.github/workflows/dsBaseClient_test_suite.yaml +++ b/.github/workflows/dsBaseClient_test_suite.yaml @@ -138,7 +138,7 @@ jobs: - 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 + curl -u admin:admin -H 'Content-Type: multipart/form-data' -F "file=@dsBase_6.3.6-permissive.tar.gz" -X POST http://localhost:8080/install-package sleep 60 docker restart dsbaseclient-armadillo-1 sleep 30 diff --git a/DESCRIPTION b/DESCRIPTION index 6876d043..ff5813ed 100644 --- a/DESCRIPTION +++ b/DESCRIPTION @@ -59,7 +59,7 @@ Authors@R: c(person(given = "Paul", comment = c(ORCID = "0009-0003-2419-1964"))) License: GPL-3 Depends: - R (>= 4.0.0), + R (>= 4.1.0), DSI (>= 1.7.1) Imports: fields, @@ -70,6 +70,7 @@ Imports: data.table, methods, dplyr, + purrr, assertthat, cli Suggests: @@ -83,6 +84,6 @@ Suggests: DSOpal, DSMolgenisArmadillo, DSLite -RoxygenNote: 7.3.3 Encoding: UTF-8 Language: en-GB +Config/roxygen2/version: 8.0.0 diff --git a/R/ds.glm.R b/R/ds.glm.R index 8b1dbceb..09c4453f 100644 --- a/R/ds.glm.R +++ b/R/ds.glm.R @@ -565,7 +565,8 @@ ds.glm <- function(formula=NULL, data=NULL, family=NULL, offset=NULL, weights=NU # Sum participants only during first iteration. nsubs.total<-Reduce(f="+", .select(study.summary, 'numsubs')) # Save family - f <- study.summary[[1]]$family + family.value <- study.summary[[1]]$family + f <- if (is.list(family.value) && "family" %in% names(family.value)) family.value$family else family.value } #Create variance covariance matrix as inverse of information matrix @@ -640,7 +641,7 @@ ds.glm <- function(formula=NULL, data=NULL, family=NULL, offset=NULL, weights=NU beta.vect.final<-beta.vect.next scale.par <- 1 - if(f$family== 'gaussian') { + if(f == 'gaussian') { scale.par <- dev.total / (nsubs.total-length(beta.vect.next)) } diff --git a/armadillo_azure-pipelines.yml b/armadillo_azure-pipelines.yml index 4a26a02d..4721bc81 100644 --- a/armadillo_azure-pipelines.yml +++ b/armadillo_azure-pipelines.yml @@ -59,10 +59,10 @@ schedules: - master always: true - cron: "0 2 * * *" - displayName: Nightly build - v6.3.5-dev + displayName: Nightly build - v6.3.6-dev branches: include: - - v6.3.5-dev + - v6.3.6-dev always: true ######################################################################################### @@ -133,7 +133,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 libudunits2-dev -y + sudo apt-get install -qq libharfbuzz-dev libfribidi-dev libmagick++-dev libudunits2-dev libuv1-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')" @@ -236,7 +236,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.5-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.6-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 bfddaa03..bc3a8dd6 100644 --- a/azure-pipelines.yml +++ b/azure-pipelines.yml @@ -45,10 +45,10 @@ schedules: - master always: true - cron: "0 2 * * *" - displayName: Nightly build - v6.3.5-dev + displayName: Nightly build - v6.3.6-dev branches: include: - - v6.3.5-dev + - v6.3.6-dev always: true ######################################################################################### @@ -114,7 +114,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 libudunits2-dev -y + sudo apt-get install -qq libharfbuzz-dev libfribidi-dev libmagick++-dev libudunits2-dev libuv1-dev -y sudo R -q -e "install.packages(c('curl','httr'), dependencies=TRUE, repos='https://cloud.r-project.org')" sudo R -q -e "install.packages(c('devtools','covr'), dependencies=TRUE, repos='https://cloud.r-project.org')" sudo R -q -e "install.packages(c('fields','meta','metafor','ggplot2','gridExtra','data.table'), dependencies=TRUE, repos='https://cloud.r-project.org')" @@ -217,7 +217,7 @@ jobs: - bash: | R -q -e "library(opalr); opal <- opal.login(username = 'administrator', password = 'datashield_test&', url = 'http://localhost:8080'); opal.put(opal, 'system', 'conf', 'general', '_rPackage'); opal.logout(opal)" - R -q -e "library(opalr); opal <- opal.login('administrator','datashield_test&', url='http://localhost:8080/'); dsadmin.install_github_package(opal, 'dsBase', username = 'datashield', ref = 'v6.3.5-dev'); opal.logout(opal)" + R -q -e "library(opalr); opal <- opal.login('administrator','datashield_test&', url='http://localhost:8080/'); dsadmin.install_github_package(opal, 'dsBase', username = 'datashield', ref = 'v6.3.6-dev'); opal.logout(opal)" sleep 60 diff --git a/dsBase_6.3.5-permissive.tar.gz b/dsBase_6.3.6-permissive.tar.gz similarity index 53% rename from dsBase_6.3.5-permissive.tar.gz rename to dsBase_6.3.6-permissive.tar.gz index 3703315d..f0f502fb 100644 Binary files a/dsBase_6.3.5-permissive.tar.gz and b/dsBase_6.3.6-permissive.tar.gz differ diff --git a/dsBase_6.3.5.tar.gz b/dsBase_6.3.6.tar.gz similarity index 51% rename from dsBase_6.3.5.tar.gz rename to dsBase_6.3.6.tar.gz index 0ea538d0..606eb77a 100644 Binary files a/dsBase_6.3.5.tar.gz and b/dsBase_6.3.6.tar.gz differ diff --git a/opal_azure-pipelines.yml b/opal_azure-pipelines.yml index bfddaa03..bc3a8dd6 100644 --- a/opal_azure-pipelines.yml +++ b/opal_azure-pipelines.yml @@ -45,10 +45,10 @@ schedules: - master always: true - cron: "0 2 * * *" - displayName: Nightly build - v6.3.5-dev + displayName: Nightly build - v6.3.6-dev branches: include: - - v6.3.5-dev + - v6.3.6-dev always: true ######################################################################################### @@ -114,7 +114,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 libudunits2-dev -y + sudo apt-get install -qq libharfbuzz-dev libfribidi-dev libmagick++-dev libudunits2-dev libuv1-dev -y sudo R -q -e "install.packages(c('curl','httr'), dependencies=TRUE, repos='https://cloud.r-project.org')" sudo R -q -e "install.packages(c('devtools','covr'), dependencies=TRUE, repos='https://cloud.r-project.org')" sudo R -q -e "install.packages(c('fields','meta','metafor','ggplot2','gridExtra','data.table'), dependencies=TRUE, repos='https://cloud.r-project.org')" @@ -217,7 +217,7 @@ jobs: - bash: | R -q -e "library(opalr); opal <- opal.login(username = 'administrator', password = 'datashield_test&', url = 'http://localhost:8080'); opal.put(opal, 'system', 'conf', 'general', '_rPackage'); opal.logout(opal)" - R -q -e "library(opalr); opal <- opal.login('administrator','datashield_test&', url='http://localhost:8080/'); dsadmin.install_github_package(opal, 'dsBase', username = 'datashield', ref = 'v6.3.5-dev'); opal.logout(opal)" + R -q -e "library(opalr); opal <- opal.login('administrator','datashield_test&', url='http://localhost:8080/'); dsadmin.install_github_package(opal, 'dsBase', username = 'datashield', ref = 'v6.3.6-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 243160a3..cb735d81 100644 --- a/tests/docker/armadillo/standard/config/application.yml +++ b/tests/docker/armadillo/standard/config/application.yml @@ -67,8 +67,13 @@ stdout.log.path: '/logs/armadillo.log' logging: level: - root: INFO + root: "warn" ## change to DEBUG to have more details, typically when developing - org.molgenis: INFO + org.molgenis: "warn" ## Don't log upload data - org.apache.coyote.http11.Http11InputBuffer: INFO + org.apache.coyote.http11.Http11InputBuffer: "warn" + ## SpringFramework + org.springframework.boot: "warn" + org.springframework.web: "warn" + org.springframework.core: "warn" + org.springframework.codex: "warn" diff --git a/tests/testthat/connection_to_datasets/init_studies_datasets.R b/tests/testthat/connection_to_datasets/init_studies_datasets.R index 2bc95718..b34ed00d 100644 --- a/tests/testthat/connection_to_datasets/init_studies_datasets.R +++ b/tests/testthat/connection_to_datasets/init_studies_datasets.R @@ -221,6 +221,62 @@ init.studies.dataset.gamlss <- function(variables) } } +init.studies.dataset.stand <- function(variables) +{ + if (ds.test_env$secure_login_details) + { + if (ds.test_env$driver == "OpalDriver") + { + builder <- DSI::newDSLoginBuilder(.silent = TRUE) + builder$append(server = "sim1", url = ds.test_env$ip_address_1, user = ds.test_env$user_1, password = ds.test_env$password_1, table = "STANDARDISE.std_1", options=ds.test_env$options_1) + builder$append(server = "sim2", url = ds.test_env$ip_address_2, user = ds.test_env$user_2, password = ds.test_env$password_2, table = "STANDARDISE.std_1", options=ds.test_env$options_2) + builder$append(server = "sim3", url = ds.test_env$ip_address_3, user = ds.test_env$user_3, password = ds.test_env$password_3, table = "STANDARDISE.std_1", options=ds.test_env$options_3) + ds.test_env$login.data <- builder$build() + } + else if (ds.test_env$driver == "ArmadilloDriver") + { + builder <- DSI::newDSLoginBuilder(.silent = TRUE) + builder$append(server = "sim1", url = ds.test_env$ip_address_1, user = ds.test_env$user_1, password = ds.test_env$password_1, table = "datashield/standardise/std_1", driver = ds.test_env$driver) + builder$append(server = "sim2", url = ds.test_env$ip_address_2, user = ds.test_env$user_2, password = ds.test_env$password_2, table = "datashield/standardise/std_2", driver = ds.test_env$driver) + builder$append(server = "sim3", url = ds.test_env$ip_address_3, user = ds.test_env$user_3, password = ds.test_env$password_3, table = "datashield/standardise/std_3", driver = ds.test_env$driver) + ds.test_env$login.data <- builder$build() + } + else + { + ds.test_env$login.data <- DSLite::setupCNSIMTest("dsBase", env = ds.test_env) + } + ds.test_env$stats.var <- variables + } +} + +init.studies.dataset.stand_disclosure <- function(variables) +{ + if (ds.test_env$secure_login_details) + { + if (ds.test_env$driver == "OpalDriver") + { + builder <- DSI::newDSLoginBuilder(.silent = TRUE) + builder$append(server = "sim1", url = ds.test_env$ip_address_1, user = ds.test_env$user_1, password = ds.test_env$password_1, table = "STANDARDISE.std_1_d", options=ds.test_env$options_1) + builder$append(server = "sim2", url = ds.test_env$ip_address_2, user = ds.test_env$user_2, password = ds.test_env$password_2, table = "STANDARDISE.std_2_d", options=ds.test_env$options_2) + builder$append(server = "sim3", url = ds.test_env$ip_address_3, user = ds.test_env$user_3, password = ds.test_env$password_3, table = "STANDARDISE.std_3_d", options=ds.test_env$options_3) + ds.test_env$login.data <- builder$build() + } + else if (ds.test_env$driver == "ArmadilloDriver") + { + builder <- DSI::newDSLoginBuilder(.silent = TRUE) + builder$append(server = "sim1", url = ds.test_env$ip_address_1, user = ds.test_env$user_1, password = ds.test_env$password_1, table = "datashield/standardise/std_1_d", driver = ds.test_env$driver) + builder$append(server = "sim2", url = ds.test_env$ip_address_2, user = ds.test_env$user_2, password = ds.test_env$password_2, table = "datashield/standardise/std_2_d", driver = ds.test_env$driver) + builder$append(server = "sim3", url = ds.test_env$ip_address_3, user = ds.test_env$user_3, password = ds.test_env$password_3, table = "datashield/standardise/std_3_d", driver = ds.test_env$driver) + ds.test_env$login.data <- builder$build() + } + else + { + ds.test_env$login.data <- DSLite::setupCNSIMTest("dsBase", env = ds.test_env) + } + ds.test_env$stats.var <- variables + } +} + init.studies.dataset.stand <- function(variables) { @@ -390,3 +446,8 @@ disconnect.studies.dataset.stand <- function() { log.out.data.server() } + +disconnect.studies.dataset.stand_disclosure <- function() +{ + log.out.data.server() +} \ No newline at end of file diff --git a/tests/testthat/data_files/obiba_opal-upload_testing_datasets.R b/tests/testthat/data_files/obiba_opal-upload_testing_datasets.R index 52b66e31..b14f2aa6 100644 --- a/tests/testthat/data_files/obiba_opal-upload_testing_datasets.R +++ b/tests/testthat/data_files/obiba_opal-upload_testing_datasets.R @@ -72,4 +72,12 @@ upload_testing_dataset_table(opal, 'TESTING', 'DATASET1', 'TESTING/DATASET1.rda' upload_testing_dataset_table(opal, 'TESTING', 'DATASET2', 'TESTING/DATASET2.rda') upload_testing_dataset_table(opal, 'TESTING', 'DATASET3', 'TESTING/DATASET3.rda') +upload_testing_dataset_table(opal, 'STANDARDISE', 'std_1', 'STANDARDISE/std_1.rda') +upload_testing_dataset_table(opal, 'STANDARDISE', 'std_2', 'STANDARDISE/std_2.rda') +upload_testing_dataset_table(opal, 'STANDARDISE', 'std_3', 'STANDARDISE/std_3.rda') + +upload_testing_dataset_table(opal, 'STANDARDISE', 'std_1_d', 'STANDARDISE/std_1_d.rda') +upload_testing_dataset_table(opal, 'STANDARDISE', 'std_2_d', 'STANDARDISE/std_2_d.rda') +upload_testing_dataset_table(opal, 'STANDARDISE', 'std_3_d', 'STANDARDISE/std_3_d.rda') + opal.logout(opal) diff --git a/tests/testthat/perf_files/armadillo_hp-laptop-quay_perf-profile.csv b/tests/testthat/perf_files/armadillo_hp-laptop-quay_perf-profile.csv index 010650f1..ebfd605c 100644 --- a/tests/testthat/perf_files/armadillo_hp-laptop-quay_perf-profile.csv +++ b/tests/testthat/perf_files/armadillo_hp-laptop-quay_perf-profile.csv @@ -1,14 +1,14 @@ "refer_name","rate","lower_tolerance","upper_tolerance" -"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","8.566","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" +"conndisconn::perf::simple0","0.06790","0.5","2" +"ds.abs::perf::0","1.998","0.5","2" +"ds.asInteger::perf:0","2.111","0.5","2" +"ds.asList::perf:0","4.550","0.5","2" +"ds.asNumeric::perf:0","1.879","0.5","2" +"ds.assign::perf::0","4.806","0.5","2" +"ds.class::perf::combine:0","3.865","0.5","2" +"ds.colnames::perf:0","9.577","0.5","2" +"ds.exists::perf::combine:0","8.411","0.5","2" +"ds.length::perf::combine:0","7.957","0.5","2" +"ds.mean::perf::combine:0","9.049","0.5","2" +"ds.mean::perf::split:0","9.429","0.5","2" +"void::perf::void::0","21400.0","0.5","2" diff --git a/tests/testthat/test-smk-ds.elspline.R b/tests/testthat/test-smk-ds.elspline.R index aa8d3d78..0086c787 100644 --- a/tests/testthat/test-smk-ds.elspline.R +++ b/tests/testthat/test-smk-ds.elspline.R @@ -56,7 +56,7 @@ test_that("elspline", { expect_equal(res.mod$errorMessage[3], "No errors") expect_equal(res.mod$nsubs, 7477) expect_equal(res.mod$iter, 3) - expect_true("family" %in% class(res.mod$family)) + expect_true("character" %in% class(res.mod$family)) expect_equal(res.mod$formula, "D$LAB_TRIG ~ elsplineDS") expect_true("matrix" %in% class(res.mod$coefficients)) expect_true("array" %in% class(res.mod$coefficients)) @@ -106,7 +106,7 @@ test_that("elspline", { expect_equal(res.mod$errorMessage[3], "No errors") expect_equal(res.mod$nsubs, 7477) expect_equal(res.mod$iter, 3) - expect_true("family" %in% class(res.mod$family)) + expect_true("character" %in% class(res.mod$family)) expect_equal(res.mod$formula, "D$LAB_TRIG ~ elsplineDS2") expect_true("matrix" %in% class(res.mod$coefficients)) expect_true("array" %in% class(res.mod$coefficients)) diff --git a/tests/testthat/test-smk-ds.glm-binomial.R b/tests/testthat/test-smk-ds.glm-binomial.R index 666188ef..1f0ba068 100644 --- a/tests/testthat/test-smk-ds.glm-binomial.R +++ b/tests/testthat/test-smk-ds.glm-binomial.R @@ -43,7 +43,7 @@ test_that("glm_binomial", { expect_equal(res$errorMessage[3], "No errors") expect_equal(res$nsubs, 7485) expect_equal(res$iter, 9) - expect_true("family" %in% class(res$family)) + expect_true("character" %in% class(res$family)) expect_equal(res$formula, "D$DIS_DIAB ~ D$GENDER * D$PM_BMI_CONTINUOUS + D$LAB_HDL") expect_true("matrix" %in% class(res$coefficients)) expect_equal(res$dev, 1036.031, tolerance=0.00001) @@ -69,7 +69,7 @@ test_that("glm_binomial, with check", { expect_equal(res$errorMessage[3], "No errors") expect_equal(res$nsubs, 7485) expect_equal(res$iter, 9) - expect_true("family" %in% class(res$family)) + expect_true("character" %in% class(res$family)) expect_equal(res$formula, "D$DIS_DIAB ~ D$GENDER * D$PM_BMI_CONTINUOUS + D$LAB_HDL") expect_true("matrix" %in% class(res$coefficients)) expect_equal(res$dev, 1036.031, tolerance=0.00001) diff --git a/tests/testthat/test-smk-ds.glm-gaussian.R b/tests/testthat/test-smk-ds.glm-gaussian.R index 569fbdd9..27d3f025 100644 --- a/tests/testthat/test-smk-ds.glm-gaussian.R +++ b/tests/testthat/test-smk-ds.glm-gaussian.R @@ -43,7 +43,7 @@ test_that("glm_gaussian", { expect_equal(res$errorMessage[3], "No errors") expect_equal(res$nsubs, 7800) expect_equal(res$iter, 3) - expect_true("family" %in% class(res$family)) + expect_true("character" %in% class(res$family)) expect_equal(res$formula, "D$LAB_TSC ~ D$LAB_TRIG") expect_true("matrix" %in% class(res$coefficients)) expect_equal(res$dev, 8936.32, tolerance=0.00001) @@ -69,7 +69,7 @@ test_that("glm_gaussian, with check", { expect_equal(res$errorMessage[3], "No errors") expect_equal(res$nsubs, 7800) expect_equal(res$iter, 3) - expect_true("family" %in% class(res$family)) + expect_true("character" %in% class(res$family)) expect_equal(res$formula, "D$LAB_TSC ~ D$LAB_TRIG") expect_true("matrix" %in% class(res$coefficients)) expect_equal(res$dev, 8936.32, tolerance=0.00001) diff --git a/tests/testthat/test-smk-ds.glm-poisson.R b/tests/testthat/test-smk-ds.glm-poisson.R index 19c56ebc..62077942 100644 --- a/tests/testthat/test-smk-ds.glm-poisson.R +++ b/tests/testthat/test-smk-ds.glm-poisson.R @@ -43,7 +43,7 @@ test_that("glm_gaussian", { expect_equal(res$errorMessage[3], "No errors") expect_equal(res$nsubs, 6299) expect_equal(res$iter, 5) - expect_true("family" %in% class(res$family)) + expect_true("character" %in% class(res$family)) expect_equal(res$formula, "D$survtime ~ 1 + D$time.id + D$female") expect_true("matrix" %in% class(res$coefficients)) expect_equal(res$dev, 3522.598, tolerance=0.00001) @@ -69,7 +69,7 @@ test_that("glm_gaussian, which check", { expect_equal(res$errorMessage[3], "No errors") expect_equal(res$nsubs, 6299) expect_equal(res$iter, 5) - expect_true("family" %in% class(res$family)) + expect_true("character" %in% class(res$family)) expect_equal(res$formula, "D$survtime ~ 1 + D$time.id + D$female") expect_true("matrix" %in% class(res$coefficients)) expect_equal(res$dev, 3522.598, tolerance=0.00001) diff --git a/tests/testthat/test-smk-ds.lspline.R b/tests/testthat/test-smk-ds.lspline.R index 08d45470..9e86eaf7 100644 --- a/tests/testthat/test-smk-ds.lspline.R +++ b/tests/testthat/test-smk-ds.lspline.R @@ -56,7 +56,7 @@ test_that("lspline", { expect_equal(res.mod$errorMessage[3], "No errors") expect_equal(res.mod$nsubs, 7477) expect_equal(res.mod$iter, 3) - expect_true("family" %in% class(res.mod$family)) + expect_true("character" %in% class(res.mod$family)) expect_equal(res.mod$formula, "D$LAB_TRIG ~ lsplineDS") expect_true("matrix" %in% class(res.mod$coefficients)) expect_true("array" %in% class(res.mod$coefficients)) diff --git a/tests/testthat/test-smk-ds.ns.R b/tests/testthat/test-smk-ds.ns.R index d925aa1e..19d73dd2 100644 --- a/tests/testthat/test-smk-ds.ns.R +++ b/tests/testthat/test-smk-ds.ns.R @@ -60,7 +60,7 @@ test_that("ns", { expect_equal(res.mod$errorMessage[3], "No errors") expect_equal(res.mod$nsubs, 7477) expect_equal(res.mod$iter, 3) - expect_true("family" %in% class(res.mod$family)) + expect_true("character" %in% class(res.mod$family)) expect_equal(res.mod$formula, "D$LAB_TRIG ~ nsDS") expect_true("matrix" %in% class(res.mod$coefficients)) expect_true("array" %in% class(res.mod$coefficients)) diff --git a/tests/testthat/test-smk-ds.qlspline.R b/tests/testthat/test-smk-ds.qlspline.R index e8b89701..89ee316c 100644 --- a/tests/testthat/test-smk-ds.qlspline.R +++ b/tests/testthat/test-smk-ds.qlspline.R @@ -56,7 +56,7 @@ test_that("qlspline", { expect_equal(res.mod$errorMessage[3], "No errors") expect_equal(res.mod$nsubs, 7477) expect_equal(res.mod$iter, 3) - expect_true("family" %in% class(res.mod$family)) + expect_true("character" %in% class(res.mod$family)) expect_equal(res.mod$formula, "D$LAB_TRIG ~ qlsplineDS") expect_true("matrix" %in% class(res.mod$coefficients)) expect_true("array" %in% class(res.mod$coefficients)) @@ -108,7 +108,7 @@ test_that("qlspline", { expect_equal(res.mod$errorMessage[3], "No errors") expect_equal(res.mod$nsubs, 7477) expect_equal(res.mod$iter, 3) - expect_true("family" %in% class(res.mod$family)) + expect_true("character" %in% class(res.mod$family)) expect_equal(res.mod$formula, "D$LAB_TRIG ~ qlsplineDS2") expect_true("matrix" %in% class(res.mod$coefficients)) expect_true("array" %in% class(res.mod$coefficients))