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

> base::assign(".ptime", proc.time(), pos = "CheckExEnv")
> ### Name: Murphy Diagrams
> ### Title: Murphy diagrams to visualize forecast comparisons
> ### Aliases: murphydiagram murphydiagram_diff
> ### Keywords: forecasting methods
> 
> ### ** Examples
> 
> 
> # Comparison of Inflation Forecasts: Survey of Professional Forecasters (SPF) 
> # versus Michigan Survey of Consumers
> 
> data(inflation_mean)
> murphydiagram(inflation_mean$spf, inflation_mean$michigan, inflation_mean$rlz, 
+               labels = c("SPF", "Michigan"))
> murphydiagram_diff(inflation_mean$spf, inflation_mean$michigan, inflation_mean$rlz)
 ----------- FAILURE REPORT -------------- 
 --- failure: the condition has length > 1 ---
 --- srcref --- 
: 
 --- package (from environment) --- 
murphydiagram
 --- call from context --- 
murphydiagram_diff(inflation_mean$spf, inflation_mean$michigan, 
    inflation_mean$rlz)
 --- call from argument --- 
if (class(aux.v) == "try-error") aux.v <- 0
 --- R stacktrace ---
where 1: murphydiagram_diff(inflation_mean$spf, inflation_mean$michigan, 
    inflation_mean$rlz)

 --- value of length: 2 type: logical ---
[1] FALSE FALSE
 --- function from context --- 
function (f1, f2, y, functional = "expectile", alpha = 0.5, equally_spaced = FALSE, 
    lag_truncate = 0, conf_level = 0.95) 
{
    cex.gen <- 1.6
    nobs <- length(y)
    scl <- abs(qnorm(0.5 * (1 - conf_level)))
    if (functional == "expectile") {
        g <- function(f, t) S.expectile(f, y, t, alpha)
    }
    else if (functional == "quantile") {
        g <- function(f, t) S.quantile(f, y, t, alpha)
    }
    else {
        stop("Please choose either expectile or quantile functional")
    }
    tseq <- get_grid(f1, f2, y, functional, alpha, literal = 1 - 
        equally_spaced)
    df <- data.frame(tseq = tseq, s1 = numeric(length(tseq)), 
        s2 = numeric(length(tseq)), lb = numeric(length(tseq)), 
        ub = numeric(length(tseq)))
    for (j in 1:length(tseq)) {
        aux1 <- g(f1, tseq[j])
        aux2 <- g(f2, tseq[j])
        df[j, 2:3] <- c(mean(aux1), mean(aux2))
        aux.v <- try(vHAC(aux1 - aux2, k = lag_truncate, meth = "bartlett")$hac/nobs)
        if (class(aux.v) == "try-error") 
            aux.v <- 0
        df[j, 4:5] <- mean(aux1 - aux2) + c(-1, 1) * scl * sqrt(aux.v)
    }
    if (all(y %in% c(0, 1))) {
        xx <- c(-0.05, 1.05)
    }
    else {
        xx <- c(min(tseq) - 0.1, max(tseq) + 0.1)
    }
    matplot(x = df$tseq, y = df[, 4:5], type = "n", ylab = "", 
        xlab = expression(paste("Parameter ", theta)), bty = "n", 
        cex.axis = cex.gen, cex.lab = cex.gen, xlim = xx, col = 1)
    polygon(c(df$t, rev(df$t)), c(df$ub, rev(df$lb)), col = "grey", 
        border = NA)
    lines(x = df$t, y = (df$s1 - df$s2), type = "l", col = 1, 
        lwd = 2.5)
    abline(h = 0, lty = 2)
}
<bytecode: 0x3f29650>
<environment: namespace:murphydiagram>
 --- function search by body ---
Function murphydiagram_diff in namespace murphydiagram has this body.
 ----------- END OF FAILURE REPORT -------------- 
Error in if (class(aux.v) == "try-error") aux.v <- 0 : 
  the condition has length > 1
Calls: murphydiagram_diff
Execution halted