Re: [R] R CMD check warning

From: Uwe Ligges <ligges_at_statistik.tu-dortmund.de>
Date: Fri, 06 May 2011 16:48:02 +0200

On 05.05.2011 21:20, Ray Brownrigg wrote:
> On 6/05/2011 6:06 a.m., swaraj basu wrote:
>> Dear All,
>> I am trying to build a package for a set of functions. I am
>> able to build the package and its working fine. When I check it with
>> R CMD check
>>
>> I get a following warning : no visible global function
>> definition for ‘biocLite’
>>
>> I have used biocLite to load a user defined library from
>> within a function if that library is not pre-installed
>>
>> if(is.element(annotpkg, installed.packages()[,1]) == "FALSE"){
>> source("http://www.bioconductor.org/biocLite.R")
>> biocLite(annotpkg)
>> library(annotpkg,character.only=TRUE)
>> }
>>
>> Should I ignore this error or there is a workaround for the
>> warning. My package is working fine though still I guess the warning
>> has to
>> have significance. Please help in clarifying this
>> warning.
>>
> Your source() call generates the function biocLite() in such a way that
> R CMD check cannot know, so a workaround is to precede the source()
> statement with something like:
> biocLite <- function(x) 0
>
> [I don't know if there is a 'best' way to do this.]
>
> In general Warnings are just that - they point you to a possible fault,
> but there is not enough information for the code to make a final
> determination.

Or just set ask people (or try yourself) to use install.packages() with the corresponding BioC repository selected. I still do not get the point why install.packages() and friends are not sufficient.

Best,
Uwe

> HTH
> Ray Brownrigg
>
> ______________________________________________
> R-help_at_r-project.org mailing list
> https://stat.ethz.ch/mailman/listinfo/r-help
> PLEASE do read the posting guide
> http://www.R-project.org/posting-guide.html
> and provide commented, minimal, self-contained, reproducible code.



R-help_at_r-project.org mailing list
https://stat.ethz.ch/mailman/listinfo/r-help PLEASE do read the posting guide http://www.R-project.org/posting-guide.html and provide commented, minimal, self-contained, reproducible code. Received on Fri 06 May 2011 - 14:50:22 GMT

This quarter's messages: by month, or sorted: [ by date ] [ by thread ] [ by subject ] [ by author ]

All messages

Archive maintained by Robert King, hosted by the discipline of statistics at the University of Newcastle, Australia.
Archive generated by hypermail 2.2.0, at Fri 06 May 2011 - 15:50:05 GMT.

Mailing list information is available at https://stat.ethz.ch/mailman/listinfo/r-help. Please read the posting guide before posting to the list.

list of date sections of archive