CRAN Package Check Results for Package varhandle

Last updated on 2019-12-10 16:48:08 CET.

Flavor Version Tinstall Tcheck Ttotal Status Flags
r-devel-linux-x86_64-debian-clang 2.0.4 2.08 20.22 22.30 ERROR
r-devel-linux-x86_64-debian-gcc 2.0.4 2.01 15.84 17.85 OK
r-devel-linux-x86_64-fedora-clang 2.0.4 28.70 OK
r-devel-linux-x86_64-fedora-gcc 2.0.4 26.54 OK
r-devel-windows-ix86+x86_64 2.0.4 5.00 45.00 50.00 OK
r-devel-windows-ix86+x86_64-gcc8 2.0.4 8.00 33.00 41.00 OK
r-patched-linux-x86_64 2.0.4 1.99 18.57 20.56 OK
r-patched-solaris-x86 2.0.4 37.90 OK
r-release-linux-x86_64 2.0.4 1.81 18.50 20.31 OK
r-release-windows-ix86+x86_64 2.0.4 6.00 39.00 45.00 OK
r-release-osx-x86_64 2.0.4 OK
r-oldrel-windows-ix86+x86_64 2.0.4 2.00 28.00 30.00 OK
r-oldrel-osx-x86_64 2.0.4 OK

Check Details

Version: 2.0.4
Check: examples
Result: ERROR
    Running examples in 'varhandle-Ex.R' failed
    The error most likely occurred in:
    
    > base::assign(".ptime", proc.time(), pos = "CheckExEnv")
    > ### Name: pin.na
    > ### Title: Pinpoint NAs in a vector, matrix or data.frame
    > ### Aliases: pin.na
    > ### Keywords: NA missing locate pinpoint
    >
    > ### ** Examples
    >
    > ## generate some variables
    > # create a vector
    > var1 <- 1:30
    > # add NA at random places
    > var1[runif(7, 1, 30)] <- NA
    > # pinpoint NAs
    > pin.na(var1)
    [1] 6 8 11 17 27 28
    >
    > # create a matrix
    > var2 <- matrix(runif(100, 10, 99), nrow = 10)
    > # add NA at random places
    > var2[runif(9, 1, 100)] <- NA
    > # pinpoint NAs
    > pin.na(var2)
     ----------- FAILURE REPORT --------------
     --- failure: the condition has length > 1 ---
     --- srcref ---
    :
     --- package (from environment) ---
    varhandle
     --- call from context ---
    pin.na(var2)
     --- call from argument ---
    if (class(x) == "factor") {
     x <- as.character(x)
    }
     --- R stacktrace ---
    where 1: pin.na(var2)
    
     --- value of length: 2 type: logical ---
    [1] FALSE FALSE
     --- function from context ---
    function (x = NULL, na.value = NA)
    {
     {
     if (is.null(x)) {
     stop("Please provide parameter \"x\". It can be a matrix, data.frame or vector.")
     }
     }
     {
     if (class(x) == "factor") {
     x <- as.character(x)
     }
     }
     {
     missingness_index <- c()
     for (i in na.value) {
     if (is.na(i)) {
     missingness_index <- c(missingness_index, which(is.na(x)))
     }
     else {
     missingness_index <- c(missingness_index, which(x ==
     i))
     }
     }
     if (class(x) %in% c("data.frame", "matrix")) {
     if (length(missingness_index) != 0) {
     clmn <- (missingness_index%/%dim(x)[1]) + 1
     rw <- missingness_index%%dim(x)[1]
     clmn[rw == 0] <- clmn[rw == 0] - 1
     rw[rw == 0] <- dim(x)[1]
     output <- data.frame(row_index = rw, column_index = clmn)
     }
     else {
     output <- NULL
     }
     }
     else if (class(x) %in% c("numeric", "integer", "character")) {
     if (length(missingness_index) != 0) {
     output <- missingness_index
     }
     else {
     output <- NULL
     }
     }
     else {
     stop("Please provide the d which can be a matrix, data.frame or vector.")
     }
     return(output)
     }
    }
    <bytecode: 0x3312e60>
    <environment: namespace:varhandle>
     --- function search by body ---
    Function pin.na in namespace varhandle has this body.
     ----------- END OF FAILURE REPORT --------------
    Error in if (class(x) == "factor") { : the condition has length > 1
    Calls: pin.na
    Execution halted
Flavor: r-devel-linux-x86_64-debian-clang