[R] R CMD check: no visible binding for global variable
William Dunlap
wdunlap at tibco.com
Tue May 17 02:57:46 CEST 2011
If you install you package does the following work
in a fresh R session
library(yourPackage)
annotIndex
or do you need to say data(annotIndex) before using
that object? (This may depend on whether yourPackage
uses a namespace or not.) If so then adding the line
LazyData: yes
to DESCRIPTION should eliminate the need for the call
to data(annotIndex) and make check happy as well.
It works for me with R 2.13.0 on Linux.
I am not an expert on the details of the DESCRIPTION
and NAMESPACE files in R packages and others who know
better will probably chime in.
Bill Dunlap
Spotfire, TIBCO Software
wdunlap tibco.com
> -----Original Message-----
> From: r-help-bounces at r-project.org
> [mailto:r-help-bounces at r-project.org] On Behalf Of swaraj basu
> Sent: Monday, May 16, 2011 11:06 AM
> To: r-help at r-project.org
> Subject: [R] R CMD check: no visible binding for global variable
>
> Dear All,
> I have built a package which has a data.frame
> "annotIndex.rda
> in its "data" folder.
> I am using this data frame within two functions
> in my package.
>
> Though my package works fine, yet when I do a
> R CMD check
>
> to my package I get the following two notes
>
> get.affy.ensembl: no visible binding for global variable
> 'annotIndex'
> get.affy.id: no visible binding for global variable
> 'annotIndex'
>
> I need help in understanding these notes, and
> how can I avoid
> them.
>
> yours sincerely,
> Swaraj Basu
>
> [[alternative HTML version deleted]]
>
>
More information about the R-help
mailing list