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

> base::assign(".ptime", proc.time(), pos = "CheckExEnv")
> ### Name: ma.wtd.statNA
> ### Title: Some Multivariate Descriptive Statistics for Weighted Data in
> ###   'miceadds'
> ### Aliases: ma.wtd.statNA ma.wtd.covNA ma.wtd.corNA ma.wtd.meanNA
> ###   ma.wtd.sdNA ma.wtd.skewnessNA ma.wtd.kurtosisNA ma.wtd.quantileNA
> 
> ### ** Examples
> 
> #############################################################################
> # EXAMPLE 1: Weighted statistics for a single dataset data.ma01
> #############################################################################
> 
> data(data.ma01)
> dat <- as.matrix(data.ma01[,-c(1:3)])
> 
> # weighted mean
> ma.wtd.meanNA( dat, weights=data.ma01$studwgt  )
 ----------- FAILURE REPORT -------------- 
 --- failure: the condition has length > 1 ---
 --- srcref --- 
: 
 --- package (from environment) --- 
miceadds
 --- call from context --- 
ma_wtd_stat_prepare_data(data = data, weights = weights, vars = vars)
 --- call from argument --- 
if (class(data) %in% c("mids", "mids.1chain", "mids.nmi")) {
    data <- mids2datlist(midsobj = data)
}
 --- R stacktrace ---
where 1: ma_wtd_stat_prepare_data(data = data, weights = weights, vars = vars)
where 2: ma.wtd.meanNA(dat, weights = data.ma01$studwgt)

 --- value of length: 2 type: logical ---
[1] FALSE FALSE
 --- function from context --- 
function (data, weights, vars = NULL) 
{
    is_dfr <- TRUE
    if (is.vector(data)) {
        data <- data.frame(Var = data)
        is_dfr <- TRUE
    }
    if (class(data) %in% c("mids", "mids.1chain", "mids.nmi")) {
        data <- mids2datlist(midsobj = data)
    }
    if (class(data) == "NestedImputationList") {
        is_dfr <- FALSE
        data <- data$imputations
        class(data) <- "nested.datlist"
    }
    if (class(data) == "nested.datlist") {
        is_dfr <- FALSE
        data <- nesteddatlist2datlist(datlist = data)
    }
    if (class(data) == "imputationList") {
        data <- data$imputations
        class(data) <- "datlist"
    }
    if (class(data) == "datlist") {
        is_dfr <- FALSE
        if (!is.null(vars)) {
            M <- length(data)
            for (ii in 1:M) {
                dat0 <- data[[ii]]
                data[[ii]] <- dat0[, vars, drop = FALSE]
            }
        }
    }
    if (class(data) == "BIFIEdata") {
        require_namespace("BIFIEsurvey")
        if (is.null(vars)) {
            vars <- data$variables
        }
        if (is.null(weights)) {
            weights <- data$wgt
        }
        if (data$cdata) {
            data <- BIFIEsurvey::BIFIE.BIFIEcdata2BIFIEdata(bifieobj = data, 
                varnames = vars)
        }
        data <- BIFIEsurvey::BIFIE.BIFIEdata2datalist(bifieobj = data, 
            varnames = vars)
        data <- datlist_create(datasets = data)
        M <- length(data)
        for (ii in 1:M) {
            data[[ii]][, "one"] <- NULL
            data_ii <- data[[ii]]
            data[[ii]] <- data_ii[, vars, drop = FALSE]
        }
        attr(data, "nvars") <- ncol(data[[ii]])
        is_dfr <- FALSE
    }
    if (is_dfr) {
        data0 <- data
        data0 <- as.matrix(data0)
        if (!is.null(vars)) {
            data0 <- data0[, vars, drop = FALSE]
        }
        data <- list(1)
        data[[1]] <- data0
    }
    if (is.null(weights)) {
        weights <- rep(1, nrow(data[[1]]))
    }
    res <- list(data = data, weights = weights)
    return(res)
}
<bytecode: 0x563e9b91aeb8>
<environment: namespace:miceadds>
 --- function search by body ---
Function ma_wtd_stat_prepare_data in namespace miceadds has this body.
 ----------- END OF FAILURE REPORT -------------- 
Fatal error: the condition has length > 1