similar to: How to force dispatch to an internal generic?

Displaying 20 results from an estimated 4000 matches similar to: "How to force dispatch to an internal generic?"

2015 Sep 26
3
issues with dev.new avoiding RStudio plot device on unix?
Sorry, should have given more background. x11 works fine on all my systems when called by x11(). I'm the maintainer of a package that uses the animation library, which has performance issues when used with the RStudio plot device. But if you call plot.new() when using RStudio, you get an RStudio device, not the standard device for the platform because it overrides the device option.
2015 Sep 26
0
issues with dev.new avoiding RStudio plot device on unix?
On 26/09/2015 1:42 AM, Skye Bender-deMoll wrote: > Sorry, should have given more background. x11 works fine on all my > systems when called by x11(). I'm the maintainer of a package that uses > the animation library, which has performance issues when used with the > RStudio plot device. But if you call plot.new() when using RStudio, you > get an RStudio device, not the
2015 Feb 24
3
alternatives to do.call() when namespace is attached but not loaded?
Dear R-devel I have a function in a package that essentially provides a wrapper for a group of functions in another Suggested package (it sets appropriate defaults for the context, transforms output, etc). I've implemented this by verifying that the package was loaded with require(sna) and then do.call(snaFunName, args = args) The rDevel check is requesting that I use
2015 Sep 25
2
issues with dev.new avoiding RStudio plot device on unix?
Hi R-devl, I'm still unable to force opening an *interactive* non-Rstudio platform-specific plot device on *unix* systems. dev.new() add a new argument 'noRStudioGD' in R 3.1.1. Thank you. It works for me when using RStudio on Windows, but on the unix system it opens a pdf device instead of an interactive device when using an interactive RStudio session (with R_DEFAULT_DEVICE
2013 Nov 22
2
what is the correct way to force a copy of an object?
Dear R-devs, I'm working on a package where we have a function that modifies an Object via .Call to a C function. Unfortunately in some situations this counterintuitive modifies a previously made copy of the object passed to the function. For example, if I first make an assignment to "copy" the object, b<-a and then modify 'a' , the value of 'b' will be
2015 Feb 24
0
alternatives to do.call() when namespace is attached but not loaded?
do.call(sna::snaFunName, args = args) ? Hadley On Tue, Feb 24, 2015 at 1:29 PM, Skye Bender-deMoll <skyebend at skyeome.net> wrote: > Dear R-devel > > I have a function in a package that essentially provides a wrapper for a > group of functions in another Suggested package (it sets appropriate > defaults for the context, transforms output, etc). I've implemented this
2015 Sep 26
0
issues with dev.new avoiding RStudio plot device on unix?
Can you describe your problem a bit more? * What kind of unix system do you have? * Can you run other X11 programs? I had a similar issue, and the problem was that the computer was not set up to support X11. As a minimum, you have to install /xauth/, and potentially also other libraries if you want to install packages from source. Best, Ott On Fri, Sep 25, 2015 at 11:53 AM, Skye Bender-deMoll
2015 Mar 20
1
quieting the "apparent S3 methods" warning
Dear R-devel, Recent versions of R CMD check have been flagging apparent S3 methods that are not registered in the NAMESPACE as such. In most situations this is very helpful. However, I have few cases in existing packages where we have unfortunately named functions using a "." in them that makes them appear as S3 methods when they are not. As there is no existing class
2014 Jun 13
1
what is the current correct repos structure for mac osx binaries?
Dear R-developers, As part of our package building process, we maintain internal CRAN-like repositories of our packages. This has worked pretty well, but we are running into issues with R 3.1 and OSX mavericks. Specifically, machines with osx mavericks seem to, by default, expect packages to be located under a 'mavericks' sub-directory, but this is not the location reported when
2006 Oct 09
0
dispatch on functions (was: Re: ifelse(logical, function1, function2) does not work)
On 10/7/06, Gabor Grothendieck <ggrothendieck at gmail.com> wrote: > I have noticed that dispatch on functions seems not to work > in another case too. We define + on functions (I have ignored > the niceties of sorting out the environments as we don't really > need it for this example) but when we try to use it, it fails even > though in the second example if we run it
2011 Jun 29
0
Error in testInstalledBasic
Hi, I am running R 2.13.0 on a Windows 7 machine. I ran the script: testInstalledBasic('devel') and received the following warning message: running tests of consistency of as/is.* creating ?isas-tests.R? running code in ?isas-tests.R? comparing ?isas-tests.Rout? to ?isas-tests.Rout.save? ...running tests of random deviate generation -- fails occasionally running code in
2020 May 12
0
S3 method dispatch for methods in local environments
Dear Wolfgang, I think this new behaviour is related to the following R 4.0.0 NEWS item: > S3 method lookup now by default skips the elements of the search path between the global and base environments. Your environment "myenv" is attached at position 2 of the search() path and thus now skipped in S3 method lookup. I have just noticed that
2020 May 12
4
S3 method dispatch for methods in local environments
Dear All, In R 3.6.3 (and earlier), method dispatch used to work for methods stored in local environments that are attached to the search path. For example: myfun <- function(y) { out <- list(y=y) class(out) <- "myclass" return(out) } print.myclass <- function(x, ...) print(formatC(x$y, format="f", digits=5)) myfun(1:4) # prints: [1]
2008 May 13
0
'cat' and 'write' as generic, just like 'c', 'cbind' etc?
Dear list: is there any good reason why 'c', 'cbind', 'rbind' etc (all defined as 'function(..., <rest>)') are generic and thus methods can be defined whereas such quite useful functions like 'cat' and 'write' are not? Would it not be reasonable to add such functionality? This would allow to define S3/S4 methods for cat and write for complex
2009 Jan 02
1
"registering" a generic method for a class
Sorry in advance if this is too simple a question, but I'm stuck with some odd behavior and I can't find the text to rid myself of this (admittedly somewhat trivial) problem. Note that I've done generic programming with S3 "objects" in the past, but I've never really dabbled in creating S4 objects until now. So, I've created a new S4 class, call it
2009 May 18
1
S4 method dispatch and namespaces: why is default method selected
Hi, I ran into the following peculiarity involving S4 method dispatch and namespaces. I develop a package which have a namespace and which depends on 'pixmap' package, which itself does not have a namespace. Now, in my package I have a class which has a slot for objects from class "pixmap" and I want to have a "plot" method for this new class. Not to clutter the
2010 Jun 09
0
Documenting generic S4 replacement method for package building
Dear List Members, I'm struggling with the documentation of a generic S4 replacement method. I've created a S4 method "lows" via setGeneric("lows", function(object) standardGeneric("lows")) setGeneric("lows<-", function(object, value) standardGeneric("lows<-")) setMethod("lows", "myClass", function(object) {
2008 Apr 07
0
Some memory questions: data.frame and lists.
Hi there, I seek your expert opinion on the following memory related questions. The output below was gotten from R-2.6.2, compiled with --enable-memory-profiling on Ubuntu Linux. ======================================================================= >>> Code and output 1: > gc( ) used (Mb) gc trigger (Mb) max used (Mb) Ncells 131180 7.1 350000 18.7 350000 18.7
2012 Jun 21
1
package slot of generic "[" and missing env@target?
Hi, Since upgraded to R 2.15, I have a problem with duplicate S4 class name no longer works (the reason for having duplicate S4 class names is just software forks - they are largely identical but don't have an inheritence relationship, and will never have such). This is happening with "library(mypackage2)" : Error: package slot missing from signature for generic ?[? and classes
2016 Apr 05
1
Assignment operator and deep copy for calling C functions
Hi All, i have a problem in understanding what the assignment operator '<-' really is doing. If i create two numeric arrays in R and copy one into the other with '<-' and afterwards change one array by calling a C function, both arrays are changed! The problem I am facing can easily be seen in the following example: (The following R code and the C function is attached and