* using log directory ‘/home/hornik/tmp/R.check/r-devel-clang/Work/PKGS/formatBibtex.Rcheck’
* using R Under development (unstable) (2025-02-26 r87830)
* using platform: x86_64-pc-linux-gnu
* R was compiled by
    Debian clang version 19.1.7 (1+b1)
    Debian flang-new version 19.1.7 (1+b1)
* running under: Debian GNU/Linux trixie/sid
* using session charset: UTF-8
* checking for file ‘formatBibtex/DESCRIPTION’ ... OK
* this is package ‘formatBibtex’ version ‘0.1.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 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 ‘formatBibtex’ can be installed ... OK
See 'https://www.r-project.org/nosvn/R.check/r-devel-linux-x86_64-debian-clang/formatBibtex-00install.html' for details.
* checking package directory ... OK
* checking for future file timestamps ... 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 ... [0s/0s] OK
* checking whether the package can be loaded with stated dependencies ... [0s/0s] OK
* checking whether the package can be unloaded cleanly ... [0s/0s] OK
* checking whether the namespace can be loaded with stated dependencies ... [0s/0s] OK
* checking whether the namespace can be unloaded cleanly ... [0s/0s] OK
* checking loading without being on the library search path ... [0s/0s] OK
* checking whether startup messages can be suppressed ... [0s/0s] 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 ... [4s/5s] OK
* checking Rd files ... [0s/0s] OK
* checking Rd metadata ... OK
* checking Rd line widths ... 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 examples ... [0s/1s] ERROR
Running examples in ‘formatBibtex-Ex.R’ failed
The error most likely occurred in:

> base::assign(".ptime", proc.time(), pos = "CheckExEnv")
> ### Name: format_bibtex_entry
> ### Title: Format BibTeX Entries in An Opinionated Way
> ### Aliases: format_bibtex_entry format_bibtex_file
> 
> ### ** Examples
> 
> library(formatBibtex)
> 
> ## example BibTeX file that needs formatting
> example_bib <- system.file("examples/example.bib", package = "formatBibtex")
> print(readLines(example_bib), quote = FALSE)
 [1] @article{andersen1982cox,                                                       
 [2]   title = {Cox's regression model for counting processes: a large sample study},
 [3]   author = {Andersen, Per Kragh and Gill, Richard D},                           
 [4]   journal = {the annals of statistics},                                         
 [5]   volume = {10},                                                                
 [6]   number = {4},                                                                 
 [7]   pages = {1100-1120},                                                          
 [8]   year = {1982},                                                                
 [9]   publisher = {JSTOR}                                                           
[10] }                                                                               
[11]                                                                                 
[12] @book{chen2012monte,                                                            
[13]   title={Monte Carlo methods in Bayesian computation},                          
[14]   author={Chen, Ming-Hui and Shao, Qi-Man and Ibrahim, Joseph G},               
[15]   year={2012},                                                                  
[16]   publisher={Springer Science \\& Business Media}                               
[17] }                                                                               
[18]                                                                                 
[19] @article{wu1983convergence,                                                     
[20]   title={On the convergence properties of the EM algorithm},                    
[21]   author={Wu, C.F. Jeff},                                                       
[22]   journal={The Annals of statistics},                                           
[23]   pages={95--103},                                                              
[24]   year={1983},                                                                  
[25]   publisher={JSTOR}                                                             
[26] }                                                                               
> 
> ## needs the package bibtex
> has_bibtex <- requireNamespace("bibtex", quietly = TRUE)
> 
> ## example of format_bibtex_entry()
> if (has_bibtex) {
+     bib <- bibtex::read.bib(example_bib)
+     ## check the default words that need protection by curly braces
+     (default_words <- getOption("formatBibtex.protected_words"))
+     format_bibtex_entry(bib, protected_words = c(default_words, "SMEM"))
+ }
Error in gsub(as.character(pattern), as.character(replacement), x, ignore.case,  : 
  NA in coercion to Rboolean
Calls: format_bibtex_entry ... lapply -> FUN -> format_string -> do.call -> <Anonymous>
Execution halted
* checking PDF version of manual ... [4s/6s] OK
* checking HTML version of manual ... [0s/0s] OK
* checking for non-standard things in the check directory ... OK
* DONE
Status: 1 ERROR