similar to: Virtual class with no slots

Displaying 20 results from an estimated 10000 matches similar to: "Virtual class with no slots"

2016 Mar 18
0
unary class union of an S3 class
On Fri, Mar 18, 2016 at 2:53 PM, Herv? Pag?s <hpages at fredhutch.org> wrote: > Hi, > > Short story > ----------- > > setClassUnion("ArrayLike", "array") > > showClass("ArrayLike") # no slot > > setClass("MyArrayLikeConcreteSubclass", > contains="ArrayLike", >
2016 Mar 19
0
unary class union of an S3 class
On Sat, Mar 19, 2016 at 12:10 AM, Herv? Pag?s <hpages at fredhutch.org> wrote: > On 03/18/2016 03:28 PM, Michael Lawrence wrote: > >> >> On Fri, Mar 18, 2016 at 2:53 PM, Herv? Pag?s <hpages at fredhutch.org >> <mailto:hpages at fredhutch.org>> wrote: >> >> Hi, >> >> Short story >> ----------- >> >>
2016 Mar 19
0
unary class union of an S3 class
On Sat, Mar 19, 2016 at 4:29 AM, Herv? Pag?s <hpages at fredhutch.org> wrote: > On 03/19/2016 01:22 AM, Michael Lawrence wrote: > >> >> >> On Sat, Mar 19, 2016 at 12:10 AM, Herv? Pag?s <hpages at fredhutch.org >> <mailto:hpages at fredhutch.org>> wrote: >> >> On 03/18/2016 03:28 PM, Michael Lawrence wrote: >> >> >>
2016 Mar 18
2
unary class union of an S3 class
Hi, Short story ----------- setClassUnion("ArrayLike", "array") showClass("ArrayLike") # no slot setClass("MyArrayLikeConcreteSubclass", contains="ArrayLike", representation(stuff="ANY") ) showClass("MyArrayLikeConcreteSubclass") # 2 slots!! That doesn't seem right. Long story ----------
2006 Oct 26
2
S4 pb in R 2.5.0
Hi, When playing interactively with the S4 system, I've tried to define the following class: > setClass("A", representation("integer")) [1] "A" > showClass("A") Slots: Name: .Data Class: integer Extends: Class "integer", from data part Class "vector", by
2016 Mar 19
2
unary class union of an S3 class
On 03/18/2016 03:28 PM, Michael Lawrence wrote: > > On Fri, Mar 18, 2016 at 2:53 PM, Herv? Pag?s <hpages at fredhutch.org > <mailto:hpages at fredhutch.org>> wrote: > > Hi, > > Short story > ----------- > > setClassUnion("ArrayLike", "array") > > showClass("ArrayLike") # no slot > >
2016 Mar 19
2
unary class union of an S3 class
On 03/19/2016 01:22 AM, Michael Lawrence wrote: > > > On Sat, Mar 19, 2016 at 12:10 AM, Herv? Pag?s <hpages at fredhutch.org > <mailto:hpages at fredhutch.org>> wrote: > > On 03/18/2016 03:28 PM, Michael Lawrence wrote: > > > On Fri, Mar 18, 2016 at 2:53 PM, Herv? Pag?s > <hpages at fredhutch.org <mailto:hpages at
2020 Sep 24
0
Is it possible to simply the use of NULL slots (or at least improve the help files)?
I did ?"NULL<tab> at the command line and was lead to ?"NULL-class" and the BasicClasses help page in the methods package. getClass("NULL"), getClass("character") show that these objects are unrelated, so a class union is the way to define a class that is the union of these. The essence of the behavior you would like is
2005 Apr 13
1
S4 extends a class, but .Data slot has different class
When I define an S4 class ("B" in the example below) that directly extends another ("A" in the example below) , which in turn directly extends another ("character" in the example below), I find that the slot does not have the class I specified in setClass(), it has the underlying class. Is this an intended feature? Briefly, the reason for using this type of
2020 Oct 06
0
S4 - inheritance changed by order of setClassUnion and setAs()
Andreas, As far as I can tell (/conjecture), this is because the list of classes a particular class inherits from directly is appended to as needed, and so the order that a class extends others isd refined by the order that those connections are defined. We can see this with two setClassUnion calls, rather than required setAs: > setClass("grandma", slots = c(a =
2007 Oct 02
2
pairlist objects
Hi, ?pairlist gives no explanation about what exactly is the difference between a pairlist and a list (except that a pairlist of length 0 is 'NULL'). So, what's a pairlist? class(.Options) [1] "pairlist" Some strange things about the "pairlist" type: > showClass("pairlist") Error in getClass(Class) : "pairlist" is not a defined class
2015 May 12
2
Unexpected failure when calling new() with unnamed arg and
Hi, The man page for new() suggests that if 'a' is an object with slots "slot1" and "slot2" and C is a class that extends the class of 'a', then the 2 following calls should be equivalent: new("C", a, ...) new("C", slot1=a at slot1, slot2=a at slot2, ...) This is generally the case but I just ran into a situation where it's not.
2016 Apr 23
0
S4 non-virtual class with no slots? [SOLVED]
Thanks, Martin, that (inherit from a virtual class) worked great. I already had a base class created with setUnion, and so this was an easy switch. I had assumed that since inheriting from a class without slots would produce a class without slots the result would still be virtual. Fortunately that's not the case. Ross ________________________________________ From: Martin Morgan
2007 Jan 24
1
how to properly extend s3 data.frames with s4 classes?
Dear R Programmers! After some time of using R I decided to work through John Chambers book "Programming with Data" to learn what these S4 classes are all about and how they work in R. (I regret not having picked up this rather fine book earlier!) I know from the documentation and the mailing archives that S4 in R is not 100% the book and that there are issues especially with
2005 Jan 09
1
S4 class no longer accepts matrix in array slot under 2.0.1
I have an S4 class with a slot of class "array", and in upgrading to 2.0.1 (from 1.9.1) I have encountered a change in behaviour. This causes me some difficulties if I want to allow 2-dimensional arrays in the slot. The following (in 2.0.1) illustrates the point: > setClass("foo",representation("array")) [1] "foo" > a <-
2005 Jan 07
1
S4 class no longer accepts matrix in array slot under 2.0.1
I have an S4 class with a slot of class "array", and in upgrading to 2.0.1 (from 1.9.1) I have encountered a change in behaviour. This causes me some difficulties if I want to allow 2-dimensional arrays in the slot. The following (in 2.0.1) illustrates the point: > setClass("foo",representation("array")) [1] "foo" > a <-
2015 May 13
0
Unexpected failure when calling new() with unnamed arg and
>>>>> Herv? Pag?s <hpages at fredhutch.org> >>>>> on Tue, 12 May 2015 15:18:42 -0700 writes: > Hi, > The man page for new() suggests that if 'a' is an object with slots > "slot1" and "slot2" and C is a class that extends the class of 'a', > then the 2 following calls should be equivalent: >
2015 Oct 08
0
Unexpected failure when calling new() with unnamed arg and
Hi, I realize this is an old thread, but just wondering whether a conclusion was ever reached on this issue? I'm using formula(NULL) but it would be nice if default initialization worked for formula classes as well. Cheers, Josh On Thu, May 14, 2015 at 8:13 AM, Herv? Pag?s <hpages at fredhutch.org> wrote: > Thanks Martin for looking into this. H. > > > On 05/13/2015
2005 Jan 05
0
matrix no longer "is" array in 2.0.1?
I have an S4 class which extends array and has other slots, and in upgrading to 2.0.1 (from 1.9.1) I have encountered a change in behaviour. This causes me some difficulties if I want to allow 2-dimensional arrays in the slot (which I do). The following (in 2.0.1) illustrates the point: > setClass("foo",representation("array")) [1] "foo" > a <-
2004 Jun 18
0
Problem with setValidity() or resetClass() or ... ?
Hi, I'm working with Version 1.9.0 (2004-04-12) on Windows 98/NT/2000 where I found the following wrong (?) behavior of setValidity(). I already mentioned this on the R-help list (2004-06-11, was "setValidity changes Extends?") , but as I got no answer I tried to figure out what's happening. Well, setValidity() behaves not as I would expect (something about the