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

> base::assign(".ptime", proc.time(), pos = "CheckExEnv")
> ### Name: pdfos
> ### Title: Probability density function estimation based oversampling
> ### Aliases: pdfos
> 
> ### ** Examples
> 
> data(iris0)
> 
> newSamples <- pdfos(iris0, numInstances = 100, classAttr = "Class")
 ----------- FAILURE REPORT -------------- 
 --- failure: the condition has length > 1 ---
 --- srcref --- 
: 
 --- package (from environment) --- 
imbalance
 --- call from context --- 
pdfos(iris0, numInstances = 100, classAttr = "Class")
 --- call from argument --- 
if (class(covInverse) == "try-error") stop(paste("Not a valid method for this dataset.", 
    "Variance of the positive class is not an invertible matrix"))
 --- R stacktrace ---
where 1: pdfos(iris0, numInstances = 100, classAttr = "Class")

 --- value of length: 2 type: logical ---
[1] FALSE FALSE
 --- function from context --- 
function (dataset, numInstances, classAttr = "Class") 
{
    checkDataset(dataset)
    checkDatasetClass(dataset, classAttr)
    originalShape <- datasetStructure(dataset, classAttr)
    dataset <- toNumeric(dataset, exclude = classAttr)
    checkAllColumnsNumeric(dataset, exclude = classAttr)
    if (!is.numeric(numInstances) || numInstances <= 0) 
        stop("numInstances must be a positive integer")
    minority <- selectMinority(dataset, classAttr)
    minority <- data.matrix(minority)
    covariance <- stats::var(minority)
    covInverse <- try(solve(covariance))
    if (class(covInverse) == "try-error") 
        stop(paste("Not a valid method for this dataset.", "Variance of the positive class is not an invertible matrix"))
    myBandwidth <- bestGaussianBandwidth(minority, covInverse)
    samples <- minority[sample(1:nrow(minority), numInstances, 
        replace = T), ]
    newSamples <- t(apply(samples, MARGIN = 1, function(row) {
        mvtnorm::rmvnorm(1, mean = data.matrix(row), sigma = myBandwidth * 
            covariance, method = "chol")
    }))
    normalizeNewSamples(originalShape, newSamples)
}
<bytecode: 0x264aab8>
<environment: namespace:imbalance>
 --- function search by body ---
Function pdfos in namespace imbalance has this body.
 ----------- END OF FAILURE REPORT -------------- 
Fatal error: the condition has length > 1