Error(s) in re-building vignettes:
--- re-building ‘hydroTSM_Vignette-knitr.Rnw’ using knitr
 ----------- 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]")
where 2: print(matrixplot(M, ColorRamp = "Precipitation", main = "Monthly precipitation at San Martino st., [mm/month]"))
where 3: eval(expr, envir, enclos)
where 4: eval(expr, envir, enclos)
where 5: withVisible(eval(expr, envir, enclos))
where 6: withCallingHandlers(withVisible(eval(expr, envir, enclos)), warning = wHandler, 
    error = eHandler, message = mHandler)
where 7: handle(ev <- withCallingHandlers(withVisible(eval(expr, envir, 
    enclos)), warning = wHandler, error = eHandler, message = mHandler))
where 8: timing_fn(handle(ev <- withCallingHandlers(withVisible(eval(expr, 
    envir, enclos)), warning = wHandler, error = eHandler, message = mHandler)))
where 9: evaluate_call(expr, parsed$src[[i]], envir = envir, enclos = enclos, 
    debug = debug, last = i == length(out), use_try = stop_on_error != 
        2L, keep_warning = keep_warning, keep_message = keep_message, 
    output_handler = output_handler, include_timing = include_timing)
where 10: evaluate::evaluate(...)
where 11: evaluate(code, envir = env, new_device = FALSE, keep_warning = !isFALSE(options$warning), 
    keep_message = !isFALSE(options$message), stop_on_error = if (options$error && 
        options$include) 0L else 2L, output_handler = knit_handlers(options$render, 
        options))
where 12: in_dir(input_dir(), evaluate(code, envir = env, new_device = FALSE, 
    keep_warning = !isFALSE(options$warning), keep_message = !isFALSE(options$message), 
    stop_on_error = if (options$error && options$include) 0L else 2L, 
    output_handler = knit_handlers(options$render, options)))
where 13: block_exec(params)
where 14: call_block(x)
where 15: process_group.block(group)
where 16: process_group(group)
where 17: withCallingHandlers(if (tangle) process_tangle(group) else process_group(group), 
    error = function(e) {
        setwd(wd)
        cat(res, sep = "\n", file = output %n% "")
        message("Quitting from lines ", paste(current_lines(i), 
            collapse = "-"), " (", knit_concord$get("infile"), 
            ") ")
    })
where 18: process_file(text, output)
where 19: (if (grepl("\\.[Rr]md$", file)) knit2html_v1 else if (grepl("\\.[Rr]rst$", 
    file)) knit2pandoc else knit)(file, encoding = encoding, 
    quiet = quiet, envir = globalenv(), ...)
where 20: engine$weave(file, quiet = quiet, encoding = enc)
where 21: doTryCatch(return(expr), name, parentenv, handler)
where 22: tryCatchOne(expr, names, parentenv, handlers[[1L]])
where 23: tryCatchList(expr, classes, parentenv, handlers)
where 24: tryCatch({
    engine$weave(file, quiet = quiet, encoding = enc)
    setwd(startdir)
    output <- find_vignette_product(name, by = "weave", engine = engine)
    if (!have.makefile && vignette_is_tex(output)) {
        texi2pdf(file = output, clean = FALSE, quiet = quiet)
        output <- find_vignette_product(name, by = "texi2pdf", 
            engine = engine)
    }
    outputs <- c(outputs, output)
}, error = function(e) {
    thisOK <<- FALSE
    fails <<- c(fails, file)
    message(gettextf("Error: processing vignette '%s' failed with diagnostics:\n%s", 
        file, conditionMessage(e)))
})
where 25: tools:::buildVignettes(dir = "/data/gannet/ripley/R/packages/tests-clang/hydroTSM.Rcheck/vign_test/hydroTSM", 
    ser_elibs = "/tmp/RtmpHTjpwZ/file5ea7201d92d1.rds")

 --- 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: 0x4dbcb38>
<environment: namespace:hydroTSM>
 --- function search by body ---
Function matrixplot in namespace hydroTSM has this body.
 ----------- END OF FAILURE REPORT -------------- 
Quitting from lines 116-128 (hydroTSM_Vignette-knitr.Rnw) 
Error: processing vignette 'hydroTSM_Vignette-knitr.Rnw' failed with diagnostics:
the condition has length > 1
--- failed re-building ‘hydroTSM_Vignette-knitr.Rnw’

SUMMARY: processing the following file failed:
  ‘hydroTSM_Vignette-knitr.Rnw’

Error: Vignette re-building failed.
Execution halted