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

> base::assign(".ptime", proc.time(), pos = "CheckExEnv")
> ### Name: LC1980
> ### Title: 1980 Liberal-Conservative Scales.
> ### Aliases: LC1980
> ### Keywords: datasets
> 
> ### ** Examples
> 
> ### Loads and scales the Liberal-Conservative scales from the 1980 NES.
> data(LC1980)
> result <- aldmck(data=LC1980, polarity=2, respondent=1, missing=c(0,8,9),verbose=TRUE)
 ----------- FAILURE REPORT -------------- 
 --- failure: the condition has length > 1 ---
 --- srcref --- 
: 
 --- package (from environment) --- 
basicspace
 --- call from context --- 
aldmck(data = LC1980, polarity = 2, respondent = 1, missing = c(0, 
    8, 9), verbose = TRUE)
 --- call from argument --- 
if (class(data) == "data.frame") data <- as.matrix(data)
 --- R stacktrace ---
where 1: aldmck(data = LC1980, polarity = 2, respondent = 1, missing = c(0, 
    8, 9), verbose = TRUE)

 --- value of length: 2 type: logical ---
[1] FALSE FALSE
 --- function from context --- 
function (data, respondent = 0, missing = NULL, polarity, verbose = FALSE) 
{
    if (class(data) == "data.frame") 
        data <- as.matrix(data)
    if (class(data) != "matrix") 
        stop("Data is not a matrix or data frame.")
    if (typeof(data) != "double") 
        stop("Data are not numeric values, please convert it using as.numeric() or mode().")
    if (mode(respondent) != "numeric") 
        stop("Respondent is not specified as an integer.")
    if (respondent > ncol(data)) 
        stop("Respondent set to a column greater than number of columns in data.")
    if (respondent < 0) 
        stop("Respondent cannot be negative, set respondent=0 is self identification is unavailable.")
    if (mode(polarity) != "numeric") 
        stop("Polarity is not specified as an integer.")
    if (polarity == respondent) 
        stop("Self-placements cannot also be set as polarity.")
    if (polarity > ncol(data)) 
        stop("Polarity set to a column greater than number of columns in data.")
    if (polarity < 0) 
        stop("Polarity cannot be negative.")
    if (!is.null(missing) & !(is.matrix(missing) | is.vector(missing))) 
        stop("Argument 'missing' must be a vector or matrix.")
    if (mode(missing) != "numeric" & !is.null(missing)) 
        stop("Argument 'missing' must only contain integers.")
    if (!is.logical(verbose)) 
        stop("Argument 'verbose' must be set TRUE or FALSE.")
    N <- nrow(data)
    NQ <- ncol(data) - 1
    NRESP <- respondent
    if (respondent == 0) {
        NQ <- ncol(data)
        NRESP <- ncol(data) + 1
    }
    if (is.vector(missing)) 
        data[data %in% missing] <- NA
    if (is.matrix(missing)) 
        for (i in 1:ncol(data)) data[data[, i] %in% missing[, 
            i], i] <- NA
    missval <- max(data, na.rm = TRUE) + 1
    if (respondent == 0) 
        data <- cbind(data, fakedata = rep(missval, nrow(data)))
    rawdata <- as.integer(t(data))
    rawdata[is.na(rawdata)] <- missval
    deleted <- sum(is.na(apply(data, 1, sum)))
    stimnames <- colnames(data)
    if (is.null(stimnames)) 
        stimnames <- paste("stim", 1:N, sep = "")
    if (verbose) {
        cat("\n\n\tBeginning Aldrich-McKelvey Scaling...")
        if (respondent != 0) 
            cat("\n\n\t\tColumn '", stimnames[respondent], "' is set as the self placement.", 
                sep = "")
        if (respondent == 0) 
            cat("\n\n\t\tSelf-placements have not been provided by the user.")
        cat("\n\t\tColumn '", stimnames[polarity], "' is set as the left-leaning stimulus.\n\t\t", 
            sep = "")
        cat(nrow(data) - deleted, "of", nrow(data), "observations are complete.\n\t\t")
        cat(NQ, "stimuli have been provided.")
    }
    if ((respondent != 0) & (respondent < polarity)) 
        polarity = polarity - 1
    res <- .Fortran("mckalnew", as.integer(N), as.integer(NQ + 
        1), as.integer(NRESP), as.integer(1), as.numeric(rep(missval, 
        NQ + 1)), as.integer(polarity), as.integer(rep(1, N)), 
        as.numeric(rawdata), fits = double(5), psimatrix = double(N * 
            4), stimcoord = double(NQ), eigenvalues = double(NQ), 
        exitstatus = integer(1))
    if (res$exitstatus != 1) 
        stop("\n\n\t====== Aldrich-McKelvey did not execute properly ======\n\n")
    stimnames <- colnames(data)
    if (is.null(stimnames)) 
        stimnames <- paste("stim", 1:N, sep = "")
    stimuli <- as.numeric(res$stimcoord)
    names(stimuli) <- stimnames[-NRESP]
    respondents <- matrix(res$psimatrix, ncol = 4, byrow = T)
    respondents[respondents == 0] <- NA
    midnames <- as.character(unlist(rownames(data)))
    if (is.null(midnames)) 
        midnames <- paste("resp", 1:N, sep = "")
    rownames(respondents) <- midnames
    colnames(respondents) <- c("intercept", "weight", "idealpt", 
        "R2")
    respondents <- respondents[, 1:3]
    if (respondent == 0) {
        selfplace <- rep(NA, N)
        data <- data[, -ncol(data)]
    }
    else {
        selfplace <- data[, respondent]
        data <- data[, -respondent]
    }
    polinfo <- suppressWarnings(apply(data, 1, cor, y = stimuli, 
        use = "pairwise.complete.obs"))
    polinfo[which(respondents[, "weight"] < 0)] <- 0
    respondents <- cbind(respondents, selfplace, polinfo)
    result <- list(stimuli = stimuli, respondents = as.data.frame(respondents), 
        eigenvalues = as.numeric(res$eigenvalues), AMfit = as.numeric(res$fits[1]), 
        N = as.integer(res$fits[4]) + as.integer(res$fits[5]), 
        N.neg = as.integer(res$fits[5]), N.pos = as.integer(res$fits[4]))
    class(result) <- c("aldmck")
    if (verbose) 
        cat("\n\n\tAldrich-McKelvey estimation completed successfully.\n\n")
    result
}
<bytecode: 0x47dc490>
<environment: namespace:basicspace>
 --- function search by body ---
Function aldmck in namespace basicspace has this body.
 ----------- END OF FAILURE REPORT -------------- 
Fatal error: the condition has length > 1