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

> base::assign(".ptime", proc.time(), pos = "CheckExEnv")
> ### Name: GNE.ceq
> ### Title: Constrained equation reformulation of the GNE problem.
> ### Aliases: GNE.ceq
> ### Keywords: nonlinear optimize
> 
> ### ** Examples
> 
> 
> 
> #-------------------------------------------------------------------------------
> # (1) Example 5 of von Facchinei et al. (2007)
> #-------------------------------------------------------------------------------
> 
> dimx <- c(1, 1)
> #Gr_x_j O_i(x)
> grobj <- function(x, i, j)
+ {
+ 	if(i == 1)
+ 		res <- c(2*(x[1]-1), 0)
+ 	if(i == 2)
+ 		res <- c(0, 2*(x[2]-1/2))
+ 	res[j]	
+ }
> #Gr_x_k Gr_x_j O_i(x)
> heobj <- function(x, i, j, k)
+ 	2 * (i == j && j == k)
> 
> dimlam <- c(1, 1)
> #constraint function g_i(x)
> g <- function(x, i)
+ 	sum(x[1:2]) - 1
> #Gr_x_j g_i(x)
> grg <- function(x, i, j)
+ 	1
> #Gr_x_k Gr_x_j g_i(x)
> heg <- function(x, i, j, k)
+ 	0
> 
> 
> x0 <- rep(0, sum(dimx))
> z0 <- c(x0, 2, 2, max(10, 5-g(x0, 1) ), max(10, 5-g(x0, 2) ) )
> 
> #true value is (3/4, 1/4, 1/2, 1/2)
> GNE.ceq(z0, dimx, dimlam, grobj=grobj, heobj=heobj, 
+ 	constr=g, grconstr=grg, heconstr=heg, method="PR", 
+ 	control=list(trace=0, maxit=10))
 ----------- FAILURE REPORT -------------- 
 --- failure: the condition has length > 1 ---
 --- srcref --- 
: 
 --- package (from environment) --- 
GNE
 --- call from context --- 
GNE.ceq(z0, dimx, dimlam, grobj = grobj, heobj = heobj, constr = g, 
    grconstr = grg, heconstr = heg, method = "PR", control = list(trace = 0, 
        maxit = 10))
 --- call from argument --- 
if (class(test.try) == "try-error") return(list(par = NA, value = NA, 
    counts = NA, iter = NA, code = 100, message = "Can't evaluate Jac H(init).", 
    fvec = NA))
 --- R stacktrace ---
where 1: GNE.ceq(z0, dimx, dimlam, grobj = grobj, heobj = heobj, constr = g, 
    grconstr = grg, heconstr = heg, method = "PR", control = list(trace = 0, 
        maxit = 10))

 --- value of length: 2 type: logical ---
[1] FALSE FALSE
 --- function from context --- 
function (init, dimx, dimlam, grobj, arggrobj, heobj, argheobj, 
    constr, argconstr, grconstr, arggrconstr, heconstr, argheconstr, 
    dimmu, joint, argjoint, grjoint, arggrjoint, hejoint, arghejoint, 
    method = "PR", control = list(), silent = TRUE, ...) 
{
    if (method == "default") 
        method <- "PR"
    argtest1 <- testargfunCER(init, dimx, dimlam, grobj, arggrobj, 
        constr, argconstr, grconstr, arggrconstr, dimmu, joint, 
        argjoint, grjoint, arggrjoint)
    test.try <- try(funCER(init, dimx, dimlam, grobj, arggrobj, 
        constr, argconstr, grconstr, arggrconstr, dimmu, joint, 
        argjoint, grjoint, arggrjoint), silent = silent)
    if (class(test.try) == "try-error") 
        return(list(par = NA, value = NA, counts = NA, iter = NA, 
            code = 100, message = "Can't evalate H(init).", fvec = NA))
    if (any(is.nan(test.try)) || any(is.infinite(test.try))) 
        return(list(par = NA, value = NA, counts = NA, iter = NA, 
            code = 100, message = "H(init) has infinite or NaN values.", 
            fvec = NA))
    argtest2 <- testargjacCER(init, dimx, dimlam, heobj, argheobj, 
        constr, argconstr, grconstr, arggrconstr, heconstr, argheconstr, 
        dimmu, joint, argjoint, grjoint, arggrjoint, hejoint, 
        arghejoint)
    test.try <- try(jacCER(init, dimx, dimlam, heobj, argheobj, 
        constr, argconstr, grconstr, arggrconstr, heconstr, argheconstr, 
        dimmu, joint, argjoint, grjoint, arggrjoint, hejoint, 
        arghejoint), silent = silent)
    if (class(test.try) == "try-error") 
        return(list(par = NA, value = NA, counts = NA, iter = NA, 
            code = 100, message = "Can't evaluate Jac H(init).", 
            fvec = NA))
    if (any(is.nan(test.try)) || any(is.infinite(test.try))) 
        return(list(par = NA, value = NA, counts = NA, iter = NA, 
            code = 100, message = "Jac H(init) has infinite or NaN values.", 
            fvec = NA))
    myfunCER <- function(x, argfun, argjac) evalwitharglist(funCER, 
        x, argfun)
    myjacCER <- function(x, argfun, argjac) evalwitharglist(jacCER, 
        x, argjac)
    arg1 <- list(dimx = argtest1$dimx, dimlam = argtest1$dimlam, 
        grobj = argtest1$grobj, arggrobj = argtest1$arggrobj, 
        constr = argtest1$constr, argconstr = argtest1$argconstr, 
        grconstr = argtest1$grconstr, arggrconstr = argtest1$arggrconstr, 
        dimmu = argtest1$dimmu, joint = argtest1$joint, argjoint = argtest1$argjoint, 
        grjoint = argtest1$grjoint, arggrjoint = argtest1$arggrjoint)
    arg2 <- list(argtest2$dimx, argtest2$dimlam, argtest2$heobj, 
        argtest2$argheobj, argtest2$constr, argtest2$argconstr, 
        argtest2$grconstr, argtest2$arggrconstr, argtest2$heconstr, 
        argtest2$argheconstr, argtest2$dimmu, argtest2$joint, 
        argtest2$argjoint, argtest2$grjoint, argtest2$arggrjoint, 
        argtest2$hejoint, argtest2$arghejoint)
    if (!silent) 
        print("init completed.")
    res <- ceq(init, dimx, dimlam, Hfinal = myfunCER, jacHfinal = myjacCER, 
        argfun = arg1, argjac = arg2, method = method, control = control, 
        silent = silent, ...)
    class(res) <- "GNE"
    if (!silent) 
        print("computation completed.")
    res
}
<bytecode: 0x44dce38>
<environment: namespace:GNE>
 --- function search by body ---
Function GNE.ceq in namespace GNE has this body.
 ----------- END OF FAILURE REPORT -------------- 
Error in if (class(test.try) == "try-error") return(list(par = NA, value = NA,  : 
  the condition has length > 1
Calls: GNE.ceq
Execution halted