CRAN Package Check Results for Package basicspace

Last updated on 2019-12-13 11:49:39 CET.

Flavor Version Tinstall Tcheck Ttotal Status Flags
r-devel-linux-x86_64-debian-clang 0.20 7.87 35.75 43.62 ERROR
r-devel-linux-x86_64-debian-gcc 0.20 6.85 40.09 46.94 OK
r-devel-linux-x86_64-fedora-clang 0.20 75.55 OK
r-devel-linux-x86_64-fedora-gcc 0.20 74.81 OK
r-devel-windows-ix86+x86_64 0.20 19.00 113.00 132.00 OK
r-devel-windows-ix86+x86_64-gcc8 0.20 19.00 85.00 104.00 OK
r-patched-linux-x86_64 0.20 7.30 48.81 56.11 OK
r-patched-solaris-x86 0.20 97.80 OK
r-release-linux-x86_64 0.20 7.57 49.13 56.70 OK
r-release-windows-ix86+x86_64 0.20 19.00 109.00 128.00 OK
r-release-osx-x86_64 0.20 OK
r-oldrel-windows-ix86+x86_64 0.20 16.00 92.00 108.00 OK
r-oldrel-osx-x86_64 0.20 OK

Additional issues

LTO

Check Details

Version: 0.20
Check: examples
Result: ERROR
    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: 0x3710700>
    <environment: namespace:basicspace>
     --- function search by body ---
    Function aldmck in namespace basicspace has this body.
     ----------- END OF FAILURE REPORT --------------
    Error in if (class(data) == "data.frame") data <- as.matrix(data) :
     the condition has length > 1
    Calls: aldmck
    Execution halted
Flavor: r-devel-linux-x86_64-debian-clang

