* using log directory ‘/data/gannet/ripley/R/packages/tests-LENGTH1/otvPlots.Rcheck’ * using R Under development (unstable) (2022-04-26 r82260) * using platform: x86_64-pc-linux-gnu (64-bit) * using session charset: UTF-8 * using option ‘--no-stop-on-test-error’ * checking for file ‘otvPlots/DESCRIPTION’ ... OK * this is package ‘otvPlots’ version ‘0.2.1’ * checking package namespace information ... OK * checking package dependencies ... OK * checking if this is a source package ... OK * checking if there is a namespace ... OK * checking for executable files ... OK * checking for hidden files and directories ... OK * checking for portable file names ... OK * checking for sufficient/correct file permissions ... OK * checking whether package ‘otvPlots’ can be installed ... [19s/48s] OK * checking package directory ... OK * checking DESCRIPTION meta-information ... OK * checking top-level files ... OK * checking for left-over files ... OK * checking index information ... OK * checking package subdirectories ... OK * checking R files for non-ASCII characters ... OK * checking R files for syntax errors ... OK * checking whether the package can be loaded ... OK * checking whether the package can be loaded with stated dependencies ... OK * checking whether the package can be unloaded cleanly ... OK * checking whether the namespace can be loaded with stated dependencies ... OK * checking whether the namespace can be unloaded cleanly ... OK * checking loading without being on the library search path ... OK * checking use of S3 registration ... OK * checking dependencies in R code ... NOTE Namespace in Imports field not imported from: ‘quantreg’ All declared Imports should be used. * checking S3 generic/method consistency ... OK * checking replacement functions ... OK * checking foreign function calls ... OK * checking R code for possible problems ... [26s/82s] OK * checking Rd files ... OK * checking Rd metadata ... OK * checking Rd line widths ... OK * checking Rd cross-references ... OK * checking for missing documentation entries ... OK * checking for code/documentation mismatches ... OK * checking Rd \usage sections ... OK * checking Rd contents ... OK * checking for unstated dependencies in examples ... OK * checking contents of ‘data’ directory ... OK * checking data for non-ASCII characters ... OK * checking LazyData ... OK * checking data for ASCII and uncompressed saves ... OK * checking examples ... [31s/49s] ERROR Running examples in ‘otvPlots-Ex.R’ failed The error most likely occurred in: > ### Name: PlotVar > ### Title: Create over time variable plots and summary statitsics for one > ### variable > ### Aliases: PlotVar > > ### ** Examples > > data(bankData) > bankData <- PrepData(bankData, dateNm = "date", dateGp = "months", + dateGpBp = "quarters") The following variables will be plotted: Numerical: age balance duration campaign pdays previous Categorical: job marital education default housing loan contact poutcome y > data(bankLabels) > bankLabels <- PrepLabels(bankLabels) > > ## PlotVar will treat numerical and categorical data differently. > ## Binary data is always treated as categorical. > plot(PlotVar(bankData, myVar = "duration", weightNm = NULL, dateNm = "date", + dateGp = "months", dateGpBp = "quarters", labelFl = bankLabels)$p) Plotting duration ----------- FAILURE REPORT -------------- --- failure: length > 1 in coercion to logical --- --- srcref --- : --- package (from environment) --- otvPlots --- call from context --- PlotVar(bankData, myVar = "duration", weightNm = NULL, dateNm = "date", dateGp = "months", dateGpBp = "quarters", labelFl = bankLabels) --- call from argument --- dataFl[, class(get(myVar))] %in% c("character", "factor") || dataFl[, length(unique(stats::na.omit(get(myVar))))] == 2 --- R stacktrace --- where 1: PlotVar(bankData, myVar = "duration", weightNm = NULL, dateNm = "date", dateGp = "months", dateGpBp = "quarters", labelFl = bankLabels) where 2: plot(PlotVar(bankData, myVar = "duration", weightNm = NULL, dateNm = "date", dateGp = "months", dateGpBp = "quarters", labelFl = bankLabels)$p) --- value of length: 2 type: logical --- [1] FALSE FALSE --- function from context --- function (dataFl, myVar, weightNm, dateNm, dateGp, dateGpBp = NULL, labelFl = NULL, highlightNms = NULL, skewOpt = NULL, kSample = 50000, fuzzyLabelFn = NULL, kCategories = 9) { varCol <- labelCol <- NULL message(paste("Plotting ", myVar)) if (any(is.element(unlist(dataFl[, class(get(myVar))]), c("Date", "IDate")))) { stop("Cannot plot dates") } if (!(inherits(myVar, "ctgrl") | inherits(myVar, "nmrcl"))) { if (dataFl[, class(get(myVar))] %in% c("character", "factor") || dataFl[, length(unique(stats::na.omit(get(myVar))))] == 2) { setattr(dataFl[, get(myVar)], "class", "ctgrl") } else { setattr(dataFl[, get(myVar)], "class", "nmrcl") } } if (inherits(dataFl[[myVar]], "ctgrl")) { p_all <- PlotCatVar(myVar, dataFl, weightNm, dateNm, dateGp, kCategories) p <- p_all$p varSummary <- p_all$catVarSummary varType <- "ctgrl" } else if (inherits(dataFl[[myVar]], "nmrcl")) { p_all <- PlotNumVar(myVar, dataFl, weightNm, dateGp, dateGpBp, skewOpt, kSample) p <- p_all$p varSummary = p_all$numVarSummary varType <- "nmrcl" } ll <- myVar subHeight <- grid::unit(12, "points") if (!is.null(labelFl)) { if (is.null(fuzzyLabelFn)) { ll <- paste0(labelFl[varCol == myVar, labelCol]) } else { ll <- fuzzyLabelFn(labelFl, myVar) } ll <- paste0(myVar, " (", ll, ")", "\n") } subCol <- "black" if (!is.null(highlightNms)) { highlightNms <- gsub("/|\\-|\"|\\s", "", highlightNms) if (myVar %in% highlightNms) { subCol <- "red" } } subText <- grid::textGrob(ll, gp = grid::gpar(col = subCol, fontface = "bold")) grobHeights <- grid::unit.c(grid::unit(1, "npc") - subHeight, subHeight) p <- gridExtra::arrangeGrob(p, top = subText) return(list(p = p, varSummary = varSummary, varType = varType)) } --- function search by body --- Function PlotVar in namespace otvPlots has this body. ----------- END OF FAILURE REPORT -------------- Fatal error: length > 1 in coercion to logical * checking for unstated dependencies in ‘tests’ ... OK * checking tests ... Running ‘testthat.R’ [13s/21s] [13s/22s] OK * checking PDF version of manual ... OK * checking for non-standard things in the check directory ... OK * checking for detritus in the temp directory ... OK * DONE Status: 1 ERROR, 1 NOTE See ‘/data/gannet/ripley/R/packages/tests-LENGTH1/otvPlots.Rcheck/00check.log’ for details. Command exited with non-zero status 1 Time 7:30.88, 175.87 + 15.66