similar to: as.Date.character suggestion

Displaying 20 results from an estimated 60000 matches similar to: "as.Date.character suggestion"

2011 Aug 03
1
R CMD check thinks my function is an S3 method
Hi all, in my package I have a function with name plot.cor (this function is inherited from another legacy package). According to CRAN package checks reports, the check apparently thinks plot.cor is a method for the plot generic (I hope I'm using the correct terminology). checking Rd \usage sections ... NOTE S3 methods shown with full name in documentation object 'plot.cor':
2018 May 24
2
Creating S3 methods for S4 classes (coming from r-package-devel)
Dear all, I asked this question on r-package-devel but Martin Maechler pointed out this was more suited on R-devel. So here it goes: per the manual, one should create and register both the S3 and a S4 method if one needs a method for an S4 class for a function using S3 dispatching. This is cumbersome, and not very optimal. I was wondering if there's a better way to do this. Currently I
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
2015 Jun 12
3
RFC: Declaring "foo.bar" as nonS3method() ?!
On 12/06/2015 10:53 AM, Hadley Wickham wrote: > To me, it seems like there's actually two problems here: > > 1) Preventing all() from dispatching to all.effects() for objects of > class effects > 2) Eliminating the NOTE in R CMD check > > My impression is that 1) actually causes few problems, particularly > since people are mostly now aware of the problem and avoid
2015 Jun 13
1
RFC: Declaring "foo.bar" as nonS3method() ?!
>>>>> Luke Tierney <luke-tierney at uiowa.edu> >>>>> on Fri, 12 Jun 2015 10:30:29 -0500 writes: > The notes available off the devloper page > https://developer.r-project.org/ describe some of the rationale for > the S3 method search design. One thing that has changed since then is > that all packages now have name spaces. We
2015 Jun 12
3
RFC: Declaring "foo.bar" as nonS3method() ?!
>>>>> Duncan Murdoch writes: > On 12/06/2015 7:16 AM, Kurt Hornik wrote: >>>>>>> Duncan Murdoch writes: >> >>> On 12/06/2015 4:12 AM, Martin Maechler wrote: >>>> This is a topic ' "apparent S3 methods" note in R CMD check ' >>>> from R-package-devel >>>>
2018 May 24
1
Creating S3 methods for S4 classes (coming from r-package-devel)
On Thu, May 24, 2018 at 6:20 PM, Michael Lawrence <lawrence.michael at gene.com > wrote: > You only have to make an S4 method if there is already an S4 generic. > If there is just an S3 generic, then just define S3 methods on it. I was refering to the recommendations in ?Methods_for_S3 ( https://stat.ethz.ch/R-manual/R-devel/library/methods/html/Methods_for_S3.html). : "Two
2010 Jun 13
1
S4 classes and S3 generic functions
A general goal for the next version of R is to make S4 and S3 play better together. As mentioned in a previous thread, one limitation has been that S3 generic functions, specifically the UseMethod() call, did not make use of S4 inheritance when dispatching on general S4 objects. This has been fixed in a version committed today (updated to rev 52267). The code change is not large, but it
2018 Mar 26
4
Objects not gc'ed due to caching (?) in R's S3 dispatch mechanism
Hi, I initially opened an issue in the R6 repo because my issue was with an R6 object. But Winston (thanks!) further simplified my example, and it turns out that the issue (whether a feature or a bug is yet to be seen) had to do with S3 dispatching. The following example, by Winston, depicts the issue: print.foo <- function(x, ...) { cat("print.foo called\n") invisible(x) }
2006 Sep 27
1
S3 methods for cbind/rbind
I created a type of object similar to a data frame. In some circumstances, It needs special methods for "[" and "[<-" and rbind() (but not cbind()). Then I found this in the cbind()/rbind() man page: The method dispatching is _not_ done via 'UseMethod()', but by C-internal dispatching. Therefore, there is no need for, e.g., 'rbind.default'.
2019 May 14
2
[R-pkg-devel] Three-argument S3method declaration does not seem to affect dispatching from inside the package.
CCing r-devel. On Tue, 14 May 2019 at 02:11, Pavel Krivitsky <pavel at uow.edu.au> wrote: > > Dear All, > > I've run into this while updating a package with unfortunately named > legacy functions. It seems like something that might be worth changing > in R, and I want to get a sense of whether this is a problem before > submitting a report to the Bugzilla. > >
2010 Aug 23
2
Sum a list of tables
Hi all, In R it is possible to sum tables: > (a <- table(rep(1:3, sample(10,3)))) 1 2 3 2 5 7 > a+a 1 2 3 4 10 14 Now suppose that I have a list of tables, where each table counts the same things > k <- list(a,a,a) How can I sum all tables in k? > do.call(sum, k) [1] 42 does not work since it sums over each table. > do.call(`+`, list(a,a)) 1 2 3 4 10
2005 Aug 11
1
Registering S3 class from external package
The package I'm working on can extract data from external packages but would otherwise have no dependency on them. However, I desire to be able to dispatch based on an external S3 class if its package is attached (.First.lib). My code is S4-based and its package has NAMESPACE. Registering the external class prior to the other package being attached doesn't seem to work so I am attempting
2020 Sep 24
1
How to use `[` without evaluating the arguments.
Hello R-devel, I am currently attempting to implement an API similar to data.table wherein single bracket subsetting can accept an unquoted expression to be evaluated in the context of my object. A simple example from the data.table package looks like this: DT <- data.table(col1 = c('a', 'b', 'c'), col2 = c('x', 'y', 'z')) DT[col1 ==
2018 Mar 27
2
Objects not gc'ed due to caching (?) in R's S3 dispatch mechanism
I have committed a change to R-devel that addresses this. To be on the safe side I need to run some more extensive tests before deciding if this can be ported to the release branch for R 3.5.0. Should know in a day or two. Best, luke On Tue, 27 Mar 2018, luke-tierney at uiowa.edu wrote: > This has nothing to do with printing or dispatch per se. It is the > result of an internal register
2020 Jul 20
1
Methods for objects inheriting from lme (nlme package)
Dear R developers, One function in my mkin package [1] returns an object that is originally created by nlme(), but contains some additional information. Its class is c("mmkin.nlme", "nlme", "lme"). Now I would like to use the anova() method for lme objects for comparing such S3 objects. Unfortunately, anova.lme currently does not check for inheritance, but
2008 Jan 05
3
is(x, "parent") returns FALSE when class(x) is c("child", "parent") (PR#10549)
is() does not catch parent S3 classes: > library(splines) > temp <- bs(1:99, df=5) > class(temp) [1] "bs" "basis" > is(temp, "basis") [1] FALSE In contrast, is() does catch parent S4 classes: > library(copula) > norm.cop <- ellipCopula("normal", param = c(0.5, 0.6, 0.7), + dim = 3, dispstr = "un")
2017 Sep 01
4
side-effect of calling functions via `::`
>>>>> Lionel Henry <lionel at rstudio.com> >>>>> on Fri, 1 Sep 2017 13:47:07 +0200 writes: > A package should probably never register a S3 method unless it owns > either the generic or the class. I agree... (and typically it does "own" the class) > Here `formula.tools` owns neither. i.e., it neither defines as.character()
2003 Feb 20
2
Who to decide what a generic function should look like?
I am not sure if what I am asking below should be discussed under r-help or r-devel, so please feel free to move over to r-devel. This is a spin off from Gordon Smyth's question about generic functions and Robert Gentleman's reply. I have tried to raise the question before and I am sure this has been discussed by others, but never on the r-help list what I can see. My concern is that
2003 Feb 20
2
Who to decide what a generic function should look like?
I am not sure if what I am asking below should be discussed under r-help or r-devel, so please feel free to move over to r-devel. This is a spin off from Gordon Smyth's question about generic functions and Robert Gentleman's reply. I have tried to raise the question before and I am sure this has been discussed by others, but never on the r-help list what I can see. My concern is that