On 4/16/2009 9:52 AM, Benjamin Tyner wrote:
Hi
Using R 2.8.1. I have list object called "AuxData". Inside a browser(),
get("AuxData")
succeeds, while
getAnywhere("AuxData")
fails with the error "no object named âAuxDataâ was found". I'm
curious to know if this could be a bug. If yes, I'll try to come up
with a reproducible example.
It's not a bug. getAnywhere doesn't really mean "anywhere", it means
"visible on the search path, registered as an S3 method or in a name
space but not exported." On the other hand, the browser will show you
the local evaluation frame. So I'd expect the browser to be able to see
x below, but getAnywhere wouldn't find it, because it's not in one of
the places listed above.
f <- function(x) {
browser()
getAnywhere("x")
}
f(1)
______________________________________________
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.