Running examples in ‘imagefluency-Ex.R’ failed
The error most likely occurred in:

> base::assign(".ptime", proc.time(), pos = "CheckExEnv")
> ### Name: rotate90
> ### Title: Matrix or Array Rotation by 90 Degrees
> ### Aliases: rotate90
> 
> ### ** Examples
> 
> # sample matrix
> img <- matrix(1:6, ncol = 2)
> img
     [,1] [,2]
[1,]    1    4
[2,]    2    5
[3,]    3    6
> 
> rotate90(img) # counterclockwise
 ----------- FAILURE REPORT -------------- 
 --- failure: the condition has length > 1 ---
 --- srcref --- 
: 
 --- package (from environment) --- 
imagefluency
 --- call from context --- 
rotate90(img)
 --- call from argument --- 
if (class(img) == "matrix") {
    return(rot90(img, direction))
} else if (class(img) == "array") {
    out <- array(NA, dim = c(dim(img)[2], dim(img)[1], dim(img)[3]))
    for (i in seq_len(dim(img)[3])) {
        out[, , i] <- rot90(img[, , i], direction)
    }
    return(out)
} else {
    stop(paste0("Unknown input of type '", class(img), "' (has to be of type 'matrix' or 'array')"), 
        call. = FALSE)
}
 --- R stacktrace ---
where 1: rotate90(img)

 --- value of length: 2 type: logical ---
[1]  TRUE FALSE
 --- function from context --- 
function (img, direction = "positive") 
{
    rot90 <- function(A, dir = "positive") {
        height <- dim(A)[1]
        width <- dim(A)[2]
        A <- t(A)
        if (dir == "positive" | dir == "counterclockwise") {
            return(A[width:1, ])
        }
        if (dir == "negative" | dir == "clockwise") {
            return(A[, height:1])
        }
    }
    if (!(direction == "positive" | direction == "counterclockwise" | 
        direction == "negative" | direction == "clockwise")) {
        stop(paste0("'", direction, "' is an unknown input to parameter 'direction'. Try 'direction = positive' or 'direction = negative'."))
    }
    if (class(img) == "matrix") {
        return(rot90(img, direction))
    }
    else if (class(img) == "array") {
        out <- array(NA, dim = c(dim(img)[2], dim(img)[1], dim(img)[3]))
        for (i in seq_len(dim(img)[3])) {
            out[, , i] <- rot90(img[, , i], direction)
        }
        return(out)
    }
    else {
        stop(paste0("Unknown input of type '", class(img), "' (has to be of type 'matrix' or 'array')"), 
            call. = FALSE)
    }
}
<bytecode: 0x55a659e5c378>
<environment: namespace:imagefluency>
 --- function search by body ---
 ----------- END OF FAILURE REPORT -------------- 
Fatal error: the condition has length > 1