[R-pkg-devel] [R] Please to remove the warning when trying to check a package.
Duncan Murdoch
murdoch.duncan at gmail.com
Thu Dec 7 15:19:45 CET 2017
On 07/12/2017 4:43 AM, Pijush Das wrote:
> Hello Sir,
>
>
>
> I have been trying to create a package in R.
> When I have put the check option in R studio to check everything is ok that
> time I have found
> two warnings and three notes. Those are given below.
>
> warnings:
> 1) * checking dependencies in R code ... WARNING
> '::' or ':::' import not declared from: 'SparseM'
> 'loadNamespace' or 'requireNamespace' calls not declared from:
> 'Matrix' 'SparseM'
Your DESCRIPTION file should list every package from which you are
importing functions. The usual place is in an item called "Imports";
"Suggests" might also be appropriate if the functions are only
occasionally used (and you test for the presence of the optional package).
>
> 2) * checking files in 'vignettes' ... WARNING
> Files in the 'vignettes' directory but no files in 'inst/doc':
> 'vignettes.Rmd', 'vignettes.pdf'
You probably missed another declaration in DESCRIPTION, i.e.
VignetteBuilder: knitr
Without this, R won't know that vignettes.Rmd is a vignette.
>
> Notes:
> 1) * checking foreign function calls ... NOTE
> Foreign function call to a different package:
> .C("svmpredict", ..., PACKAGE = "e1071")
> See chapter 'System and foreign language interfaces' in the 'Writing R
> Extensions' manual.
It's usually a bad idea to call directly to C code in another package.
You'll need to read the referenced manual if you really want to do that.
>
> 2) * checking R code for possible problems ... NOTE
> predict.packageXXX: no visible global function definition for 'as'
> predict.packageXXX: no visible global function definition for 'new'
> Undefined global functions or variables:
> as new
> Consider adding
You cut off the advice that followed "Consider adding". You should
follow that advice.
>
> 3) * checking DESCRIPTION meta-information ... NOTE
> Packages listed in more than one of Depends, Imports, Suggests, Enhances:
> 'e1071' 'nlme' 'openxlsx' 'pheatmap' 'RColorBrewer' 'R.rsp'
> A package should be listed in only one of these fields.
Just figure out which of those fields you want, and put the package
names in just one of them.
>
>
>
> Can anybody help me to short out those problem please ?
>
>
> Thank you very much.
>
>
> regards
> Pijush
>
> [[alternative HTML version deleted]]
Generally R mailing lists are plain text. Your message was readable as
you posted it, but if you had added code, it would likely be a mess.
Please configure your mail program to post in plain text.
Duncan Murdoch
More information about the R-package-devel
mailing list