* using log directory 'd:/Rcompile/CRANpkg/local/3.6/dampack.Rcheck' * using R version 3.6.3 (2020-02-29) * using platform: x86_64-w64-mingw32 (64-bit) * using session charset: ISO8859-1 * checking for file 'dampack/DESCRIPTION' ... OK * checking extension type ... Package * this is package 'dampack' version '1.0.0' * package encoding: UTF-8 * 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 hidden files and directories ... OK * checking for portable file names ... OK * checking whether package 'dampack' can be installed ... OK * checking installed package size ... OK * checking package directory ... OK * checking 'build' 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 ... OK * checking S3 generic/method consistency ... OK * checking replacement functions ... OK * checking foreign function calls ... OK * checking R code for possible problems ... [16s] OK * checking Rd files ... OK * checking Rd metadata ... 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 data for ASCII and uncompressed saves ... OK * checking installed files from 'inst/doc' ... OK * checking files in 'vignettes' ... OK * checking examples ... ERROR Running examples in 'dampack-Ex.R' failed The error most likely occurred in: > ### Name: calc_exp_loss > ### Title: Calculate the expected loss at a range of willingness-to-pay > ### thresholds > ### Aliases: calc_exp_loss > > ### ** Examples > > data("example_psa_obj") > wtp <- seq(1e4, 1e5, by = 1e4) > exp_loss <- calc_exp_loss(example_psa_obj, wtp) Error in Ops.factor(exp_loss_df_melt$fstrat, exp_loss_df_melt$Strategy) : level sets of factors are different Calls: calc_exp_loss -> Ops.factor Execution halted * checking for unstated dependencies in 'tests' ... OK * checking tests ... [127s] ERROR Running 'testthat.R' [126s] Running the tests in 'tests/testthat.R' failed. Complete output: > library(testthat) > library(dampack) Loading required package: ggplot2 > > test_check("dampack") == Skipped tests =============================================================== * empty test (1) == Failed tests ================================================================ -- Error (test_elc.R:17:1): (code run outside of `test_that()`) ---------------- Error: level sets of factors are different Backtrace: x 1. \-dampack::calc_exp_loss(psa = psa_obj, wtp = example_psa$wtp) test_elc.R:17:0 2. \-base::Ops.factor(exp_loss_df_melt$fstrat, exp_loss_df_melt$Strategy) [ FAIL 1 | WARN 0 | SKIP 1 | PASS 130 ] Error: Test failures Execution halted * checking for unstated dependencies in vignettes ... OK * checking package vignettes in 'inst/doc' ... OK * checking re-building of vignette outputs ... [143s] WARNING Error(s) in re-building vignettes: --- re-building 'basic_cea.Rmd' using rmarkdown Attaching package: 'dplyr' The following object is masked from 'package:kableExtra': group_rows The following objects are masked from 'package:stats': filter, lag The following objects are masked from 'package:base': intersect, setdiff, setequal, union --- finished re-building 'basic_cea.Rmd' --- re-building 'dsa_generation.Rmd' using rmarkdown --- finished re-building 'dsa_generation.Rmd' --- re-building 'psa_analysis.Rmd' using rmarkdown Quitting from lines 145-151 (psa_analysis.Rmd) Error: processing vignette 'psa_analysis.Rmd' failed with diagnostics: level sets of factors are different --- failed re-building 'psa_analysis.Rmd' --- re-building 'psa_generation.Rmd' using rmarkdown --- finished re-building 'psa_generation.Rmd' --- re-building 'voi.Rmd' using rmarkdown --- finished re-building 'voi.Rmd' SUMMARY: processing the following file failed: 'psa_analysis.Rmd' Error: Vignette re-building failed. Execution halted * checking PDF version of manual ... OK * DONE Status: 2 ERRORs, 1 WARNING