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: 0x1474f18>
<environment: namespace:varhandle>
 --- function search by body ---
Function pin.na in namespace varhandle has this body.
 ----------- END OF FAILURE REPORT -------------- 
Fatal error: the condition has length > 1