[R-pkg-devel] How to debug CRAN errors?

William Dunlap wdun|@p @end|ng |rom t|bco@com
Wed Mar 13 17:59:48 CET 2019


The complaint

> test_check("huxtable")
     -- 1. Failure: Data written in appropriate format
(@test-openxlsx.R#101) ------
     `openxlsx::saveWorkbook(wb, file = "test-xlsx.xlsx", overwrite =
TRUE)` produced messages.

comes from your call to testthat::expect_silent()

test_that("Data written in appropriate format", {
  hx <- huxtable(a = 1:2 + 0.5, b = -1:-2 + 0.5, d = letters[1:2],
add_colnames = TRUE)
  wb <- as_Workbook(hx)
  expect_silent(openxlsx::saveWorkbook(wb, file = "test-xlsx.xlsx",
overwrite = TRUE))


Perhaps you should suggest to the authors of testthat that it would be nice
if expect_silent() showed some of the text of the messages, etc., instead
of just saying that messages were produced.

By the way, I think your test test should write to a file in [a
subdirectory of]] tempdir(), not to a file in the current directory.

comes from
Bill Dunlap
TIBCO Software
wdunlap tibco.com


On Wed, Mar 13, 2019 at 8:50 AM David Hugh-Jones <davidhughjones using gmail.com>
wrote:
>
> Hi all,
>
> My package has errors on CRAN's Linux and Solaris:
>
> https://cran.r-project.org/web/checks/check_results_huxtable.html
>
> which I can't reproduce on my local OSX Machine, nor on Linux on Travis.
>
> Does anyone have any general hints on how to reproduce and/or debug such
> errors?
>
> Specifically the error relates to a call to openxlsx::saveWorkbook
> producing a message. openxlsx hasn't changed recently, though.
>
> Cheers,
> David
>
>         [[alternative HTML version deleted]]
>
> ______________________________________________
> R-package-devel using r-project.org mailing list
> https://stat.ethz.ch/mailman/listinfo/r-package-devel

	[[alternative HTML version deleted]]



More information about the R-package-devel mailing list