CRAN Package Check Results for Package regrrr

Last updated on 2019-12-15 18:50:19 CET.

Flavor Version Tinstall Tcheck Ttotal Status Flags
r-devel-linux-x86_64-debian-clang 0.1.0 14.89 126.69 141.58 ERROR
r-devel-linux-x86_64-debian-gcc 0.1.0 12.99 94.34 107.33 OK
r-devel-linux-x86_64-fedora-clang 0.1.0 165.45 NOTE
r-devel-linux-x86_64-fedora-gcc 0.1.0 167.21 NOTE
r-devel-windows-ix86+x86_64 0.1.0 29.00 164.00 193.00 OK
r-devel-windows-ix86+x86_64-gcc8 0.1.0 34.00 168.00 202.00 OK
r-patched-linux-x86_64 0.1.0 14.78 107.66 122.44 OK
r-patched-solaris-x86 0.1.0 226.20 NOTE
r-release-linux-x86_64 0.1.0 13.29 107.18 120.47 OK
r-release-windows-ix86+x86_64 0.1.0 27.00 114.00 141.00 OK
r-release-osx-x86_64 0.1.0 NOTE
r-oldrel-windows-ix86+x86_64 0.1.0 15.00 116.00 131.00 OK
r-oldrel-osx-x86_64 0.1.0 NOTE

Check Details

