mariusbarth / tinylabels

Lightweight Variable Labels
Other
3 stars 0 forks source link

Error in vignettes code: `Error: While trying to set variable labels, some requested columns could not be found in data.frame: 'wrong_column_name'` #5

Open barracuda156 opened 5 months ago

barracuda156 commented 5 months ago

Could you say what may cause this to fail?

--->  Testing R-tinylabels
Executing:  cd "/opt/local/var/macports/build/_opt_PPCSnowLeopardPorts_R_R-tinylabels/R-tinylabels/work/tinylabels" && /opt/local/bin/R CMD check ./tinylabels_0.2.4.tar.gz --no-manual --no-build-vignettes 
* using log directory ‘/opt/local/var/macports/build/_opt_PPCSnowLeopardPorts_R_R-tinylabels/R-tinylabels/work/tinylabels/tinylabels.Rcheck’
* using R version 4.4.0 (2024-04-24)
* using platform: powerpc-apple-darwin10.0.0d2 (32-bit)
* R was compiled by
    gcc-mp-13 (MacPorts gcc13 13.2.0_4+stdlib_flag) 13.2.0
    GNU Fortran (MacPorts gcc13 13.2.0_4+stdlib_flag) 13.2.0
* running under: OS X Snow Leopard 10.6
* using session charset: UTF-8
* using options ‘--no-manual --no-build-vignettes’
* checking for file ‘tinylabels/DESCRIPTION’ ... OK
* this is package ‘tinylabels’ version ‘0.2.4’
* 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 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 ‘tinylabels’ 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 code 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 whether startup messages can be suppressed ... 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 ... 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 installed files from ‘inst/doc’ ... OK
* checking files in ‘vignettes’ ... OK
* checking examples ... OK
* checking for unstated dependencies in ‘tests’ ... OK
* checking tests ...
  Running ‘testthat.R’
 OK
* checking for unstated dependencies in vignettes ... OK
* checking package vignettes ... OK
* checking running R code from vignettes ...
  ‘specification.Rmd’ using ‘UTF-8’... OK
  ‘tinylabels_vignette.Rmd’ using ‘UTF-8’... failed
 ERROR
Errors in running code in vignettes:
when running code in ‘tinylabels_vignette.Rmd’
  ...
$yield
[1] "Pea yield"

> variable_label(npk) <- c(wrong_column_name = "A supposedly terrific label")

  When sourcing ‘tinylabels_vignette.R’:
Error: While trying to set variable labels, some requested columns could not be found in data.frame:
'wrong_column_name'
Execution halted

* checking re-building of vignette outputs ... SKIPPED
* DONE

Status: 1 ERROR
mariusbarth commented 5 months ago

Hi @barracuda156,

It seems like the chunk option error = TRUE is not handled properly by knitr if option --no-build-vignettes is set, see yihui/knitr#2338. I added one more chunk option to allow testing with --no-build-vignettes set.

Can you confirm that this works with your current setup?