similar to: Generics in base with no ...

Displaying 20 results from an estimated 10000 matches similar to: "Generics in base with no ..."

2007 Mar 27
3
Unexpected result of as.character() and unlist() applied to a data frame
Hi, > dd <- data.frame(A=c("b","c","a"), B=3:1) > dd A B 1 b 3 2 c 2 3 a 1 > unlist(dd) A1 A2 A3 B1 B2 B3 2 3 1 3 2 1 Someone else might get something different. It all depends on the values of its 'stringsAsFactors' option: > dd2 <- data.frame(A=c("b","c","a"), B=3:1, stringsAsFactors=FALSE) > dd2
2014 Mar 27
3
[Bioc-devel] Conflicting definitions for function redefined as S4 generics
On 03/27/2014 02:13 AM, Ulrich Bodenhofer wrote: > I fully agree, Michael, that this would be a great thing to have! I have > often wondered why R and the standard packages are still sticking so > much to the old-style S3 flavor though S4 is part of standard R. I > acknowledge that backward compatibility is important, but, as far as I > got it, redefining a function or S3 generic as
2013 Oct 21
1
Set operation generics
Hi all, Would anyone be interested in reviewing a patch to make the set operations (union, intersect, setdiff, setequal, is.element) generic? Thanks, Hadley -- Chief Scientist, RStudio http://had.co.nz/
2005 Dec 20
1
SVN-REVSION altered when building R-devel out of tree from last snapshot
Hi, Today I downloaded and compiled the last R-devel snapshot. The SVN-REVISION in the tarball contains the following: Revision: 36792 Last Changed Date: 2005-12-18 But after compiling on Unix (I compiled out of tree), I ended up with an SVN-REVSION file containing: Revision: unknown Last Changed Date: Today in the build tree. Then when I start R, I get: R : Copyright Today, The
2014 Mar 26
5
Conflicting definitions for function redefined as S4 generics
That might be worth thinking about generally, but it would still be nice to have the base generics pre-defined, so that people are not copy and pasting the definitions everywhere, hoping that they stay consistent. On Wed, Mar 26, 2014 at 6:13 AM, Gabriel Becker <gmbecker@ucdavis.edu>wrote: > Perhaps a patch to R such that generics don't clobber each-other's method > tables
2006 Jan 05
1
Pb with agrep()
Happy new year everybody, I'm getting the following while trying to use the agrep() function: > pattern <- "XXX" > subject <- c("oooooo", "oooXooo", "oooXXooo", "oooXXXooo") > max <- list(ins=0, del=0, sub=0) # I want exact matches only > agrep(pattern, subject, max=max) [1] 4 OK > max$sub <- 1 # One allowed
2009 Mar 18
1
Why S4 methods of S3 'base' generics are not used in 'base' functions ?
Dear list, It seems that S4 methods defined for an S3 'base' generic are not used in 'base' functions. This can be problematic when 'base' functions start with something like 'as.matrix'. ### START R code setClass("classA", contains = "matrix", representation(realData = "numeric")) setMethod("as.matrix",
2013 Jul 31
2
S3 internal and group generics
Hi all, I've noticed a couple of small bugs/documentation errors related to S3 internal and group generics: * In ?S3groupGeneric, log2 and log10 are not listed as group generics, even though they are in the equivalent S4 groups, and are the source code for do_log1arg contains DispatchGroup("Math", ...) * As well as log2 and log10, tools:::.get_internal_S3_generics() fails to
2007 Apr 03
1
source(..., echo=TRUE) broken in R-2.5.0 alpha and in R-2.6.0 devel
Hi, I get this error with R-2.5.0 alpha and R-2.6.0 devel: > source("http://bioconductor.org/biocLite.R", echo=TRUE) Error in if (timestamp != srcfile$timestamp) warning("Timestamp of '", : missing value where TRUE/FALSE needed Same with 'verbose=TRUE': > source("http://bioconductor.org/biocLite.R", verbose=TRUE)
2008 Jan 31
2
Pb with lapply()
Hi, If needed, lapply() tries to convert its first argument into a list before it starts doing something with it: > lapply function (X, FUN, ...) { FUN <- match.fun(FUN) if (!is.vector(X) || is.object(X)) X <- as.list(X) .Internal(lapply(X, FUN)) } But in practice, things don't always seem to "work" as suggested by this code (at least to the
2006 Nov 03
1
man page for as.matrix for data frames outdated?
Hi again, The man page for 'as.matrix' says: 'as.matrix' is a generic function. The method for data frames will convert any non-numeric/complex column into a character vector using 'format' and so return a character matrix, except that all-logical data frames will be coerced to a logical matrix. It's true that "all-logical data frames will
2019 Jul 08
5
Format printing inside a matrix
Hi Abby, Thanks a lot for your paraphrasing and your suggestion! The problem of wrapping the list into a S3/S4 object, i.e. subclassing array or matrix, is that one also has to define a bunch of methods for subsetting, joining, etc, in order to make it behave like a list array. The reason is that most R functions for subsetting, joining, etc. do not preserve class attributes of the input, which
2019 Mar 22
2
selectMethod() can fail to find methods in situations of multiple dispatch
Fine with me as long as eliminating the inconveniences associated with it can be put on the roadmap. The alias instability and the fact that the user has no way to know if s/he should do ?`foo,numeric-method` or ?`foo,numeric,ANY-method` to find the method has been a long-standing problem. H. On 3/21/19 21:29, Michael Lawrence wrote: If we started over, I'd try to avoid this sort of
2006 Jun 08
2
install.packages() does not warn when 'lib' arg is missing on Linux or Windows
Hello, Man page for 'install.packages' says that if the 'lib' arg is missing, then it "defaults to '.libPaths()[1]' with a warning". But, given the 'install.packages' source code, it seems that this warning is issued only when 'length(.libPaths()) > 1'. So typically, this warning will appear on Mac OS X but not on a Linux or Windows systems
2006 Oct 05
2
Last R-devel snapshot is an empty tarball
Dear list, The last R-devel snapshot (2006-10-03) is an empty tarball: ftp://ftp.stat.math.ethz.ch/Software/R/ Thanks, H.
2019 Mar 22
2
selectMethod() can fail to find methods in situations of multiple dispatch
Hi Michael, Thanks for looking into this. I suspect that truncation of ANY suffixes from method signatures is also the culprit behind the sudden breakage of aliases of the form \alias{foo,numeric-method} when a method without the ANY suffix in its signature gets added to the ecosystem. See my post about this to the Bioc-devel mailing list a couple of months ago:
2017 Nov 29
2
binary form of is() contradicts its unary form
Hi Mehmet, On 11/29/2017 11:22 AM, Suzen, Mehmet wrote: > Hi Herve, > > I think you are confusing subclasses and classes. There is no > contradiction. `is` documentation > is very clear: > > `With one argument, returns all the super-classes of this object's class.` Yes that's indeed very clear. So if "list" is a super-class of "data.frame" (as
2016 Dec 13
2
LLD status update and performance chart
On Tue, Dec 13, 2016 at 10:37 AM, Hal Finkel via llvm-dev < llvm-dev at lists.llvm.org> wrote: > ----- Original Message ----- > > From: "Rafael Avila de Espindola via llvm-dev" <llvm-dev at lists.llvm.org> > > To: "Mehdi Amini" <mehdi.amini at apple.com> > > Cc: "llvm-dev" <llvm-dev at lists.llvm.org> > > Sent:
2011 Mar 30
2
R CMD build now removes empty dirs
Hi, It's unfortunate that with recent revisions of R 2.13 (this appeared in revision 54640, March 2), 'R CMD build' now removes empty dirs in the package. People might have good reasons for having empty dirs in their packages. For example, in Bioconductor, we have some tools to automatically generate annotation packages and those tools are implemented in software packages that use
2019 May 17
3
nrow(rbind(character(), character())) returns 2 (as documented but very unintuitive, IMHO)
Hi Herve, Inline. On Thu, May 16, 2019 at 4:45 PM Pages, Herve <hpages at fredhutch.org> wrote: > Hi Gabe, > > ncol(data.frame(aa=c("a", "b", "c"), AA=c("A", "B", "C"))) > # [1] 2 > > ncol(data.frame(aa="a", AA="A")) > # [1] 2 > > ncol(data.frame(aa=character(0),