[R-pkg-devel] correcting errors in an existing package
Dennis Boos
boo@ @end|ng |rom nc@u@edu
Fri Mar 31 22:51:40 CEST 2023
Recently I got a message from CRAN that my package Monte.Carlo.se (on CRAN
for the last few years) does not pass current testing. There seemed to be
2 problems:
***************************************************************************************************************
1. * checking LazyData ... NOTE
'LazyData' is specified without a 'data' directory
I have this line in my DESCRIPTION file:
LazyData: true
Should I remove that?
*****************************************************************************************************************
2. * checking examples with --run-donttest ... [42s/42s] ERROR
Running examples in ‘Monte.Carlo.se-Ex.R’ failed
The error most likely occurred in:
> pairwise.se(hold,xcol=10:12,summary.f=cv)
Error: object 'hold' not found
Execution halted
***************************************************************************************
So, I put in the R code to generate the data matrix *hold. *But that
brought a host of other errors when checking in Rstudio with
> devtools::check("S:/Documents/srcis/a.projects/Monte.Carlo.isr.and.package/Monte.Carlo.se.March.2023")
I started seeing the following list about standard functions like sd.
N checking R code for possible problems (3.4s)
boot.se: no visible global function definition for 'sd'
boot.var: no visible global function definition for 'var'
corr: no visible global function definition for 'cor'
cv: no visible global function definition for 'sd'
ratio.mean.sdhat.sd: no visible global function definition for 'sd'
ratio.mean.vhat.var: no visible global function definition for 'var'
ratio.sd: no visible global function definition for 'sd'
ratio.var: no visible global function definition for 'var'
varn: no visible global function definition for 'var'
Undefined global functions or variables:
cor sd var
Consider adding
importFrom("stats", "cor", "sd", "var")
to your NAMESPACE file.
But you can't add those functions to NAMESPACE. Well I did but
devtools::build()
gets rid of it. Also, I keep getting the message in the Rstudio check
WARNING
'qpdf' is needed for checks on size reduction of PDFs
but I got the latest versions of R and Rstudio and was able to get
qpdf to install and loaded with library(qpdf), but Rstudio still gives
that message.
So, if anybody has any suggestions, I would appreciate it.
Thanks.
Dennis
--
Dennis Boos email: dennis_boos using ncsu.edu
Department of Statistics Phone: 919-515-1918
NC State University Fax: 919-515-1169
Raleigh, NC 27695-8203 http://www4.stat.ncsu.edu/~boos
Aim for kindness, tolerance, and humility.
[[alternative HTML version deleted]]
More information about the R-package-devel
mailing list