Skip to content

Commit

Permalink
Move all tests files in the testthat folder
Browse files Browse the repository at this point in the history
  • Loading branch information
aursiber committed Sep 19, 2024
1 parent 3a4f32b commit 92726ec
Show file tree
Hide file tree
Showing 18 changed files with 482 additions and 602 deletions.
72 changes: 0 additions & 72 deletions tests/examplewithanchoringdata.R

This file was deleted.

32 changes: 0 additions & 32 deletions tests/testscaling.R

This file was deleted.

126 changes: 0 additions & 126 deletions tests/testsensitivityplot.R

This file was deleted.

Original file line number Diff line number Diff line change
@@ -1,10 +1,7 @@
# Test DRomics on datasets with NA values
# possible especially for apical data
library(DRomics)
visualize <- FALSE # put to TRUE for a manual check of plots

if (visualize)
{
context("examplewithNAvalues")
test_that("Test DRomics on datasets with NA values, possible especially for apical data", {
skip_on_cran()

########### Example on apical data ################
###################################################
data(Scenedesmus_apical)
Expand Down Expand Up @@ -32,7 +29,7 @@ if (visualize)
r$res
(b <- bmdboot(r))
b$res

(f.AIC <- drcfit(s, information.criterion = "AIC"))
(f.BIC <- drcfit(s, information.criterion = "BIC"))

Expand Down Expand Up @@ -72,18 +69,18 @@ if (visualize)
plot(o1)
(o2 <- continuousomicdata(Scenedesmus_metab2, check = FALSE))
plot(o2)

(s1 <- itemselect(o1, select.method = "quadratic"))
(s2 <- itemselect(o2, select.method = "quadratic"))

(f1 <- drcfit(s1))
plot(f1, items = "NAP_24")
(f2 <- drcfit(s2))
plot(f2, items = "NAP_24")

f1$fitres[1:3, ]
f2$fitres[1:3, ]

(f2.AIC <- drcfit(s2, information.criterion = "AIC"))
(f2.BIC <- drcfit(s2, information.criterion = "BIC"))

Expand All @@ -107,18 +104,18 @@ if (visualize)
Scenedesmus_metab3[23, 21] <- NA
(o3 <- continuousomicdata(Scenedesmus_metab3))
plot(o3)

(s3 <- itemselect(o3, select.method = "quadratic"))

(f3 <- drcfit(s3))
plot(f3, items = "NAP_24")
plot(f1, items = "NAP_24")

f3$fitres[1:5, ]
f1$fitres[1:5, ]

(r3 <- bmdcalc(f3))

(b3 <- bmdboot(r3, niter = 100))
b3$res[1:5, ]
b1$res[1:5, ]
Expand All @@ -131,4 +128,4 @@ if (visualize)
try(RNAseqdata(Zhou))

try(microarraydata(Zhou))
}
})
Loading

0 comments on commit 92726ec

Please sign in to comment.