similar to: Generic Functions

Displaying 20 results from an estimated 4000 matches similar to: "Generic Functions"

2009 Jul 29
1
RFC: methods() and showMethods() {was "debug"}
(a new thread, on purpose) >>>>> "RobG" == Robert Gentleman <rgentlem at fhcrc.org> >>>>> on Mon, 27 Jul 2009 16:55:50 -0700 writes: RobG> Hi, I just committed a change to R-devel so that if RobG> debug is called on an S3 generic function, all methods RobG> will also automatically have debug turned on for them RobG>
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
2004 Dec 09
2
wishlist -- names gives slotnames (PR#7410)
Full_Name: Elizabeth Purdom Version: 1.9.1 OS: Windows XP Submission from: (NULL) (171.64.102.199) It would be nice if names(obj) would give slot names as well. Since for many people slots are new, the first thing that happens is you try to access what's in them and can't find how to do it. If you don't know that slotNames() exists, it can be very frustrating. Moreover, if you
2012 Mar 24
2
RC / methods package
(I think this is being caused by the new methods package in RC.) In the RC (March 24) some of my packages are generating a Note Note: Method with signature "MySQLConnection#integer" chosen for function "coerce", target signature "TSMySQLConnection#integer". "dbObjectId#integer" would also be valid This is coming from a call to dbGetQuery() in package
2013 Mar 13
1
S4 generic not exported correctly / incorrect dispatch?
In this post https://stat.ethz.ch/pipermail/bioc-devel/2013-March/004152.html a package author reports that S4 dispatch fails. I can reproduce this with a PkgA (attached; 'intervals' is a relatively light-weight CRAN package) that has DESCRIPTION with Depends: intervals Imports: graphics NAMESPACE: importFrom(graphics, "plot") export("plot")
2010 May 21
1
S4 method defined but not used
Dear R developers, I am having a slightly weird issue with a S4 method defined in my package adegenet 1.2-4, with R 2.11.0. As far as I know, the problem is new, and the code implementing the method has not changed for more than a year and worked well so far. The problem is the following. I define, in the package, a method "[" for the S4 class 'genind'. The method's
2014 Jul 11
1
Namespaces and S4 Generics
I've installed R-devel R Under development (unstable) (2014-07-09 r66111) Platform: x86_64-apple-darwin13.1.0 (64-bit) and am trying to resolve some problems that I am seeing with my SparseM package. In prior versions I explicitly had: setGeneric("image", function(x, ...) standardGeneric("image")) and then used setMethod to define a method for the class matrix.csr but
2009 Jan 30
1
Methods not loaded in R-Devel vs 2.8.1
Dear list-member, I am currently developing a package with S4 classes. The NAMESPACE and DESCRIPTION is printed below. Within this package I have set a method "residuals" for two classes. In version 2.8.1 these two are reported whereas in R-Devel (2009-01-28 r47766). What have I missed? What has changed and how can I rectify the issue? Your help and pointers are welcome. For 2.8.1:
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"
2014 Oct 07
1
Issue installing Matrix Package
Hi, I installed R-3.1.1 on AIX-5.3 and my installation hanged up while installing Matrix Package. so i killed the gmake ; gmake install the software nad tired installing Matrix package manually - [ncmr0202][/gpfs1/home/shivali/gang/R-3.1.1/bin/package]> /gpfs1/home/shivali/gang/R-3.1.1/bin/R CMD INSTALL Matrix the package compiled successfully but while loading Matrix package the
2008 Jun 08
1
R CMD CHECK WARNING inappropriate for S4 method?
The package 'graph' defines classes graph and graphNEL (extending graph) and a union,graph,graph-method. These are all exported and fully documented. The package 'GSEABase' Imports: graph and importClassesFrom(graph, graphNEL). GSEABase defines methods on union for its own classes (not graph / graphNEL), and has exportMethods(union). union,graph,graph-method is not used in
2006 Jan 19
2
Downloads -- possible bug?
Hi, When I go to the CRAN page to download a new version of R, there are not the same versions available depending on which mirror I pick. When I go to http://cran.cnr.berkeley.edu/, for example, I get 2.2.1, but if I go http://cran.stat.ucla.edu/ the option is 2.2.0 (I'm downloading the Windows base file). Neither refreshing nor clearing my cache changes it. For future reference, I'd
2012 Nov 01
1
GraphNEL object retrieve edgenumber from acc() or is it list of lists?
Hello everyone, Im working with graphNEL object and want to extract all the nodes which have adjacent nodes with at least 20 nodes in between them. acc(graph, graphnodes) obviously provides a list for the accessable nodes of every node from a node and a number of the edges between them. Like this: $`hsa:8379` hsa:100131844 hsa:10393 hsa:246184 hsa:29882 hsa:29945 1
2006 Jan 30
2
'all' inconsistent?
Hello, I came across the following behavior, which seems illogical to me. I don't know if it is a bug or if I'm missing something: > all(logical(0)) [1] TRUE > any(logical(0)) [1] FALSE > isTRUE(logical(0)) [1] FALSE This actually came up in practice when I did something like > all( names(x) %in% vec ) as an error-handling, and I was hoping that it would work regardless
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",
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("B", contains="A", prototype=list(x=2))
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 :
2004 Sep 28
3
sapply behavior
Hi, I use sapply very frequently, but I have recently noticed a behavior of sapply which I don't understand and have never seen before. Basically, sapply returns what looks like a matrix, says it a matrix, and appears to let me do matrix things (like transpose). But it is also a list and behaves like a list when I subset it, not a vector (so I can't sort a row for instance). I
2011 Mar 22
2
Problem with mclapply -- losing output/data
Hello, I am running large simulations, which unfortunately I can't really replicate here because the code is so extensive. I rely heavily on mclapply, but I realize that I'm losing data somewhere. There are two worrisome symptoms: 1) I am getting 'NULL' as a return value for some (but not all) elements of the output when I use mclapply, but not if I use lapply > tmp2[1:3]
2016 Mar 04
2
as.vector in R-devel loaded 3/3/2016
Er, until _what_ is fixed? I see no anomalies with the version in R-pre: > library(Matrix) > as.vector standardGeneric for "as.vector" defined from package "base" function (x, mode = "any") standardGeneric("as.vector") <environment: 0x7fe8f4516640> Methods may be defined for arguments: x, mode Use showMethods("as.vector") for