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

> base::assign(".ptime", proc.time(), pos = "CheckExEnv")
> ### Name: affinity
> ### Title: Chemical Affinities of Formation Reactions
> ### Aliases: affinity
> 
> ### ** Examples
> 
> ## Don't show: 
> reset()
reset: resetting "thermo" object
obigt: loading default database with 1849 aqueous, 3372 total species
> ## End(Don't show)## set up a system and calculate
> ## chemical affinities of formation reactions
> basis(c("SiO2", "MgO", "H2O", "O2"), c(-5, -5, 0, 999))
 ----------- FAILURE REPORT -------------- 
 --- failure: the condition has length > 1 ---
 --- srcref --- 
: 
 --- package (from environment) --- 
CHNOSZ
 --- call from context --- 
put.basis(ispecies, logact)
 --- call from argument --- 
if (class(try(solve(comp), silent = TRUE)) == "try-error") stop("singular stoichiometric matrix")
 --- R stacktrace ---
where 1: put.basis(ispecies, logact)
where 2: basis(c("SiO2", "MgO", "H2O", "O2"), c(-5, -5, 0, 999))

 --- value of length: 2 type: logical ---
[1] FALSE FALSE
 --- function from context --- 
function (ispecies, logact = rep(NA, length(ispecies))) 
{
    thermo <- get("thermo", CHNOSZ)
    state <- thermo$obigt$state[ispecies]
    comp <- makeup(ispecies, count.zero = TRUE)
    comp <- sapply(comp, c)
    comp <- t(comp)
    rownames(comp) <- as.character(thermo$obigt$formula[ispecies])
    if ("(Z-1)" %in% rownames(comp)) 
        rownames(comp)[rownames(comp) == "(Z-1)"] <- "e-"
    if (nrow(comp) > ncol(comp)) {
        if ("Z" %in% colnames(comp)) 
            stop("the number of basis species is greater than the number of elements and charge")
        else stop("the number of basis species is greater than the number of elements")
    }
    if (nrow(comp) < ncol(comp)) {
        if ("Z" %in% colnames(comp)) 
            stop("the number of basis species is less than the number of elements and charge")
        else stop("the number of basis species is less than the number of elements")
    }
    if (class(try(solve(comp), silent = TRUE)) == "try-error") 
        stop("singular stoichiometric matrix")
    comp <- cbind(as.data.frame(comp), ispecies, logact, state, 
        stringsAsFactors = FALSE)
    thermo$basis <- comp
    assign("thermo", thermo, CHNOSZ)
    species(delete = TRUE)
    return(thermo$basis)
}
<bytecode: 0x564036725278>
<environment: namespace:CHNOSZ>
 --- function search by body ---
Function put.basis in namespace CHNOSZ has this body.
 ----------- END OF FAILURE REPORT -------------- 
Fatal error: the condition has length > 1