similar to: S3 dispatch for S4 subclasses only works if variable "extends" is accessible from global environment

Displaying 20 results from an estimated 1000 matches similar to: "S3 dispatch for S4 subclasses only works if variable "extends" is accessible from global environment"

2016 Apr 19
3
S3 dispatch for S4 subclasses only works if variable "extends" is accessible from global environment
Thanks for looking into it, your approach sounds good to me. See also R_has_methods_attached() (https://github.com/wch/r-source/blob/42ecf5f492a005f5398cbb4c9becd4aa5af9d05c/src/main/objects.c#L258-L265). I'm fine with Rscript not loading "methods", as long as everything works properly with "methods" loaded but not attached. -Kirill On 19.04.2016 04:10, Michael
2016 Apr 19
2
S3 dispatch for S4 subclasses only works if variable "extends" is accessible from global environment
See also .isMethodsDispatchOn, which is what trace uses to decide if the methods package needs to be loaded. ~G On Tue, Apr 19, 2016 at 5:34 AM, Michael Lawrence <lawrence.michael at gene.com > wrote: > Not sure why R_has_methods_attached() exists. Maybe Martin could shed > some light on that. > > On Mon, Apr 18, 2016 at 11:50 PM, Kirill M?ller > <kirill.mueller at
2016 Apr 19
4
S3 dispatch for S4 subclasses only works if variable "extends" is accessible from global environment
Does it make sense to be able to load an S4 object without the methods package being attached? I'm not sure implementation-wise how easy this would be, but it seems like any time there is an S4 object around, the methods package should be available to deal with it. ~G On Tue, Apr 19, 2016 at 7:34 AM, Michael Lawrence <lawrence.michael at gene.com > wrote: > Right,
2016 Apr 19
0
S3 dispatch for S4 subclasses only works if variable "extends" is accessible from global environment
Right, R_has_methods_attached() uses that. Probably not the right check, since it refers to S4 dispatch, while S4_extends() is used by S3 dispatch. Perhaps S4_extends() should force load the methods package? The above example works after fixing the check to ensure that R_MethodsNamespace is not R_GlobalEnv, but one could load a serialized S4 object and expect S3 dispatch to work with Rscript. On
2016 Apr 19
0
S3 dispatch for S4 subclasses only works if variable "extends" is accessible from global environment
Not sure why R_has_methods_attached() exists. Maybe Martin could shed some light on that. On Mon, Apr 18, 2016 at 11:50 PM, Kirill M?ller <kirill.mueller at ivt.baug.ethz.ch> wrote: > Thanks for looking into it, your approach sounds good to me. See also > R_has_methods_attached() >
2016 Apr 19
0
S3 dispatch for S4 subclasses only works if variable "extends" is accessible from global environment
This might be too big a change - but is it worth reconsidering the behaviour of Rscript? Maybe the simplest fix would be simply to always load the methods package. (I think historically it didn't because loading methods took a long time, but that is no longer true) Hadley On Tue, Apr 19, 2016 at 10:37 AM, Gabriel Becker <gmbecker at ucdavis.edu> wrote: > Does it make sense to be
2016 Apr 19
0
S3 dispatch for S4 subclasses only works if variable "extends" is accessible from global environment
Right, the methods package is not attached by default when running R with Rscript. We should probably remove that special case, as it mostly just leads to confusion, but that won't happen immediately. For now, the S4_extends() should probably throw an error when the methods namespace is not loaded. And the check should be changed to directly check whether R_MethodsNamespace has been set to
2015 Feb 09
3
xtabs and NA
Hi I haven't found a way to produce a tabulation from factor data with NA values using xtabs. Please find a minimal example below, it's also on R-pubs [1]. Tested with R 3.1.2 and R-devel r67720. It doesn't seem to be documented explicitly that it's not supported. From reading the code [2] it looks like the relevant call to table() doesn't set the "useNA"
2018 Mar 12
3
Bug report: override stopifnot() ?
Hello, On Mon, Mar 12, 2018 at 09:30:59AM -0700, William Dunlap wrote: > Why don't you use > stopifnot( all(m1 == m2) ) > ? good question. Even though I use aseert np.all(m1 == m2) when working with NumPy, I got accustomed to the "handy shortcut" that I can omit all() with R vectors and matrices. Then I got trapped with the thing I reported. On a second thought,
2018 Mar 12
0
Bug report: override stopifnot() ?
Please stop this line of queries/"suggestions/speculations and read the relevant docs **carefully**. For example, from ?"==" "Note Do not use == and != for tests, such as in if expressions, where you must get a single TRUE or FALSE. Unless you are absolutely sure that nothing unusual can happen, you should use the identical
2016 Apr 05
2
Under Windows, Rgui and Rterm crash if one tries to close the graphic device while identify or locator are running
minimal reproducible example plot(1,1) identify(1,1) # or locator() now, trying to close the window by clicking on the cross of the upper right corner causes Rgui (and Rterm) to crash. I see the same behaviour on 2 different Windows PC (one with Win 8.1 and one with Win 10). I did not see the problem in linux (see below) WINDOWS ************** > sessionInfo() R version 3.3.0 beta
2017 Jun 06
2
Usage of PROTECT_WITH_INDEX in R-exts
On 06.06.2017 10:07, Martin Maechler wrote: >>>>>> Kirill M?ller <kirill.mueller at ivt.baug.ethz.ch> >>>>>> on Mon, 5 Jun 2017 17:30:20 +0200 writes: > > Hi I've noted a minor inconsistency in the documentation: > > Current R-exts reads > > > s = PROTECT_WITH_INDEX(eval(OS->R_fcall, OS->R_env), &ipx);
2020 Aug 07
4
Saturating float-to-int casts
I have encountered a need for float-to-int casts that saturate to min/max when the value is out of the range of the target type. It seems that there is no intrinsic to do this, currently, but on IRC it was pointed out that a patch [1] has been proposed to implement this functionality in exactly the way that I was looking for. It looks like the discussion has died out but I was hoping maybe to
2017 Jun 09
1
Usage of PROTECT_WITH_INDEX in R-exts
>>>>> Kirill M?ller <kirill.mueller at ivt.baug.ethz.ch> >>>>> on Thu, 8 Jun 2017 12:55:26 +0200 writes: > On 06.06.2017 22:14, Kirill M?ller wrote: >> >> >> On 06.06.2017 10:07, Martin Maechler wrote: >>>>>>>> Kirill M?ller <kirill.mueller at ivt.baug.ethz.ch> on
2017 Jun 05
2
Usage of PROTECT_WITH_INDEX in R-exts
Hi I've noted a minor inconsistency in the documentation: Current R-exts reads s = PROTECT_WITH_INDEX(eval(OS->R_fcall, OS->R_env), &ipx); but I believe it has to be PROTECT_WITH_INDEX(s = eval(OS->R_fcall, OS->R_env), &ipx); because PROTECT_WITH_INDEX() returns void. Best regards Kirill
2008 Aug 19
7
[LLVMdev] Please help with LLVM C++ integration
Hi Gordon, I wrote a small example, but while running I get an error("Tied to execute an unknown external function"), where I am wrong? Thanks in advance. Kirill. int some_test_func( int ){ std::cout << "!!!!" << std::endl; return 8848; } int _tmain(int argc, _TCHAR* argv[]){ Module *M = new Module("test"); ExistingModuleProvider* MP = new
2011 Jun 27
7
[btrfs-delalloc-]
Hello all. What we have: SL6 - kernel 2.6.32-131.2.1.el6.x86_64 btrfs on mdadm RAID5 with 8 HDD - 27T partition. I see this at top: 1182 root 20 0 0 0 0 R 100.0 0.0 16:39.73 [btrfs-delalloc-] And LA is grow. What is this and how can I fix it? -- Best regards, Proskurin Kirill -- To unsubscribe from this list: send the line "unsubscribe linux-btrfs" in the body of
2014 Feb 11
2
$new cannot be accessed when running from Rscript and methods package is not loaded
Hi Accesses the $new method for a class defined in a package fails if the methods package is not loaded. I have created a test package with the following single code file: newTest <- function() { cl <- get("someClass") cl$new } someClass <- setRefClass("someClass") (This is similar to code actually used in the testthat package.) If methods is not loaded,
2009 Mar 03
3
[LLVMdev] Issue with paper http://llvm.org/devmtg/2008-08/Geoffray_VMKitProject.pdf and presentation http://hal.inria.fr/docs/00/35/45/77/PDF/RR-6799.pdf
Hi Chris, Just in case that this information does not get corrupted I want to point to the issue: In http://llvm.org/devmtg/2008-08/Geoffray_VMKitProject.pdf it is on page 21: "VMKit, Mono, PNet", Array bounds checks. In http://hal.inria.fr/docs/00/35/45/77/PDF/RR-6799.pdf it is on page 17: "We compare N3 with Mono [9] version 1.2.6, and PNet version 0.7.4 [2], which uses
2018 Oct 05
2
Dots are not fixed by make.names()
Hi It seems that names of the form "..#" and "..." are not fixed by make.names(), even though they are reserved words. The documentation reads: > [...] Names such as ".2way" are not valid, and neither are the reserved words. > Reserved words in R: [...] ... and ..1, ..2 etc, which are used to refer to arguments passed down from a calling function, see