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

> base::assign(".ptime", proc.time(), pos = "CheckExEnv")
> ### Name: chkSpectra
> ### Title: Verify the Integrity of a Spectra or Spectra2D Object
> ### Aliases: chkSpectra
> ### Keywords: classes utilities
> 
> ### ** Examples
> 
> if (checkForPackageWithVersion("ChemoSpec", "5.1")) {
+   library("ChemoSpec")
+   data(SrE.IR)
+   chkSpectra(SrE.IR)
+ }
 ----------- FAILURE REPORT -------------- 
 --- failure: the condition has length > 1 ---
 --- srcref --- 
: 
 --- package (from environment) --- 
ChemoSpecUtils
 --- call from context --- 
chkSpectra.Spectra(SrE.IR)
 --- call from argument --- 
if (!class(spectra$data) == "matrix") {
    warning("The spectral intensities are not matrix type")
    trouble <- TRUE
}
 --- R stacktrace ---
where 1: chkSpectra.Spectra(SrE.IR)
where 2: chkSpectra(SrE.IR)

 --- value of length: 2 type: logical ---
[1] FALSE  TRUE
 --- function from context --- 
function (spectra, confirm = FALSE) 
{
    trouble <- FALSE
    extra <- FALSE
    if (!class(spectra) == "Spectra") {
        warning("The object provided was not of class Spectra")
        trouble <- TRUE
    }
    if (!class(spectra$freq) == "numeric") {
        warning("The frequency data appear are not numeric")
        trouble <- TRUE
    }
    if (!class(spectra$data) == "matrix") {
        warning("The spectral intensities are not matrix type")
        trouble <- TRUE
    }
    if (!class(spectra$names) == "character") {
        warning("The sample names are not character type")
        trouble <- TRUE
    }
    if (!class(spectra$color) == "character") {
        warning("The colors are not character type")
        trouble <- TRUE
    }
    if (!((class(spectra$unit) == "character") | (is.expression(spectra$unit)))) {
        warning("The units are not character or expression type")
        trouble <- TRUE
    }
    if (!class(spectra$desc) == "character") {
        warning("The description is not character type")
        trouble <- TRUE
    }
    if (!class(spectra$groups) == "factor") {
        warning("The groups are not factor type")
        trouble <- TRUE
    }
    f <- length(spectra$freq)
    d2 <- dim(spectra$data)[2]
    n <- length(spectra$names)
    g <- length(spectra$groups)
    co <- length(spectra$colors)
    d1 <- dim(spectra$data)[1]
    sy <- length(spectra$sym)
    ay <- length(spectra$alt.sym)
    if (!identical(f, d2)) {
        warning("The dimensions don't make sense (freq, data)")
        trouble <- TRUE
    }
    if (!identical(n, g)) {
        warning("The dimensions don't make sense (names, group)")
        trouble <- TRUE
    }
    if (!identical(g, co)) {
        warning("The dimensions don't make sense (group, colors)")
        trouble <- TRUE
    }
    if (!identical(co, d1)) {
        warning("The dimensions don't make sense (colors, data)")
        trouble <- TRUE
    }
    if (!identical(co, sy)) {
        warning("The dimensions don't make sense (colors, symbols)")
        trouble <- TRUE
    }
    if (!identical(sy, ay)) {
        warning("The dimensions don't make sense (symbols, alt symbols)")
        trouble <- TRUE
    }
    for (i in 1:nrow(spectra$data)) {
        prob <- which(is.na(spectra$data[i, ]))
        if (length(prob) > 1L) {
            msg <- paste("NA found in data for", spectra$names[i], 
                ", please inspect/repair")
            message(msg)
            trouble <- TRUE
        }
    }
    dup <- anyDuplicated(spectra$names)
    if (dup != 0L) {
        message("Duplicate sample names found, please inspect/repair")
        trouble <- TRUE
    }
    extra <- .extraData(spectra)
    if ((!trouble) && (!extra) && (confirm)) 
        message(">>> Everything looks good!")
    if (extra) 
        message("\n\t>>>  Please check the extra data entries.")
    if (trouble) 
        stop("\n>>>  Bummer: There seem to be one or more problems with this data set!")
}
<bytecode: 0x564e0b24a218>
<environment: namespace:ChemoSpecUtils>
 --- function search by body ---
Function chkSpectra.Spectra in namespace ChemoSpecUtils has this body.
 ----------- END OF FAILURE REPORT -------------- 
Fatal error: the condition has length > 1