Running examples in 'LSAfun-Ex.R' failed
The error most likely occurred in:

> base::assign(".ptime", proc.time(), pos = "CheckExEnv")
> ### Name: Cosine
> ### Title: Compute cosine similarity
> ### Aliases: Cosine
> 
> ### ** Examples
> data(wonderland)
> 
> Cosine("alice","rabbit",tvectors=wonderland)
 ----------- FAILURE REPORT -------------- 
 --- failure: the condition has length > 1 ---
 --- srcref --- 
: 
 --- package (from environment) --- 
LSAfun
 --- call from context --- 
Cosine("alice", "rabbit", tvectors = wonderland)
 --- call from argument --- 
if (class(tvectors) == "data.frame") {
    tvectors <- as.matrix(tvectors)
} else if (class(tvectors) == "textmatrix") {
    tvectors <- matrix(tvectors, nrow = nrow(tvectors), ncol = ncol(tvectors), 
        dimnames = list(rownames(tvectors), colnames(tvectors)))
}
 --- R stacktrace ---
where 1: Cosine("alice", "rabbit", tvectors = wonderland)

 --- value of length: 2 type: logical ---
[1] FALSE FALSE
 --- function from context --- 
function (x, y, tvectors = tvectors, breakdown = FALSE) 
{
    if (class(tvectors) == "data.frame") {
        tvectors <- as.matrix(tvectors)
    }
    else if (class(tvectors) == "textmatrix") {
        tvectors <- matrix(tvectors, nrow = nrow(tvectors), ncol = ncol(tvectors), 
            dimnames = list(rownames(tvectors), colnames(tvectors)))
    }
    if (class(tvectors) == "matrix") {
        if (class(x) != "character") {
            x <- as.character(x)
            message("Note: x converted to character")
        }
        if (class(y) != "character") {
            y <- as.character(y)
            message("Note: y converted to character")
        }
        if (breakdown == TRUE) {
            x <- breakdown(x)
            y <- breakdown(y)
        }
        if (x %in% rownames(tvectors) && y %in% rownames(tvectors)) {
            out <- as.numeric(cosine(tvectors[x, ], tvectors[y, 
                ]))
            return(out)
        }
        else {
            warning("x and y must be words in rownames(tvectors)")
            return(NA)
        }
    }
    else {
        stop("tvectors must be a matrix!")
    }
}
<bytecode: 0x2623470>
<environment: namespace:LSAfun>
 --- function search by body ---
Function Cosine in namespace LSAfun has this body.
 ----------- END OF FAILURE REPORT -------------- 
Fatal error: the condition has length > 1