search for: showmethods

Displaying 20 results from an estimated 122 matches for "showmethods".

2005 Jun 02
1
showMethods doubt
Hi, I'm developing in S4 and I wanted to see the methods for a specific class using showMethods but I didn't succed. Can someone help ? See the example below. setClass("myclass", representation( name ="character" ) ) setGeneric("mymeth", function(obj, ...){ standardGeneric("mymeth") } ) setMethod("mymeth", signature("myclass...
2006 Oct 17
1
Caching bug with showMethods?
showMethods isn't reporting inherited methods when it is first called. The methods are there and after calling them, showMethods gives the right output. Here is an example (using R-devel r39647): setClass("A", representation(x="numeric"), prototype=list(x=1)) setClass(&quot...
2009 Jul 29
1
RFC: methods() and showMethods() {was "debug"}
...omewhat related issue: As many of the R-devel readers will know, there has been quite a nice ongoing effort to make S3 and S4 methods and classes more compatible. One issue here, notably for inexperienced programmeRs, is also the fact that methods(f) only tells about S3-methods for 'f', and showMethods(f) only mentions S4 ones. This is not at all design error, as indeed S3 and S4 dispatch is quite different (notably as the latter allows multiple dispatch and hence uses the nice concept of "signature"), used to be more incompatible and, indeed, methods(f) *still* warns, often wrongly, i...
2009 Feb 25
1
Unexpected side effect of the ":::" operator on the value of isGeneric
Hi, when running the following on a fresh R, library("IRanges") annotation showMethods("annotation") Biobase:::annotation showMethods("annotation") I get (see the "^^^^^" marked output at the bottom): > library("IRanges") Carico il pacchetto richiesto: 'IRanges' The following object(s) are masked from package:base : cbi...
2002 Nov 05
1
function showMethods and inheritance
...y (deep) misunderstanding of the concepts in the package 'methods'. I have a class 'A', and a class 'B' inheriting 'A' (so defined with 'setClass' and the parameter 'contains="A"'. The class A has a method 'mymethod'. A call to 'showMethods("mymethod")' return the signature of the function with A, but not with B no matter whether I specify 'inherited=TRUE' or not... Any pointer ? Thanks in advance, Laurent -.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.- r-help mailing list -- R...
2011 Mar 04
3
Generic mixup?
Hello list. This is from an R session (admittedly, I''m still using R 2.11.1): > print function (x, ...) UseMethod("print") <environment: namespace:base> > showMethods("print") Function "print": <not a generic function> Don''t the two results contradict each other? Or do I have a terrible misunderstanding of what comprises a generic function? Thx, Nick Sabbe -- ping: nick.sabbe@ugent.be link: <http://biom...
2016 Mar 03
2
as.vector in R-devel loaded 3/3/2016
...ards to as.vector. When I looked at the code for as.vector in R-devel it is standardGeneric for "as.vector" defined from package "base" function (x, mode) standardGeneric("as.vector") <environment: 0x0918ad70> Methods may be defined for arguments: x, mode Use showMethods("as.vector") for currently available ones. The code from R3.2.3 is > as.vector function (x, mode = "any") .Internal(as.vector(x, mode)) <bytecode: 0x02dfb858> <environment: namespace:base> > Is default for mode missing as I suspect or will mode be required f...
2012 Mar 24
2
RC / methods package
...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, TSrepresentation="timeSeries") Note: Method with signatu...
2012 Apr 24
2
How do i read the source code of "biplot"?
> biplot standardGeneric for "biplot" defined from package "stats" function (x, ...) standardGeneric("biplot") <environment: 0x0d4444d8> Methods may be defined for arguments: x Use showMethods("biplot") for currently available ones. > > > showMethods("biplot") Function: biplot (package stats) x="ANY" x="character" (inherited from: x="ANY") x="Pca" > biplot(resRobPCA) But how do I get the source code of &quo...
2014 Jul 11
1
Namespaces and S4 Generics
...vel version none of these options have the intended effect of making "image" a generic and allowing R to dispatch for matrix.csr objects. When I omit the setGeneric() call, I do get a message at INSTALL time that a generic for image is being created, but then after loading SparseM: > showMethods(image) Function "image": <not an S4 generic function> On the command line, I can make this work: > setGeneric("image") [1] "image" > showMethods(image) Function: image (package graphics) x="ANY" x="matrix.csr" And -- even more irritat...
2003 Sep 05
2
S4 Method Collisions with "[" (PR#4075)
...annaffy use S4 classes to define methods for "[". Both packages use the save image method of installation. (See annaffy 1.0.3 in BioC CVS.) Depending on how both packages are loaded, the Biobase definitions seem to be getting masked out: > library(Biobase) > library(annaffy) > showMethods("[") Function "[": x = "ANY" x = "container" x = "phenoData" x = "exprSet" x = "aafList" x = "aafTable" > library(annaffy) (annaffy loads Biobase in .First.lib) > showMethods("[") Function "[&quo...
2007 May 27
2
[Bioc-devel] promptClass
...more useful output. You might want to > report the issue on one of the R lists. > >> Since PromptClass() contains a parameter "where" is it possible to use >> it, and how? > > I'm not sure that is relevant here. > > One thing that can be useful here is showMethods(classes="AffyBatch"). > The problem with static documentation for methods is that what methods > are available can change based on what packages are attached. > > If showMethods or a wrapper for it could be convinced to output a link > to a help file, then it might actually...
2012 Aug 22
1
loading both RPostgreSQL and RSQLite leads to problems
...> library(RSQLite) > dbDriver('PostgreSQL') Error in function (classes, fdef, mtable) : unable to find an inherited method for function "show", for signature "PostgreSQLDriver" ========================================================== below is the output of showMethods('show') in two scenarios: (1) RPostgreSQL loaded, RSQLite not loaded; (2) RPostgreSQL loaded, RSQLite loaded (in that order). i'd be grateful for any help resolving or working around this issue. if possible, please include my email address in any reply. best jon mcauliffe jon at mcauli...
2010 May 21
1
S4 method defined but not used
...class(nancycats) [1] "genind" attr(,"package") [1] "adegenet" > nancycats[1] Error in nancycats[1] : object of type 'S4' is not subsettable # "[" IS NOT USED HERE ### end R code And still, the method is defined in the environment: ### R code > showMethods("[", class="genind") Function: [ (package base) x="genind" > findMethods("[", classes="genind")$genind Method Definition: function (x, i, j, ..., drop = FALSE) { .local <- function (x, i, j, ..., loc = NULL, treatOther = TRUE,...
2006 Apr 09
2
type converters not being saved to workspace
Any one can explain why this happens or any work arounds? > setClass('foo') [1] "foo" > setAs('foo', 'character', function(from) from) > showMethods('coerce') Function "coerce": from = "ANY", to = "array" from = "ANY", to = "call" from = "ANY", to = "character" from = "ANY", to = "complex" from = "ANY", to = "environment" from...
2006 Apr 09
2
type converters not being saved to workspace
Any one can explain why this happens or any work arounds? > setClass('foo') [1] "foo" > setAs('foo', 'character', function(from) from) > showMethods('coerce') Function "coerce": from = "ANY", to = "array" from = "ANY", to = "call" from = "ANY", to = "character" from = "ANY", to = "complex" from = "ANY", to = "environment" from...
2010 Jul 02
2
S4 classes and debugging - Is there a summary?
...e following places package:raster namespace:raster with value standardGeneric for "xyValues" defined from package "raster" function (object, xy, ...) standardGeneric("xyValues") <environment: 0x04daf14c> Methods may be defined for arguments: object, xy Use showMethods("xyValues") for currently available ones. > showMethods("xyValues") Function: xyValues (package raster) object="Raster", xy="data.frame" object="Raster", xy="SpatialPoints" object="Raster", xy="vector" object="...
2009 Oct 23
1
inspect s4 methods
Hi everyone, I'm sure this has been asked before, but I could not find the right search terms to find it. If I want to see what summarizing a model fit with lm() does, I can write "summary.lm". But what if I want to see what summarizing a model fit with lmer() (lme4 package) does? showMethods(summary) Function: summary (package base) object="ANY" object="character" (inherited from: object="ANY") object="mer" object="sparseMatrix" object="summary.mer" tells me there is a "mer" method, but "summary.mer"...
2005 Jan 13
1
how to use solve.QP
At the risk of ridicule for my deficient linear algebra skills, I ask for help using the solve.QP function to do portfolio optimization. I am trying to following a textbook example and need help converting the problem into the format required by solve.QP. Below is my sample code if anyone is willing to go through it. This problem will not solve because it is not set up properly. I hope I
2012 Oct 01
1
False positive note about ambiguous dispatch
...new("A", stuff = as.complex(from)) Signatures: from to target "numeric" "A" defined "ANY" "A" showMethod gives me an overview of the situation (which is much simpler/cleaner than what the note is suggesting): > showMethods("coerce") Function: coerce (package methods) from="ANY", to="A" ... from="integer", to="A" (inherited from: from="ANY", to="A") ... from="numeric", to="A" (inherited from: from=...