search for: getanywhere

Displaying 20 results from an estimated 257 matches for "getanywhere".

2008 Oct 14
2
getAnywhere
Hi List, I am trying to look up an object using getAnywhere, where the object I am looking for is given by the _value_ of the variable I am looking for. Since getAnywhere calls substitue on its argument it is looking for an object with the name of the argument not its value. Is there a way to work around this, or do I have to make my own getAnywhere without...
2003 Sep 24
1
getAnywhere (PR#4275)
'getAnywhere' is not reporting methods when there are periods in the class name or the generic name (in R-devel). > getAnywhere( 'predict.loess') A single object matching 'predict.loess' was found It was found in the following places registered S3 method for predict from namespace mod...
2005 Feb 11
3
getAnywhere and functions starting with "." (PR#7684)
Full_Name: Mark Bravington Version: 2.0.1 OS: Windows XP Submission from: (NULL) (140.79.22.104) 'getAnywhere' crashes when its argument starts with a period: > getAnywhere( '.onLoad') Error in exists(x, envir, mode, inherits) : invalid first argument One fix might be to replace the line if ( !is.null(f <- getS3method(gen, cl, TRUE))) { with if ( nchar( gen) && !is.n...
2003 Jul 11
1
getAnyhwhere behavior
I would have expected the function getAnywhere to have behaved differently in the following: > search() [1] ".GlobalEnv" "file:C:/R/Rdata/miya/.Rdata" [3] "package:boot" "package:methods" [5] "package:ctest" "package:mva" [7] "...
2009 Apr 16
1
get() versus getAnywhere()
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. Thanks Ben
2005 Feb 03
1
getAnywhere
Shouldn't this work? > .a <- 5 > exists(".a") [1] TRUE > getAnywhere(".a") Error in exists(x, envir, mode, inherits) : invalid first argument getAnywhere doesn't seem to like the "." prefix. Is this a bug? Thanks, Robert Robert McGehee Geode Capital Management, LLC 53 State Street, 5th Floor | Boston, MA | 02109 Tel: 617/392-8396 Fax:...
2007 Sep 21
2
getAnywhere
Hello, How can I see a function called "+.dlm"? > methods("+") [1] +.Date +.dlm* +.POSIXt Non-visible functions are asterisked > getAnywhere("+.dlm") Error in grep(pattern, x, ignore.case, extended, value, fixed, useBytes) : invalid regular expression '+\.dlm' Thanks in advance, Giovanni -- Giovanni Petris <GPetris at uark.edu> Department of Mathematical Sciences University of Arkansas - Fayetteville, AR 7...
2003 Aug 05
1
(PR#3658)
The function 'getAnywhere' crashes if given a non-existent name containing a period: > getAnywhere( 'nomethod.noclassforme') Error in get(x, envir, mode, inherits) : variable "nomethod" was not found However, 'getAnywhere' behaves gracefully if the non-existent name lacks a period: > g...
2009 Feb 05
4
See source code for survplot function in Design package
Dear R users, I know one way to see the code for a hidden function, say function_x, is using default.function_x (e.g. summary.default). But how can I see the code for imported packages that have no namespace (in this case Design)? Many Thanks Eleni
2012 Feb 24
1
function remains loaded in the search space after detaching the package
I ran into some very irritating behaviour I don't understand. Let me illustrate with the package gdata() and the function print.object_size() : > print(object.size(iris),units='Kb') 6.3 Kb > getAnywhere(print.object_size) A single object matching ?print.object_size? was found It was found in the following places registered S3 method for print from namespace utils namespace:utils with value ... All is well. So now I load gdata > require(gdata) Loading required package: gdata ... The follow...
2006 Apr 05
1
page() (Was: Re: predict.smooth.spline.fit and Recall() (Was: Re: Return function from function and Recall()))
Here I think S3 dispatch is very natural. Try the following: page <- function(x, method = c("dput", "print"), ...) UseMethod("page") page.getAnywhere <- function(x, ..., idx=NULL) { name <- x$name; objects <- x$obj; if (length(objects) == 0) stop("no object named '", name, "' was found"); if (is.null(idx)) { # Include all non-duplicated objects found idx <- (1:length(objects))[!x$dups...
2010 May 28
2
How to get the definition of a function if it is masked by a variable?
Hello, Normally, if I type a function name, it shows the function definition. When the function is masked by a variable with the same name, it doesn't show the function definition any more. Can anyone please tell me a way how to retrieve the function definition even if it is masked by a variable? > x=1:3 > length(x) [1] 3 > length function (x) .Primitive("length") >
2019 Apr 27
2
Suspect error in windows version of 3.60
...Platform: x86_64-w64-mingw32/x64 (64-bit) > > > > Specifically, the menu selection Packages -> install packages fails. > > When invoked, it simply echoes: utils:::menuInstallPkgs() and returns the > prompt. > > > > I found the underlying code with the getAnywhere function. > > It displays: > > getAnywhere(menuInstallPkgs) > > A single object matching 'menuInstallPkgs' was found > > It was found in the following places > > namespace:utils > > with value > > > > function (type = getOption(&...
2007 Feb 05
1
Build error with last R-devel tarball
...lose.socket, combn, compareVersion, co ntrib.url, count.fields, data, data.entry, dataentry, de, de.ncols, de.restore, de.setup, debugger, d emo, download.file, download.packages, dump.frames, edit, emacs, example, file_test, file.edit, find, fix, fixInNamespace, flush.console, formatOL, formatUL, getAnywhere, getFromNamespace, getS3method, glob2rx, head, head.matrix, help, help.search, help.start, history, index.search, install.packages, i nstalled.packages, limitedLabels, loadhistory, localeToCharset, ls.str, lsf.str, make.packages.html, make.socket, memory.limit, memory.size, menu, methods, mirror2ht...
2010 Jul 02
2
S4 classes and debugging - Is there a summary?
...h them. Often I get error messages that don't make sense at all, or the code is not doing what I think it would do. Far too often inspecting the code requires me to go to the source, which doesn't really help in easily finding the bit of code you're interested in. Getting the code with getAnywhere() doesn't always work. Debug() doesn't work. Using trace() and browser() is not an option, as I can't find the correct method. eg : library(raster) > getAnywhere(xyValues) A single object matching ?xyValues? was found It was found in the following places package:raster namespace...
2005 Nov 09
2
read.table error with R 2.2.0
Dear all, I just upgraded version of R to R 2.2.0, and I have a problem with a script that did not happen with my previous version. Here is the error : ----------------------------------------- > param<-read.table(file="param.dat",sep ="\t",header=TRUE,fill=TRUE, na.strings="NA") Erreur dans read.table.default(file = "param.dat", sep =
2015 Oct 13
1
A where() functions that does what exists() does but return the environment when object lives?
On Sat, Oct 10, 2015 at 1:24 AM, Uwe Ligges <ligges at statistik.tu-dortmund.de> wrote: > I'd start looking at getAnywhere(). Thanks Uwe, that does indeed provides "where" information. Unfortunately, I don't see how it will allow me to search environments similarly/in the same order as exists/get(..., envir, inherits=TRUE) does it. getAnywhere() will search everything in any order. It's a start tho...
2006 Apr 05
1
predict.smooth.spline.fit and Recall() (Was: Re: Return function from function and Recall())
...t; > # With extrapolation => Recall() > xextrap <- c(0,x) > ypred <- fcn(xextrap) > # Gives: # Error in Recall(object, xrange) : couldn't find > # function "predict.smooth.spline.fit" > > To see what's the function looks like, do > > pfcn <- getAnywhere("predict.smooth.spline.fit")$obj[[2]] > page(pfcn) > > A workaround is to set the predict.smooth.spline.fit() in .GlobalEnv, i.e. > > predict.smooth.spline.fit <- pfcn > > Does Recall() have a problem because predict.smooth.spline.fit() is > not exported, or wh...
2023 Mar 19
1
ver el código de randomForest
...methods(): > methods(randomForest) [1] randomForest.default* randomForest.formula* Vemos que hay dos métodos. Si no estuviesen  señalados con un asterisco podríamos escribir su nombre en la consola y acceder al código, pero como tiene asterisco, para ver el código deberás usar la función getAnywhere(): getAnywhere(randomForest.default) Un saludo, Marcelino El 19/03/2023 a las 7:51, griera en yandex.com escribió: > Hola: > > No se muy bien si es esto lo que preguntas, pero el código de todos los scripts está en el fichero: > > https://cran.r-project.org/src/contrib/randomFo...
2006 Feb 06
3
decomposed.ts class and method
Dear R People: In the function "decompose", the object has the class of "decomposed.ts". (from package stats) I would like to see the class definition and the method for the plotting. However, when I use isClass("decomposed.ts") I get "FALSE". When I check getMethods("plot") there is no method for plot on decomposed.ts Any suggestions,