CRAN Package Check Results for Package AssayCorrector

Last updated on 2020-01-17 05:47:06 CET.

Flavor Version Tinstall Tcheck Ttotal Status Flags
r-devel-linux-x86_64-debian-clang 2.0.0 3.12 28.35 31.47 ERROR
r-devel-linux-x86_64-debian-gcc 2.0.0 2.92 33.21 36.13 OK
r-devel-linux-x86_64-fedora-clang 2.0.0 57.92 OK
r-devel-linux-x86_64-fedora-gcc 2.0.0 55.57 OK
r-devel-windows-ix86+x86_64 2.0.0 24.00 73.00 97.00 OK
r-devel-windows-ix86+x86_64-gcc8 2.0.0 17.00 53.00 70.00 OK
r-patched-linux-x86_64 2.0.0 2.94 39.10 42.04 OK
r-patched-solaris-x86 2.0.0 72.60 OK
r-release-linux-x86_64 2.0.0 2.57 39.21 41.78 OK
r-release-windows-ix86+x86_64 2.0.0 11.00 84.00 95.00 OK
r-release-osx-x86_64 2.0.0 OK
r-oldrel-windows-ix86+x86_64 2.0.0 10.00 70.00 80.00 OK
r-oldrel-osx-x86_64 2.0.0 OK

Check Details

Version: 2.0.0
Check: examples
Result: ERROR
    Running examples in 'AssayCorrector-Ex.R' failed
    The error most likely occurred in:
    
    > base::assign(".ptime", proc.time(), pos = "CheckExEnv")
    > ### Name: correct_bias
    > ### Title: Correct the bias present in the assay, previously detected by
    > ### the 'detect_bias()' method
    > ### Aliases: correct_bias
    >
    > ### ** Examples
    >
    > assay<-create_assay(m)
    > detected<-detect_bias(assay)
     ----------- FAILURE REPORT --------------
     --- failure: the condition has length > 1 ---
     --- srcref ---
    :
     --- package (from environment) ---
    AssayCorrector
     --- call from context ---
    detect_bias(assay)
     --- call from argument ---
    if (class(m.E[[ac(model)]][, , k]) == "try-error") stop("PMP encountered a problem")
     --- R stacktrace ---
    where 1: detect_bias(assay)
    
     --- value of length: 2 type: logical ---
    [1] FALSE FALSE
     --- function from context ---
    function (assay, alpha = 0.01, type = "P", test = "AD")
    {
     if (class(assay) != "assay")
     stop("Error: This is not an assay.")
     ac = as.character
     m = assay$m
     ctrl = assay$ctrl
     biasType = assay$biasType
     biasModel = assay$biasModel
     biasConf = assay$biasConf
     PMPmapping = c(1, 4, 5, 3, 2, 6)
     m.E <- new.env()
     for (model in 1:6) {
     m.E[[ac(model)]] = ctrl
     }
     dimensions = dim(m)
     Depth = dimensions[3]
     .test.f = NULL
     if (test == "KS")
     .test.f = function(x, y) ks.test(x, y)$p.value
     else if (test == "AD")
     .test.f = function(x, y) as.numeric(tail(strsplit(capture.output(kSamples::ad.test(x,
     y))[17], " ")[[1]], 1))
     else if (test == "CVM")
     .test.f = function(x, y) RVAideMemoire::CvM.test(x, y)$p.value
     else {
     stop("Error: This is not a valid test. Please use KS, AD or CVM")
     }
     if (type == "AP")
     m = .assay(m, ctrl, alpha)
     for (k in 1:Depth) {
     for (model in 1:6) {
     m.E[[ac(model)]][, , k] = try(.PMP(m[, , k], ctrl[,
     , k], PMPmapping[model], alpha))
     if (class(m.E[[ac(model)]][, , k]) == "try-error")
     stop("PMP encountered a problem")
     }
     mww = (m.E[[ac(1)]][, , k] != m[, , k]) * 1
     assay$biasPositions[, , k] = mww
     biased.E = new.env()
     unbiased = list()
     for (i in 1:dimensions[1]) {
     for (j in 1:dimensions[2]) {
     if (mww[i, j] & !ctrl[i, j, k]) {
     for (model in 1:6) {
     biased.E[[ac(model)]] = c(biased.E[[ac(model)]],
     m.E[[ac(model)]][i, j, k])
     }
     }
     else if (!mww[i, j] & !ctrl[i, j, k])
     unbiased = c(unbiased, m.E[[ac(model)]][i,
     j, k])
     }
     }
     for (model in 1:6) {
     biased.E[[ac(model)]] = unlist(biased.E[[ac(model)]])
     }
     unbiased = unlist(unbiased)
     if (Reduce(function(x, y) length(biased.E[[ac(y)]]) *
     x, 1:6, 1) == 0) {
     biasType[k] = "C"
     next
     }
     pvalue.E = new.env()
     for (model in 1:6) {
     pvalue.E[[ac(model)]] = .test.f(biased.E[[ac(model)]],
     unbiased)
     }
     aMethods = 1:3
     mMethods = 4:6
     p = function(model) pvalue.E[[ac(model)]]
     if (all(sapply(aMethods, p) < alpha) & any(sapply(mMethods,
     p) > alpha)) {
     biasType[k] = "M"
     biasModel[k] = 3 + which.max(sapply(mMethods, p))
     biasConf[k] = sum(sapply(mMethods, p) > alpha)
     }
     else if (all(sapply(mMethods, p) < alpha) & any(sapply(aMethods,
     p) > alpha)) {
     biasType[k] = "A"
     biasModel[k] = which.max(sapply(aMethods, p))
     biasConf[k] = sum(sapply(aMethods, p) > alpha)
     }
     else if (all(sapply(mMethods, p) < alpha) & all(sapply(aMethods,
     p) < alpha)) {
     biasType[k] = "U"
     }
     else if (all(sapply(mMethods, p) > alpha) & all(sapply(aMethods,
     p) > alpha)) {
     biasModel[k] = which.max(sapply(c(aMethods, mMethods),
     p))
     biasConf[k] = sum(sapply(c(aMethods, mMethods), p) >
     alpha)
     biasType[k] = ifelse(biasModel[k] %in% aMethods,
     "A", "M")
     }
     else {
     biasType[k] = "U"
     }
     }
     assay$biasType = biasType
     assay$biasModel = biasModel
     assay$biasConf = biasConf
     return(assay)
    }
    <bytecode: 0x335c1a0>
    <environment: namespace:AssayCorrector>
     --- function search by body ---
    Function detect_bias in namespace AssayCorrector has this body.
     ----------- END OF FAILURE REPORT --------------
    Error in if (class(m.E[[ac(model)]][, , k]) == "try-error") stop("PMP encountered a problem") :
     the condition has length > 1
    Calls: detect_bias
    Execution halted
Flavor: r-devel-linux-x86_64-debian-clang