Rdatatable / data.table

R's data.table package extends data.frame:
http://r-datatable.com
Mozilla Public License 2.0
3.62k stars 986 forks source link

popEpi error on upgrade data.table #4615

Closed mattdowle closed 4 years ago

mattdowle commented 4 years ago
popEpi_0.4.8.tar.gz
./popEpi.Rcheck/00check.log:* using log directory ‘/home/mdowle/build/revdeplib/popEpi.Rcheck’
./popEpi.Rcheck/00check.log:* using R Under development (unstable) (2020-07-14 r78854)
./popEpi.Rcheck/00check.log:* using platform: x86_64-pc-linux-gnu (64-bit)
./popEpi.Rcheck/00check.log:* using session charset: UTF-8
./popEpi.Rcheck/00check.log:* checking for file ‘popEpi/DESCRIPTION’ ... OK
./popEpi.Rcheck/00check.log:* this is package ‘popEpi’ version ‘0.4.8’
./popEpi.Rcheck/00check.log:* package encoding: UTF-8
./popEpi.Rcheck/00check.log:* checking package namespace information ... OK
./popEpi.Rcheck/00check.log:* checking package dependencies ... OK
./popEpi.Rcheck/00check.log:* checking if this is a source package ... OK
./popEpi.Rcheck/00check.log:* checking if there is a namespace ... OK
./popEpi.Rcheck/00check.log:* checking for executable files ... OK
./popEpi.Rcheck/00check.log:* checking for hidden files and directories ... OK
./popEpi.Rcheck/00check.log:* checking for portable file names ... OK
./popEpi.Rcheck/00check.log:* checking for sufficient/correct file permissions ... OK
./popEpi.Rcheck/00check.log:* checking whether package ‘popEpi’ can be installed ... OK
./popEpi.Rcheck/00check.log:* checking installed package size ... OK
./popEpi.Rcheck/00check.log:* checking package directory ... OK
./popEpi.Rcheck/00check.log:* checking ‘build’ directory ... OK
./popEpi.Rcheck/00check.log:* checking DESCRIPTION meta-information ... OK
./popEpi.Rcheck/00check.log:* checking top-level files ... OK
./popEpi.Rcheck/00check.log:* checking for left-over files ... OK
./popEpi.Rcheck/00check.log:* checking index information ... OK
./popEpi.Rcheck/00check.log:* checking package subdirectories ... OK
./popEpi.Rcheck/00check.log:* checking R files for non-ASCII characters ... OK
./popEpi.Rcheck/00check.log:* checking R files for syntax errors ... OK
./popEpi.Rcheck/00check.log:* checking whether the package can be loaded ... OK
./popEpi.Rcheck/00check.log:* checking whether the package can be loaded with stated dependencies ... OK
./popEpi.Rcheck/00check.log:* checking whether the package can be unloaded cleanly ... OK
./popEpi.Rcheck/00check.log:* checking whether the namespace can be loaded with stated dependencies ... OK
./popEpi.Rcheck/00check.log:* checking whether the namespace can be unloaded cleanly ... OK
./popEpi.Rcheck/00check.log:* checking loading without being on the library search path ... OK
./popEpi.Rcheck/00check.log:* checking dependencies in R code ... OK
./popEpi.Rcheck/00check.log:* checking S3 generic/method consistency ... OK
./popEpi.Rcheck/00check.log:* checking replacement functions ... OK
./popEpi.Rcheck/00check.log:* checking foreign function calls ... OK
./popEpi.Rcheck/00check.log:* checking R code for possible problems ... OK
./popEpi.Rcheck/00check.log:* checking Rd files ... OK
./popEpi.Rcheck/00check.log:* checking Rd metadata ... OK
./popEpi.Rcheck/00check.log:* checking Rd cross-references ... OK
./popEpi.Rcheck/00check.log:* checking for missing documentation entries ... OK
./popEpi.Rcheck/00check.log:* checking for code/documentation mismatches ... OK
./popEpi.Rcheck/00check.log:* checking Rd \usage sections ... OK
./popEpi.Rcheck/00check.log:* checking Rd contents ... OK
./popEpi.Rcheck/00check.log:* checking for unstated dependencies in examples ... OK
./popEpi.Rcheck/00check.log:* checking contents of ‘data’ directory ... OK
./popEpi.Rcheck/00check.log:* checking data for non-ASCII characters ... OK
./popEpi.Rcheck/00check.log:* checking data for ASCII and uncompressed saves ... OK
./popEpi.Rcheck/00check.log:* checking installed files from ‘inst/doc’ ... OK
./popEpi.Rcheck/00check.log:* checking files in ‘vignettes’ ... OK
./popEpi.Rcheck/00check.log:* checking examples ... ERROR
./popEpi.Rcheck/00check.log:Running examples in ‘popEpi-Ex.R’ failed
./popEpi.Rcheck/00check.log:The error most likely occurred in:
./popEpi.Rcheck/00check.log:> ### Name: survmean
./popEpi.Rcheck/00check.log:> ### Title: Compute Mean Survival Times Using Extrapolation
./popEpi.Rcheck/00check.log:> ### Aliases: survmean
./popEpi.Rcheck/00check.log:> 
./popEpi.Rcheck/00check.log:> ### ** Examples
./popEpi.Rcheck/00check.log:> 
./popEpi.Rcheck/00check.log:> 
./popEpi.Rcheck/00check.log:> library(Epi)
./popEpi.Rcheck/00check.log:> ## take 500 subjects randomly for demonstration
./popEpi.Rcheck/00check.log:> data(sire)
./popEpi.Rcheck/00check.log:> sire <- sire[sire$dg_date < sire$ex_date, ]
./popEpi.Rcheck/00check.log:> set.seed(1L)
./popEpi.Rcheck/00check.log:> sire <- sire[sample(x = nrow(sire), size = 500),]
./popEpi.Rcheck/00check.log:> 
./popEpi.Rcheck/00check.log:> ## NOTE: recommended to use factor status variable
./popEpi.Rcheck/00check.log:> x <- Lexis(entry = list(FUT = 0, AGE = dg_age, CAL = get.yrs(dg_date)),
./popEpi.Rcheck/00check.log:+            exit = list(CAL = get.yrs(ex_date)),
./popEpi.Rcheck/00check.log:+            data = sire,
./popEpi.Rcheck/00check.log:+            exit.status = factor(status, levels = 0:2,
./popEpi.Rcheck/00check.log:+                                 labels = c("alive", "canD", "othD")),
./popEpi.Rcheck/00check.log:+            merge = TRUE)
./popEpi.Rcheck/00check.log:NOTE: entry.status has been set to "alive" for all.
./popEpi.Rcheck/00check.log:> 
./popEpi.Rcheck/00check.log:> ## phony variable
./popEpi.Rcheck/00check.log:> set.seed(1L)
./popEpi.Rcheck/00check.log:> x$group <- rbinom(nrow(x), 1, 0.5)
./popEpi.Rcheck/00check.log:> ## age group
./popEpi.Rcheck/00check.log:> x$agegr <- cut(x$dg_age, c(0,45,60,Inf), right=FALSE)
./popEpi.Rcheck/00check.log:> 
./popEpi.Rcheck/00check.log:> ## population hazards data  set
./popEpi.Rcheck/00check.log:> pm <- data.frame(popEpi::popmort)
./popEpi.Rcheck/00check.log:> names(pm) <- c("sex", "CAL", "AGE", "haz")
./popEpi.Rcheck/00check.log:> 
./popEpi.Rcheck/00check.log:> ## breaks to define observed survival estimation
./popEpi.Rcheck/00check.log:> BL <- list(FUT = seq(0, 10, 1/12))
./popEpi.Rcheck/00check.log:> 
./popEpi.Rcheck/00check.log:> ## crude mean survival
./popEpi.Rcheck/00check.log:> sm1 <- survmean(Surv(FUT, lex.Xst != "alive") ~ 1,
./popEpi.Rcheck/00check.log:+                 pophaz = pm, data = x, weights = NULL,
./popEpi.Rcheck/00check.log:+                 breaks = BL)
./popEpi.Rcheck/00check.log:Error in vapply(X = x, FUN = fun, ..., FUN.VALUE = NA_character_, USE.NAMES = use.names) : 
./popEpi.Rcheck/00check.log:  values must be length 1,
./popEpi.Rcheck/00check.log: but FUN(X[[1]]) result is length 0
./popEpi.Rcheck/00check.log:Calls: survmean ... dcast.data.table -> make.unique -> vapply_1c -> vapply
./popEpi.Rcheck/00check.log:Execution halted
./popEpi.Rcheck/00check.log:* checking for unstated dependencies in ‘tests’ ... OK
./popEpi.Rcheck/00check.log:* checking tests ... OK
./popEpi.Rcheck/00check.log:  Running ‘testthat.R’
./popEpi.Rcheck/00check.log:* checking for unstated dependencies in vignettes ... OK
./popEpi.Rcheck/00check.log:* checking package vignettes in ‘inst/doc’ ... OK
./popEpi.Rcheck/00check.log:* checking running R code from vignettes ... NONE
./popEpi.Rcheck/00check.log:  ‘sir.Rmd’ using ‘UTF-8’... OK
./popEpi.Rcheck/00check.log:  ‘survtab_examples.Rmd’ using ‘UTF-8’... OK
./popEpi.Rcheck/00check.log:* checking re-building of vignette outputs ... OK
./popEpi.Rcheck/00check.log:* checking PDF version of manual ... OK
./popEpi.Rcheck/00check.log:* DONE
./popEpi.Rcheck/00check.log:Status: 1 ERROR
MichaelChirico commented 4 years ago

Regression confirmed, MRE here:

DT = data.table(a = c("est", "exp"), survmean = c(7.9, 17.4))

dcast(DT, 1 ~ a, value.var='survmean')