Skip to content

[R-pkg-devel] How to resolve help files with \Sexpr{} warning?

4 messages · @di@@o m@iii@g oii pdx@edu, Iris Simmons, Ivan Krylov

#
Dear R Devs,


I am unsure how to resolve this NOTE in my package build (I am 
comfortable with the possibly misspelled words part):

 Package has help file(s) containing install/render-stage \Sexpr{} 
 expressions but no prebuilt PDF manual.


I've dozens of files and no idea which one(s) offend, or if I am missing 
some other detail. (Aside: I am using mathjaxr... not sure if that is 
the issue.)


Links for winbuilder logs are here for the time being:

 https://win-builder.r-project.org/qG7LHs2Yf18p
 https://win-builder.r-project.org/BBXdLV7kDOuI
 https://win-builder.r-project.org/63RmX21pnrAw ?This check passes


Thank you very much,

Alexis Dinno


PS Am including the log from the R-release winbuilder check in case my 
links expire:


* using log directory 
'd:/RCompile/CRANguest/R-oldrelease/tost.suite.Rcheck'
* using R version 4.4.3 (2025-02-28 ucrt)
* using platform: x86_64-w64-mingw32
* R was compiled by
    gcc.exe (GCC) 13.3.0
    GNU Fortran (GCC) 13.3.0
* running under: Windows Server 2022 x64 (build 20348)
* using session charset: UTF-8
* checking for file 'tost.suite/DESCRIPTION' ... OK
* this is package 'tost.suite' version '3.15'
* package encoding: UTF-8
* checking CRAN incoming feasibility ... [8s] NOTE
Maintainer: 'Alexis Dinno <alexis.dinno at pdx.edu>'

New submission

Possibly misspelled words in DESCRIPTION:
  Kolmogorov (9:402)
  McNemar's (9:198)
  OLS (9:289)
  Smirnov (9:413)
  Stata (9:47)
  Wilcoxon (9:312, 9:340)
  nonparametric (9:546)
  rrp (9:842)
  rrpi (9:855)
  tost (9:18, 9:65, 9:837, 9:850)

Package has help file(s) containing install/render-stage \Sexpr{} 
expressions but no prebuilt PDF manual.
* 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 'tost.suite' can be installed ... OK
* checking installed package size ... OK
* 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 ... [1s] OK
* checking whether the package can be loaded with stated dependencies 
... [1s] OK
* checking whether the package can be unloaded cleanly ... [1s] OK
* checking whether the namespace can be loaded with stated dependencies 
... [1s] OK
* checking whether the namespace can be unloaded cleanly ... [1s] OK
* checking loading without being on the library search path ... [1s] 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 ... [1s] 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 contents of 'data' directory ... OK
* checking data for non-ASCII characters ... [0s] OK
* checking data for ASCII and uncompressed saves ... OK
* checking examples ... [7s] OK
* checking PDF version of manual ... [12s] OK
* checking HTML version of manual ... [5s] OK
* checking for detritus in the temp directory ... OK
* DONE
Status: 1 NOTE
#
I believe R CMD build changed the default from --manual to --no-manual, I'm
not sure why. You could add --manual when you build the tarball or you
could add

BuildManual: TRUE

to your DESCRIPTION.
On Mon, Apr 14, 2025, 09:41 <adinno at pdx.edu> wrote:

            

  
  
#
? Sun, 13 Apr 2025 21:54:03 -0700 (PDT)
adinno at pdx.edu ?????:
This is a relatively recent change (r85348, October 2023). Previously,
R CMD build detected non-build-time dynamic content in the package
documentation and built the manual automatically. Nowadays I think you
have to set BuildManual: yes in your DESCRIPTION before building the
package. (There's R CMD build --no-manual, but I'm not seeing a command
line option to override it from "no" to "yes".)
Correct, that must be what's producing the render-stage dynamic content:

https://github.com/wviechtb/mathjaxr/blob/8900cbbb2eda4dc45b776cc203c2942b6289fac3/man/macros/mathjax.Rd#L4
#
Dear Iris and Ivan, 


Together both your comments were very helpful, and both pointed me at a 
solution to resolve my issue and to explain why this change in behavior 
emerged, and how my package was triggering the behavior.

Solution that worked:

 Editing the DESCRIPTION file to add the line BuildManual: TRUE

Solution that did *not* work (along with variations):
 
 R CMD build --manual  ?Resulted in: Warning: unknown option ?--manual?
 R CMD --manual build
 R --manual CMD build
 R CMD check --manual

Note: I am using R version 4.4.3 (2025-02-28) -- "Trophy Case" on Ubuntu 
24.04


Thank you both very much for this help!

Alexis Dinno