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

> base::assign(".ptime", proc.time(), pos = "CheckExEnv")
> ### Name: probsvm
> ### Title: Main function that provides models for multiclass conditional
> ###   probability estimation and label prediction
> ### Aliases: probsvm
> 
> ### ** Examples
> 
> # iris data #
> 
> data(iris)
> 
> iris.x=iris[c(1:20,51:70,101:120),-5]  
>  
> iris.y=iris[c(1:20,51:70,101:120),5]
> 
> iris.test=iris[c(21:50,71:100,121:150),-5]  
>  
> a = probsvm(iris.x,iris.y,type="ovo",
+ 	Inum=10,fold=2,lambdas=2^seq(-10,10,by=3))
 ----------- FAILURE REPORT -------------- 
 --- failure: the condition has length > 1 ---
 --- srcref --- 
: 
 --- package (from environment) --- 
probsvm
 --- call from context --- 
predict_pipathresults(obj, x.test, pi = I)
 --- call from argument --- 
if (class(new.x) != "matrix" & class(new.x) != "data.frame") {
    stop("The new covariates must be either a matrix or a data.frame.")
}
 --- R stacktrace ---
where 1: predict_pipathresults(obj, x.test, pi = I)
where 2: prob.svm(x.train, y.train, x.test, lambda = lambda, Inum = Inum, 
    kernel = kernel, kparam = kparam)
where 3: loglik.svm(x.train.temp, y.train.temp, x.tune.temp, y.tune.temp, 
    lambda = lambda, Inum = Inum, kernel = kernel, kparam = kparam)
where 4: probsvm(iris.x, iris.y, type = "ovo", Inum = 10, fold = 2, lambdas = 2^seq(-10, 
    10, by = 3))

 --- value of length: 2 type: logical ---
[1] FALSE  TRUE
 --- function from context --- 
function (obj, new.x = NULL, pi = NULL) 
{
    obj.pi = obj$pi[1]
    obj.alpha0 = obj$alpha0[1]
    obj.alpha = obj$alpha[1, ]
    for (ii in 2:length(obj$pi)) {
        if (obj$pi[ii] != obj$pi[ii - 1]) {
            obj.pi = c(obj.pi, obj$pi[ii])
            obj.alpha0 = c(obj.alpha0, obj$alpha0[ii])
            obj.alpha = rbind(obj.alpha, obj$alpha[ii, ])
        }
    }
    kernel = obj$kernel
    kparam = obj$kparam
    if (is.null(new.x)) {
        new.x = obj$x
    }
    if (is.null(pi)) {
        pi = obj.pi
    }
    if (class(new.x) != "matrix" & class(new.x) != "data.frame") {
        stop("The new covariates must be either a matrix or a data.frame.")
    }
    if (class(new.x) == "data.frame") {
        new.x = as.matrix(new.x)
    }
    if (ncol(new.x) != ncol(obj$x)) {
        stop("The new covariates matrix has a wrong dimension.")
    }
    if (!is.numeric(pi)) {
        stop("The parameter pi must be numeric.")
    }
    if (min(pi) < 0 | max(pi) > 1) {
        stop("The parameter pi must be in [0,1].")
    }
    K <- Kmat(new.x, obj$x, kernel, kparam)
    pred.y = numeric(0)
    alpha0 = numeric(0)
    alpha = numeric(0)
    f.hat = numeric(0)
    for (i in 1:length(pi)) {
        temp = pi[i]
        index = which(obj.pi == temp)
        if (length(index) == 1) {
            temp.alpha = obj.alpha[index, ]
            temp.alpha0 = obj.alpha0[index]
            new.y1 = K %*% temp.alpha + temp.alpha0
        }
        if (length(index) == 0) {
            if (temp < (obj.pi[1])) {
                temp.alpha = obj.alpha[1, ]
                temp.alpha0 = obj.alpha0[1]
                new.y1 = K %*% (temp.alpha * obj$y) + temp.alpha0
            }
            if (temp > (obj.pi[length(obj.pi)])) {
                temp.alpha = obj.alpha[length(obj.pi), ]
                temp.alpha0 = obj.alpha0[length(obj.pi)]
                new.y1 = K %*% (temp.alpha * obj$y) + temp.alpha0
            }
            if (temp < (obj.pi[length(obj.pi)]) & temp > (obj.pi[1])) {
                index2 = max(which(obj.pi < temp))
                temp.alpha = obj.alpha[index2, ] + (temp - obj.pi[index2])/(obj.pi[(index2 + 
                  1)] - obj.pi[index2]) * (obj.alpha[(index2 + 
                  1), ] - obj.alpha[index2, ])
                temp.alpha0 = obj.alpha0[index2] + (temp - obj.pi[index2])/(obj.pi[(index2 + 
                  1)] - obj.pi[index2]) * (obj.alpha0[(index2 + 
                  1)] - obj.alpha0[index2])
                new.y1 = K %*% (temp.alpha * obj$y) + temp.alpha0
            }
        }
        f.hat = cbind(f.hat, new.y1)
        new.y1 = as.numeric(new.y1 > 0) * 2 - 1
        pred.y = cbind(pred.y, new.y1)
        alpha = cbind(alpha, temp.alpha)
        alpha0 = c(alpha0, temp.alpha0)
    }
    colnames(f.hat) = NULL
    colnames(alpha) = NULL
    colnames(pred.y) = NULL
    z = list(pi = obj.pi, fitted.alpha0 = alpha0, fitted.alpha = alpha, 
        fitted.f = f.hat, predicted.y = pred.y)
    return(z)
}
<bytecode: 0x558fc8ece608>
<environment: namespace:probsvm>
 --- function search by body ---
Function predict_pipathresults in namespace probsvm has this body.
 ----------- END OF FAILURE REPORT -------------- 
Error in if (class(new.x) != "matrix" & class(new.x) != "data.frame") { : 
  the condition has length > 1
Calls: probsvm -> loglik.svm -> prob.svm -> predict_pipathresults
Execution halted