[R-pkg-devel] fixing problems in submitted R package

Duncan Murdoch murdoch@dunc@n @end|ng |rom gm@||@com
Fri Sep 4 21:18:06 CEST 2020


On 04/09/2020 12:41 p.m., Vitor Hugo Moreau wrote:
> Hello, all.
> 
> I have submitted a R package and it returns some NOTES from the automatic
> checks. It is the first time I create and deposit a package so I would like
> to know what to do. My package was built with Rstudio and it gave some of
> these NOTES too, bby I don't know how to solve them.
> These are the NOTES:
> 
> 1.
> The build time stamp is missing.

This is because you didn't use R CMD build to build your package.
> 
> 2.
> * checking CRAN incoming feasibility ... NOTE
> Maintainer: ‘The package maintainer <vitorhmc using ufba.br>’
> 
> "I don't even know what is wrong here, this is my professional email.
> Should I just ignore it?"

If the text "The package maintainer" is in your DESCRIPTION file, you 
should replace it with your name.

> 
> 3.
> * checking DESCRIPTION meta-information ... NOTE
> Checking should be performed on sources prepared by ‘R CMD build’.

Same as 1.

> 
> 4.
> checking R code for possible problems ... [4s/4s] NOTE
> 
> likelihood: no visible binding for global variable ‘xi’
> likelihood: no visible binding for global variable ‘yi’
> weibull4.fit: no visible binding for '<<-' assignment to ‘xi’
> weibull4.fit: no visible binding for '<<-' assignment to ‘yi’
> weibull4.fit: no visible binding for global variable ‘yi’
> weibull4.fit: no visible binding for global variable ‘xi’
> Undefined global functions or variables:
>    xi yi
> 
> "There are two variable defined globally (xi and yi) and they are used
> for some - not all - functions. Is this really a problem or can I
> ignore it too?"

You can't ignore it.  You need to make sure xi and yi are defined in the 
source of your package, and they shouldn't be the top level if you are 
modifying them. It's possible but tricky to have global in packages, and 
it would be best to just avoid the problem by not having them.
> 
> 5.
> * checking Rd files ... NOTE
> prepare_Rd: likelihood.Rd:15-16: Dropping empty section \details
> prepare_Rd: likelihood.Rd:25-26: Dropping empty section \note
> prepare_Rd: likelihood.Rd:28-29: Dropping empty section \seealso
> prepare_Rd: posterior.Rd:17-18: Dropping empty section \details
> prepare_Rd: posterior.Rd:28-29: Dropping empty section \note
> prepare_Rd: posterior.Rd:31-32: Dropping empty section \seealso
> prepare_Rd: prior.Rd:17-18: Dropping empty section \details
> prepare_Rd: prior.Rd:28-29: Dropping empty section \note
> prepare_Rd: prior.Rd:31-32: Dropping empty section \seealso
> prepare_Rd: proposalfunction.Rd:15-16: Dropping empty section \details
> prepare_Rd: proposalfunction.Rd:26-27: Dropping empty section \note
> prepare_Rd: proposalfunction.Rd:29-30: Dropping empty section \seealso
> prepare_Rd: run_metropolis_MCMC.Rd:20-21: Dropping empty section \details
> prepare_Rd: run_metropolis_MCMC.Rd:31-32: Dropping empty section \note
> prepare_Rd: run_metropolis_MCMC.Rd:34-35: Dropping empty section \seealso
> prepare_Rd: weibull4.Rd:37-38: Dropping empty section \seealso
> prepare_Rd: weibull4.fit.Rd:57-58: Dropping empty section \seealso
> 
> "Is it a real problem to drop some empty sections in some MAN files. These
> functions will not be direct used by users"

If they aren't functions that the users will see, then they don't need 
to be exported and documented.

Duncan Murdoch

> 
> Thank you a lot and sorry for so basic questions.
> 
> Prof. Vitor Hugo Moreau, Ph.D.
> Departamento de Biotecnologia
> Universidade Federal da Bahia - UFBA
> 
> 	[[alternative HTML version deleted]]
> 
> ______________________________________________
> R-package-devel using r-project.org mailing list
> https://stat.ethz.ch/mailman/listinfo/r-package-devel
>



More information about the R-package-devel mailing list