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

> base::assign(".ptime", proc.time(), pos = "CheckExEnv")
> ### Name: matrixplot
> ### Title: Matrixplot
> ### Aliases: matrixplot
> ### Keywords: graphs
> 
> ### ** Examples
> 
> ## Loading the SanMartino precipitation data
> data(SanMartinoPPts)
> 
> # Selecting only the values up to Dec/1960
> x <- window(SanMartinoPPts, end=as.Date("1960-12-31"))
> 
> ## Daily zoo to monthly zoo
> m <- daily2monthly(x, FUN=sum, na.rm=TRUE)
> 
> # Creating a data.frame with monthly values per year in each column
> M <- matrix(m, ncol=12, byrow=TRUE)
> colnames(M) <- month.abb
> rownames(M) <- unique(format(time(m), "%Y"))
> 
> # Plotting the monthly precipitation values from 1921 to 1960.
> # Useful for identifying dry/wet months
> matrixplot(M, ColorRamp="Precipitation", 
+            main="Monthly precipitation at San Martino st., [mm/month]")
 ----------- FAILURE REPORT -------------- 
 --- failure: the condition has length > 1 ---
 --- srcref --- 
: 
 --- package (from environment) --- 
hydroTSM
 --- call from context --- 
matrixplot(M, ColorRamp = "Precipitation", main = "Monthly precipitation at San Martino st., [mm/month]")
 --- call from argument --- 
if (class(x) == "zoo") x <- coredata(x)
 --- R stacktrace ---
where 1: matrixplot(M, ColorRamp = "Precipitation", main = "Monthly precipitation at San Martino st., [mm/month]")

 --- value of length: 2 type: logical ---
[1] FALSE FALSE
 --- function from context --- 
function (x, ColorRamp = "Days", ncolors = 70, main = "", ...) 
{
    if (class(x) == "zoo") 
        x <- coredata(x)
    valid.class <- c("matrix", "data.frame")
    if (length(which(!is.na(match(class(x), valid.class)))) <= 
        0) 
        stop("Invalid argument: 'class(x)' must be in c('matrix', 'data.frame')")
    if (class(x) == "data.frame") 
        x <- as.matrix(x)
    Days.cols <- colorRampPalette(c("red3", "orange", "darkgoldenrod1", 
        "yellow", "darkolivegreen2", "green"))
    Precipitation.cols <- colorRampPalette(c("red3", "orange", 
        "yellow", "darkolivegreen3", "lightskyblue", "royalblue3"))
    Temperature.cols <- colorRampPalette(c("yellow4", "yellow", 
        "orange", "red3", "darkred"))
    PCPAnomaly.cols <- colorRampPalette(c("sienna4", "peachpuff", 
        "royalblue", "blue"))
    PCPAnomaly2.cols <- colorRampPalette(c("darkred", "red3", 
        "orange", "yellow", "lightskyblue", "royalblue3", "darkblue"))
    TEMPAnomaly.cols <- colorRampPalette(c("lightyellow", "yellow", 
        "red", "darkred"))
    TEMPAnomaly2.cols <- colorRampPalette(c("yellow4", "yellow", 
        "orange", "red3", "darkred"))
    TEMPAnomaly3.cols <- colorRampPalette(c("darkblue", "royalblue3", 
        "lightskyblue", "yellow", "orange", "red3", "darkred"))
    if (class(ColorRamp) != "function") {
        if (is.na(match(ColorRamp, c("Days", "Precipitation", 
            "Temperature", "PCPAnomaly", "PCPAnomaly2", "TEMPAnomaly", 
            "TEMPAnomaly2", "TEMPAnomaly3")))) {
            stop("Invalid argument: 'ColorRamp' must be in c('Days', 'Precipitation', 'Temperature', 'PCPAnomaly', 'PCPAnomaly2', 'TEMPAnomaly', 'TEMPAnomaly2', 'TEMPAnomaly3')")
        }
        else {
            if (ColorRamp == "Days") {
                ColorRamp <- Days.cols
            }
            else if (ColorRamp == "Precipitation") {
                ColorRamp <- Precipitation.cols
            }
            else if (ColorRamp == "Temperature") {
                ColorRamp <- Temperature.cols
            }
            else if (ColorRamp == "PCPAnomaly") {
                ColorRamp <- PCPAnomaly.cols
            }
            else if (ColorRamp == "PCPAnomaly2") {
                ColorRamp <- PCPAnomaly2.cols
            }
            else if (ColorRamp == "TEMPAnomaly") {
                ColorRamp <- TEMPAnomaly.cols
            }
            else if (ColorRamp == "TEMPAnomaly2") {
                ColorRamp <- TEMPAnomaly2.cols
            }
            else if (ColorRamp == "TEMPAnomaly3") {
                ColorRamp <- TEMPAnomaly3.cols
            }
        }
    }
    y <- levelplot(x, scales = list(tck = 0, x = list(rot = 90)), 
        col.regions = ColorRamp(ncolors), main = main, xlab = NULL, 
        ylab = NULL, ...)
    return(y)
}
<bytecode: 0x56326e59aa28>
<environment: namespace:hydroTSM>
 --- function search by body ---
Function matrixplot in namespace hydroTSM has this body.
 ----------- END OF FAILURE REPORT -------------- 
Error in if (class(x) == "zoo") x <- coredata(x) : 
  the condition has length > 1
Calls: matrixplot
Execution halted