Jannis
2013-Apr-08 18:12 UTC
[R] checkUsage from codetools shows errors when function uses functions from loaded packages
Dear list members, I frequently program small scripts and wrap them into functions to be able to check them with checkUsage. In case these functions (loaded via source or copy pasted to the R console) use functions from other packages, I get this error: no visible global function definition for ?xxxxxxx? For example: test = function() { require(plotrix) color.legend() } library(codetools) checkUsage(test) Can I tell codetools somehow where to look for these functions without building a full blown package? Cheers Jannis
Duncan Murdoch
2013-Apr-08 18:25 UTC
[R] checkUsage from codetools shows errors when function uses functions from loaded packages
On 08/04/2013 2:12 PM, Jannis wrote:> Dear list members, > > > I frequently program small scripts and wrap them into functions to be > able to check them with checkUsage. In case these functions (loaded via > source or copy pasted to the R console) use functions from other > packages, I get this error: > > > no visible global function definition for ?xxxxxxx? > > For example: > > > > test = function() { > require(plotrix) > color.legend() > } > > library(codetools) > checkUsage(test) > > > Can I tell codetools somehow where to look for these functions without > building a full blown package?Sure, just attach the other package. For example: > f <- function() plot3d(1,1,1) > library(codetools) > checkUsage(f) <anonymous>: no visible global function definition for ?plot3d? > library(rgl) > checkUsage(f) > Duncan Murdoch
Jannis
2013-Apr-08 18:29 UTC
[R] checkUsage from codetools shows errors when function uses functions from loaded packages
Thanks for your reply, Duncan. I hoped for an auutomatic way without manually having to load the packages to exist ... Perhaps this time this is not the case. Cheers Jannis On 08.04.2013 20:25, Duncan Murdoch wrote:> On 08/04/2013 2:12 PM, Jannis wrote: >> Dear list members, >> >> >> I frequently program small scripts and wrap them into functions to be >> able to check them with checkUsage. In case these functions (loaded via >> source or copy pasted to the R console) use functions from other >> packages, I get this error: >> >> >> no visible global function definition for ?xxxxxxx? >> >> For example: >> >> >> >> test = function() { >> require(plotrix) >> color.legend() >> } >> >> library(codetools) >> checkUsage(test) >> >> >> Can I tell codetools somehow where to look for these functions without >> building a full blown package? > > Sure, just attach the other package. For example: > > > f <- function() plot3d(1,1,1) > > library(codetools) > > checkUsage(f) > <anonymous>: no visible global function definition for ?plot3d? > > library(rgl) > > checkUsage(f) > > > > Duncan Murdoch
Hi all, I am new to meta-analysis. Is there any special package that can calculate "summarized" sensitivity with 95% confidence interval for a diagnostic test, based on sensitivities from several individual studies? Thanks for any suggestions. John ________________________________ From: Jannis <bt_jannis@yahoo.de> To: "r-help@r-project.org" <r-help@r-project.org> Sent: Monday, April 8, 2013 11:12 AM Subject: [R] checkUsage from codetools shows errors when function uses functions from loaded packages Dear list members, I frequently program small scripts and wrap them into functions to be able to check them with checkUsage. In case these functions (loaded via source or copy pasted to the R console) use functions from other packages, I get this error: no visible global function definition for ‘xxxxxxx’ For example: test = function() { require(plotrix) color.legend() } library(codetools) checkUsage(test) Can I tell codetools somehow where to look for these functions without building a full blown package? Cheers Jannis ______________________________________________ R-help@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. [[alternative HTML version deleted]]
Check the mada package for a bivariate approach to sensitivity/specificity. Check the metafor package if trying only to do a meta analysis of a proportion. Nathan On 4/8/13 12:51 PM, "array chip" <arrayprofile at yahoo.com> wrote:>Hi all, I am new to meta-analysis. Is there any special package that can >calculate "summarized" sensitivity with 95% confidence interval for a >diagnostic test, based on sensitivities from several individual studies? > >Thanks for any suggestions. > >John > > >________________________________ > From: Jannis <bt_jannis at yahoo.de> >To: "r-help at r-project.org" <r-help at r-project.org> >Sent: Monday, April 8, 2013 11:12 AM >Subject: [R] checkUsage from codetools shows errors when function uses >functions from loaded packages > >Dear list members, > > >I frequently program small scripts and wrap them into functions to be >able to check them with checkUsage. In case these functions (loaded via >source or copy pasted to the R console) use functions from other >packages, I get this error: > > >no visible global function definition for ?xxxxxxx? > >For example: > > > >test = function() { > require(plotrix) > color.legend() >} > >library(codetools) >checkUsage(test) > > >Can I tell codetools somehow where to look for these functions without >building a full blown package? > > > >Cheers >Jannis > >______________________________________________ >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. > [[alternative HTML version deleted]] >