search for: getmethod

Displaying 20 results from an estimated 104 matches for "getmethod".

Did you mean: setmethod
2006 Oct 12
1
getMethods() not finding all methods
Running R2.4.0 on Apple Mac OS X 10.4.8, in Emacs ESS mode, and also R.app. In an attempt to learn a bit more about a particular method (geneNames in package affy) I invoked getMethods("geneNames") which produced geneNames methods, but not the one in affy (output below). I had to know the signature (AffyBatch) in order to find the method > getMethod("geneNames", "AffyBatch") Isn't getMethods() supposed to get them all? Is this a problem,...
2006 Oct 31
4
getMethod(s) and var.test
Hi, How do I retrieve the var.test() function code? I had a similar problem once before with another function but getMethods() solved the problem then. Now I tried several combinations for var.test() without success. Regards benjamin -- Benjamin Otto Universitaetsklinikum Eppendorf Hamburg Institut fuer Klinische Chemie Martinistrasse 52 20246 Hamburg [[alternative HTML version deleted]]
2014 Jan 07
1
Why do methods of "initialize" have no "srcref" attribute as other S4 mehtods?
...used to document it with inlinedocs + (arg ##<< another special comment for the argument + ){ + 2*arg + ### a description for the return value + } + ) [1] "myGen" we can get the whole function definition with comments back by the following snippet: > attr(getMethod("myGen","numeric"),"srcref") function # a function with comments in its source ### that are used to document it with inlinedocs (arg ##<< another special comment for the argument ){ 2*arg ### a description for the return value } >...
2012 Mar 24
2
RC / methods package
...ging for a call several levels deep in the stack is already hard enough. 2/ The note only seems to get generated on the first call and then gets suppressed. This will be nice for users, but makes debugging harder. Is there a way to prevent suppressing the message? 3/ It seems strange that getMethod() cannot find the methods even though showMethods() shows it. (See below.) Paul ________ >showMethods("dbGetQuery") Function: dbGetQuery (package DBI) conn="MySQLConnection", statement="character" > z <- TSget("Series 1", con, TSrepresentatio...
2004 Jul 06
1
questions about setMethod("Arith", ...)
...d (e.g., "+") the new one is valid. (for more details see example code below). Is this intended? Thanks for your help, Matthias, Thomas ########################################################### ## Example code ########################################################### require(distr) getMethods("/") # shows the corresponding methods of "distr" ## now define a new class "track" (see Chambers (1998)) ## and define "/" setClass("track", representation(x = "numeric", y = "numeric")) setMethod("/", signature(&q...
2006 May 22
2
confused by inheritance...
...c(x at b,y) ) x2 <- new("A2", a=1, b=2, c=3) foo(x2) ## gives 3 as it should foo(x2,y=2) ## casts to "A1" and gives (2,2) as it should foo(x2) ## now gives 2 as if x2 were permanently cast to "A1" ## However: x2 ## of class "A2" as it should getMethod("foo",signature(x = "A2", y = "missing", z = "missing")) ## function(x)x at c ### What has happened in the dispatching mechanism between ## in the line foo(x2,y=2) ? I would appreciate any help. Thanks for listening Peter
2009 Jan 30
1
Methods not loaded in R-Devel vs 2.8.1
...fBasics Loading required package: MASS Warning message: package 'gogarch' was built under R version 2.9.0 > showMethods("residuals") Function: residuals (package stats) object="ANY" object="fGARCH" object="Goestml" object="GoGARCH" > getMethod("residuals", "GoGARCH") Method Definition: function (object, ...) { .local <- function (object, standardize = FALSE) { m <- ncol(object at X) n <- nrow(object at X) resl <- lapply(object at models, residuals, standardize = standardi...
2013 Oct 09
1
No warning for conflicting methods?
It would be really nice if R warned you when packages had conflicting methods. For example (and this took me a couple of hours to track down), RMySQL and RPostgreSQL both define setMethod("print", "dbObjectId"), so that: library(RMySQL) getMethod("print", "dbObjectId") library(RPostgreSQL) getMethod("print", "dbObjectId") Obviously it's a bad idea to associate methods with classes that you don't own, but it would be great if R could give some warning in this situation. Hadley -- Chief Sci...
2012 Aug 05
2
setMethod sometimes fails to set package slot when signature has trailing 'ANY'
...) standardGeneric("bar")) setMethod(bar, signature(x="A", y="A"), function(x, y) {}) setMethod(bar, signature(x="A", y="ANY"), function(x, y) {}) the method for signature c("A", "A") contains package information > str(getMethod(bar, c("A", "A"))) Formal class 'MethodDefinition' [package "methods"] with 4 slots ..@ .Data :function (x, y) ..@ target :Formal class 'signature' [package "methods"] with 3 slots .. .. ..@ .Data : chr [1:2] "A" "A&q...
2008 Aug 09
2
levels values of cut()
...cuts <- cut(which(abs(y) < 1e-1), 3) > levels(my.cuts) hist() does not suit me for this, as it does not necessarily respect the number of breaks. getAnywhere hasn't got me very far: I cannot seem to find a readable code for the built-in cut function in the base library. I think getMethod should do it but I don't understand the arguments to pass. Any pointers appreciated, Thanks, baptiste _____________________________ Baptiste Augui? School of Physics University of Exeter Stocker Road, Exeter, Devon, EX4 4QL, UK Phone: +44 1392 264187 http://newton.ex.ac.uk/research/em...
2010 May 21
1
S4 method defined but not used
......, loc = NULL, treatOther = TRUE, drop = FALSE) { if (missing(i)) i <- TRUE if (missing(j)) j <- TRUE pop <- NULL ... # rest of the code of the function ### end R code findMethods and showMethods find the method. However, getMethod doesn't: ### R code > getMethod("[","genind") Error in getMethod("[", "genind") : No method found for function "[" and signature genind ### end R code Now, if I just try the same thing after sourcing the code of the method manually, every...
2009 Sep 09
1
Package that does not work until I re write the exactly the same code
...rary(kml) dn <- as.cld(gald()) kml(dn) # XXX ~ Fast KmL ~ # Erreur dans as.vector(x, mode) : argument 'mode' incorrect --- 8< -------------- So I make some verifications: --- 8< ---- class(dn) # [1] "ClusterizLongData" # attr(,"package") # [1] "kml" getMethod("kml","ClusterizLongData") # Method Definition: # # function (Object, nbClusters = 2:6, nbRedrawing = 20, saveFreq = 100, # maxIt = 200, trajMinSize = 2, print.cal = FALSE, print.traj = FALSE, # imputationMethod = "copyMean", distance, power = 2, centerMethod = m...
2006 Feb 06
3
decomposed.ts class and method
...ar 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, please? Thanks in advance! R Version 2.2.1 Windows Sincerely, Erin Hodgess Associate Professor Department of Computer and Mathematical Sciences University of Houston - Downtown mailto: hodgess at gator.uhd.edu
2004 Sep 22
1
S4 methods and polymorophism
...se: numeric FO: alignment ID: character <ROMA> Object Classe: character FO: font;fontsize;fontcolor;alignment ---------- output --------------- I have succedded adding a method to generic "+" operator, which is initially defined as: > getMethod("+") .Primitive("+") As I understand it, the fact that it is a .Primitive call ensures the default method for any extendion (that is: we can add methods). Now, I try to add a method for length to handle "Collection" classes. > getMethod("length") .Pri...
2010 Jan 20
1
R.oo installation warnings?
...onment R.oo. Warning in setGenericS3.default(name, envir = envir, validators = validators) : Renamed the preexisting function gc to gc.default, which was defined in environment base. Warning in setGenericS3.default(name, envir = envir, validators = validators) : Renamed the preexisting function getMethods to getMethods.default, which was defined in environment base. Warning in setGenericS3.default(name, envir = envir, validators = validators) : Renamed the preexisting function getClasses to getClasses.default, which was defined in environment base. Warning in setMethodS3.default("throw"...
2015 Jan 28
2
[Q] Get formal arguments of my implemented S4 method
Interrogating some (of my own) code in another package. >norm.meth <- getMethod("normalize", "MatrixLike") >message("str(norm.meth)") >str(norm.meth) >message("show(norm.meth at .Data)") >show(norm.meth at .Data) Last show() displays this: function (object, ...) { .local <- function (object, method = c("median...
2013 Jun 17
2
[LLVMdev] vmkit java annotations
...lt ""; } class Annotated { @Red(info = "AWESOME") public void foo(String myParam) { System.out.println("This is " + myParam); } } class TestAnnotationParser { public void parse(Class clazz) throws Exception { Method[] methods = clazz.getMethods(); for (Method method : methods) { if (method.isAnnotationPresent(Red.class)) { Red test = method.getAnnotation(Red.class); String info = test.info(); if ("AWESOME".equals(info)) { System.out.println("info is aweso...
2008 Feb 14
1
finding source for a function
Dear R Gurus: How do you get source for functions which say "UseMethod" when you type in their names, please? I've tried getAnywhere and getMethods...I thought that might produce them. Thanks in advance. Sincerely, Edna
2009 Aug 10
2
Viewing function code
Hi, in the quest of learning from others' codes, I am still stumbling over the problem how to view some of the functions. I know about methods() & getAnywhere(), showMethods(), getMethods() but I still cannot view every function. How would I look at the code of the "merge" function? Thanks a million, Werner -- View this message in context: http://www.nabble.com/Viewing-function-code-tp24895753p24895753.html Sent from the R help mailing list archive at Nabble.com.
2012 Mar 20
1
Plot method for ca.jo
Folks, How would I find the code for a plot function that is in a package? I want to understand exactly what is being plotted. Thanks, KW -- [[alternative HTML version deleted]]