Version: 0.1.0
Check: examples
Result: ERROR
    Running examples in 'regrrr-Ex.R' failed
    The error most likely occurred in:
    
    > base::assign(".ptime", proc.time(), pos = "CheckExEnv")
    > ### Name: combine_long_tab
    > ### Title: Combine regression results from different models by columns
    > ### Aliases: combine_long_tab
    >
    > ### ** Examples
    >
    > data(mtcars)
    > m1 <- lm(mpg ~ vs + carb + hp + wt + wt * hp , data = mtcars)
    > m2 <- update(m1, . ~ .+ wt * vs)
    > summary(m1)
    
    Call:
    lm(formula = mpg ~ vs + carb + hp + wt + wt * hp, data = mtcars)
    
    Residuals:
     Min 1Q Median 3Q Max
    -3.4054 -1.4962 0.0464 1.4798 4.4308
    
    Coefficients:
     Estimate Std. Error t value Pr(>|t|)
    (Intercept) 48.157120 4.097303 11.753 6.63e-12 ***
    vs 1.077078 1.152430 0.935 0.358587
    carb -0.042819 0.373640 -0.115 0.909642
    hp -0.112698 0.027084 -4.161 0.000307 ***
    wt -8.070854 1.306957 -6.175 1.57e-06 ***
    hp:wt 0.027354 0.007586 3.606 0.001295 **
    ---
    Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
    
    Residual standard error: 2.196 on 26 degrees of freedom
    Multiple R-squared: 0.8887, Adjusted R-squared: 0.8672
    F-statistic: 41.5 on 5 and 26 DF, p-value: 1.388e-11
    
    > summary(m2)
    
    Call:
    lm(formula = mpg ~ vs + carb + hp + wt + hp:wt + vs:wt, data = mtcars)
    
    Residuals:
     Min 1Q Median 3Q Max
    -3.4158 -1.5332 0.0755 1.3474 4.4336
    
    Coefficients:
     Estimate Std. Error t value Pr(>|t|)
    (Intercept) 46.698382 9.272303 5.036 3.39e-05 ***
    vs 2.171317 6.320220 0.344 0.7341
    carb -0.009202 0.425923 -0.022 0.9829
    hp -0.106579 0.044364 -2.402 0.0240 *
    wt -7.593981 3.016424 -2.518 0.0186 *
    hp:wt 0.025163 0.014639 1.719 0.0980 .
    vs:wt -0.366764 2.081491 -0.176 0.8616
    ---
    Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
    
    Residual standard error: 2.238 on 25 degrees of freedom
    Multiple R-squared: 0.8888, Adjusted R-squared: 0.8621
    F-statistic: 33.3 on 6 and 25 DF, p-value: 9.391e-11
    
    > combine_long_tab(to_long_tab(summary(m1)$coef),
    + to_long_tab(summary(m2)$coef))
     ----------- FAILURE REPORT --------------
     --- failure: the condition has length > 1 ---
     --- srcref ---
    :
     --- package (from environment) ---
    regrrr
     --- call from context ---
    to_long_tab(summary(m1)$coef)
     --- call from argument ---
    if (!class(reg.coef) %in% c("matrix", "data.frame", "coeftest")) {
     stop("reg.coef needs to be a data.frame or an coeftest object")
    }
     --- R stacktrace ---
    where 1: to_long_tab(summary(m1)$coef)
    where 2: doTryCatch(return(expr), name, parentenv, handler)
    where 3: tryCatchOne(expr, names, parentenv, handlers[[1L]])
    where 4: tryCatchList(expr, classes, parentenv, handlers)
    where 5: tryCatch({
     all_tbls <- list(tbl_1, tbl_2, tbl_3, tbl_4, tbl_5, tbl_6,
     tbl_7, tbl_8, tbl_9, tbl_10, tbl_11, tbl_12, tbl_13,
     tbl_14, tbl_15, tbl_16, tbl_17, tbl_18, tbl_19, tbl_20)
     non_empty <- length(all_tbls) - sum(unlist(purrr::map(all_tbls,
     is.null)))
     list_tbls <- all_tbls[1:non_empty]
     for (i in 1:length(list_tbls)) {
     list_tbls[[i]]$var_[seq(2, nrow(list_tbls[[i]]), by = 2)] <- paste0(list_tbls[[i]]$var_[seq(1,
     nrow(list_tbls[[i]]), by = 2)], "s.e.")
     list_tbls[[i]]$n.r <- NULL
     }
     main.table <- purrr::reduce(list_tbls, dplyr::full_join,
     by = c("var_"))
     main.table[is.na(main.table)] <- ""
     main.table$var_[seq(2, nrow(main.table), by = 2)] <- ""
     names(main.table) <- c("Variables", paste0("Model ", 0:(non_empty -
     1)))
    }, error = function(e) {
     cat("ERROR :", conditionMessage(e), "\n")
    })
    where 6: combine_long_tab(to_long_tab(summary(m1)$coef), to_long_tab(summary(m2)$coef))
    
     --- value of length: 2 type: logical ---
    [1] FALSE TRUE
     --- function from context ---
    function (reg.coef, d = 3, t.value.col = 3, Pr.col = 4)
    {
     if (!class(reg.coef) %in% c("matrix", "data.frame", "coeftest")) {
     stop("reg.coef needs to be a data.frame or an coeftest object")
     }
     tryCatch({
     if (class(reg.coef) == "coeftest") {
     reg.coef <- as.data.frame(reg.coef[])
     }
     if (!"n.r" %in% colnames(reg.coef)) {
     reg.coef <- data.frame(n.r = 1:nrow(reg.coef), reg.coef)
     }
     if (!"prob." %in% colnames(reg.coef)) {
     t.value.col <- t.value.col + 1
     reg.coef <- data.frame(reg.coef, prob. = 2 * (1 -
     pnorm(abs(reg.coef[, t.value.col]))))
     }
     if (!"sig." %in% colnames(reg.coef)) {
     df <- reg.coef
     Pr.col <- Pr.col + 1
     reg.coef <- data.frame(df, sig. = ifelse(df[, Pr.col] <
     0.001, paste0(rep("*", 3), collapse = ""), ifelse(df[,
     Pr.col] < 0.01, paste0(rep("*", 2), collapse = ""),
     ifelse(df[, Pr.col] < 0.05, paste0(rep("*", 1),
     collapse = ""), ifelse(df[, Pr.col] < 0.1,
     "â\200 ", "")))))
     }
     Estimate <- NULL
     n.r <- NULL
     var_ <- NULL
     key <- NULL
     test <- cbind(var_ = rownames(df), reg.coef[, c(1:3,
     ncol(reg.coef))])
     digits <- function(x, d) {
     if (class(x) == "numeric") {
     formatC(x, format = "f", digits = d)
     }
     else {
     x
     }
     }
     test <- data.frame(purrr::map(test, digits, d))
     test <- tidyr::unite(test, Estimate, 3, 5, sep = "")
     test[, 4] <- paste0("(", test[, 4], ")")
     reg.table <- dplyr::arrange(tidyr::gather(test, key,
     beta, -c(var_, n.r)), n.r)[, c(2, 1, 4)]
     even.row <- rep(c(FALSE, TRUE), nrow(reg.table)/2)
     reg.table$var_ <- as.character(reg.table$var_)
     reg.table$var_[even.row] <- ""
     }, error = function(e) {
     cat("ERROR :", conditionMessage(e), "\n")
     })
     return(reg.table)
    }
    <bytecode: 0x11eff150>
    <environment: namespace:regrrr>
     --- function search by body ---
    Function to_long_tab in namespace regrrr has this body.
     ----------- END OF FAILURE REPORT --------------
    ERROR : the condition has length > 1
    Error in combine_long_tab(to_long_tab(summary(m1)$coef), to_long_tab(summary(m2)$coef)) :
     object 'main.table' not found
    Execution halted
Flavor: r-devel-linux-x86_64-debian-clang

Version: 0.1.0
Check: dependencies in R code
Result: NOTE
    Namespaces in Imports field not imported from:
     ‘rlang’ ‘spatstat’
     All declared Imports should be used.
Flavors: r-devel-linux-x86_64-fedora-clang, r-devel-linux-x86_64-fedora-gcc, r-patched-solaris-x86, r-release-osx-x86_64, r-oldrel-osx-x86_64