Version: 0.20
Check: re-building of vignette outputs
Result: WARN
    Error(s) in re-building vignettes:
     ...
    --- re-building 'basicspace.Rnw' using Sweave
    Loading required package: tools
    
    ## BASIC SPACE SCALING PACKAGE
    ## 2009 - 2019
    ## Keith Poole, Howard Rosenthal, Jeffrey Lewis, James Lo, and Royce Carroll
    ## Support provided by the U.S. National Science Foundation
    ## NSF Grant SES-0611974
    
     ----------- FAILURE REPORT --------------
     --- failure: the condition has length > 1 ---
     --- srcref ---
    :
     --- package (from environment) ---
    basicspace
     --- call from context ---
    blackbox(X.0, missing = c(999), verbose = TRUE, dims = 3, minscale = 8)
     --- call from argument ---
    if (class(data) == "data.frame") data <- as.matrix(data)
     --- R stacktrace ---
    where 1: blackbox(X.0, missing = c(999), verbose = TRUE, dims = 3, minscale = 8)
    where 2: eval(expr, .GlobalEnv)
    where 3: eval(expr, .GlobalEnv)
    where 4: withVisible(eval(expr, .GlobalEnv))
    where 5: doTryCatch(return(expr), name, parentenv, handler)
    where 6: tryCatchOne(expr, names, parentenv, handlers[[1L]])
    where 7: tryCatchList(expr, classes, parentenv, handlers)
    where 8: tryCatch(expr, error = function(e) {
     call <- conditionCall(e)
     if (!is.null(call)) {
     if (identical(call[[1L]], quote(doTryCatch)))
     call <- sys.call(-4L)
     dcall <- deparse(call)[1L]
     prefix <- paste("Error in", dcall, ": ")
     LONG <- 75L
     sm <- strsplit(conditionMessage(e), "\n")[[1L]]
     w <- 14L + nchar(dcall, type = "w") + nchar(sm[1L], type = "w")
     if (is.na(w))
     w <- 14L + nchar(dcall, type = "b") + nchar(sm[1L],
     type = "b")
     if (w > LONG)
     prefix <- paste0(prefix, "\n ")
     }
     else prefix <- "Error : "
     msg <- paste0(prefix, conditionMessage(e), "\n")
     .Internal(seterrmessage(msg[1L]))
     if (!silent && isTRUE(getOption("show.error.messages"))) {
     cat(msg, file = outFile)
     .Internal(printDeferredWarnings())
     }
     invisible(structure(msg, class = "try-error", condition = e))
    })
    where 9: try(withVisible(eval(expr, .GlobalEnv)), silent = TRUE)
    where 10: evalFunc(ce, options)
    where 11: tryCatchList(expr, classes, parentenv, handlers)
    where 12: tryCatch(evalFunc(ce, options), finally = {
     cat("\n")
     sink()
    })
    where 13: driver$runcode(drobj, chunk, chunkopts)
    where 14: utils::Sweave(...)
    where 15: engine$weave(file, quiet = quiet, encoding = enc)
    where 16: doTryCatch(return(expr), name, parentenv, handler)
    where 17: tryCatchOne(expr, names, parentenv, handlers[[1L]])
    where 18: tryCatchList(expr, classes, parentenv, handlers)
    where 19: tryCatch({
     engine$weave(file, quiet = quiet, encoding = enc)
     setwd(startdir)
     output <- find_vignette_product(name, by = "weave", engine = engine)
     if (!have.makefile && vignette_is_tex(output)) {
     texi2pdf(file = output, clean = FALSE, quiet = quiet)
     output <- find_vignette_product(name, by = "texi2pdf",
     engine = engine)
     }
     outputs <- c(outputs, output)
    }, error = function(e) {
     thisOK <<- FALSE
     fails <<- c(fails, file)
     message(gettextf("Error: processing vignette '%s' failed with diagnostics:\n%s",
     file, conditionMessage(e)))
    })
    where 20: tools:::buildVignettes(dir = "/home/hornik/tmp/R.check/r-devel-clang/Work/PKGS/basicspace.Rcheck/vign_test/basicspace",
     ser_elibs = "/tmp/RtmpwM5fNH/file48316442a895.rds")
    
     --- value of length: 2 type: logical ---
    [1] FALSE FALSE
     --- function from context ---
    function (data, missing = NULL, verbose = FALSE, dims = 1, minscale)
    {
     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 (!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.")
     if (minscale < 1)
     stop("Argument 'minscale' must be positive.")
     if (dims < 1)
     stop("Argument 'dims' must be positive.")
     N <- nrow(data)
     NQ <- ncol(data)
     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
     rawdata <- as.numeric(t(data))
     rawdata[is.na(rawdata)] <- missval
     stimnames <- colnames(data)
     if (is.null(stimnames))
     stimnames <- paste("stim", 1:N, sep = "")
     if (verbose) {
     deleted <- sum(is.na(apply(data, 1, sum)))
     cat("\n\n\tBeginning Blackbox Scaling...")
     cat(NQ, "stimuli have been provided.")
     }
     res <- .Fortran("blackbox", as.integer(N), as.integer(NQ),
     as.integer(dims), as.integer(1), as.numeric(rep(missval,
     NQ)), as.integer(minscale), as.integer(rep(1, N)),
     as.numeric(rawdata), as.character("a"), fits = double(7 *
     dims), psimatrix = double(N * ((dims * (dims + 1))/2) +
     2 * N * dims), wmatrix = double((NQ) * ((dims * (dims +
     1))/2) + 2 * (NQ) * dims), lresp = integer(N + NQ),
     lmark = integer(N), fits2 = double(6), exitstatus = integer(1))
     if (res$exitstatus != 1)
     stop("\n\n\t====== Blackbox did not execute properly ======\n\n")
     stimuli <- vector("list", dims)
     start <- 1
     end <- 3 * NQ
     for (i in 1:dims) {
     stimuli[[i]] <- as.data.frame(matrix(round(res$wmatrix[start:end],
     digits = 3), nrow = NQ, ncol = i + 2, byrow = T))
     colnames(stimuli[[i]]) <- c("c", paste("w", 1:i, sep = ""),
     "R2")
     rownames(stimuli[[i]]) <- stimnames
     stimuli[[i]] <- cbind(N = res$lresp[1:NQ], stimuli[[i]])
     start <- end + 1
     end <- start + (i + 3) * NQ - 1
     }
     individuals <- vector("list", dims)
     start <- 1
     end <- N
     for (i in 1:dims) {
     individuals[[i]] <- as.data.frame(matrix(round(res$psimatrix[start:end],
     digits = 3), nrow = N, ncol = i, byrow = T))
     dumpthese <- (rowSums(individuals[[i]] == 0) == i)
     individuals[[i]][dumpthese, ] <- NA
     colnames(individuals[[i]]) <- c(paste("c", 1:i, sep = ""))
     rownames(individuals[[i]]) <- rownames(data)
     start <- end + 1
     end <- start + (i + 1) * N - 1
     }
     fits <- matrix(res$fits, nrow = dims, ncol = 7, byrow = T)
     fits <- as.data.frame(fits[, c(1:3, 6:7), drop = FALSE])
     colnames(fits) <- c("SSE", "SSE.explained", "percent", "SE",
     "singular")
     rownames(fits) <- paste("Dimension", 1:dims)
     result <- list(stimuli = stimuli, individuals = individuals,
     fits = fits, Nrow = res$fits2[1], Ncol = res$fits2[2],
     Ndata = res$fits2[3], Nmiss = res$fits2[4], SS_mean = res$fits2[6],
     dims = dims)
     class(result) <- c("blackbox")
     if (verbose)
     cat("\n\n\tBlackbox estimation completed successfully.\n\n")
     result
    }
    <bytecode: 0x2e126b8>
    <environment: namespace:basicspace>
     --- function search by body ---
    Function blackbox in namespace basicspace has this body.
     ----------- END OF FAILURE REPORT --------------
    
    Error: processing vignette 'basicspace.Rnw' failed with diagnostics:
     chunk 6 (label = six)
    Error in if (class(data) == "data.frame") data <- as.matrix(data) :
     the condition has length > 1
    
    --- failed re-building 'basicspace.Rnw'
    
    SUMMARY: processing the following file failed:
     'basicspace.Rnw'
    
    Error: Vignette re-building failed.
    Execution halted
Flavor: r-devel-linux-x86_64-debian-clang