search for: ass4

Displaying 6 results from an estimated 6 matches for "ass4".

Did you mean: ass
2007 Oct 07
1
R 2.6.0 S4 data breakage, R _data_class(), class<-, etc.
...an be updated to reflect some of this... 1) We created and bundled some data in the past in the 2.2 to 2.5 time frame (well, 18 months in reality); most of them triggers a warning 'pre-2.4.0 S4 objects detected... consider recreating...' a) I could fix all of them with just 'a <- asS4(a)' and save() (they are relatively simple objects just missing the S4 object bit flag) b) I am surprised one of them were actually saved from 2.5 - our buggy code no doubt, see below. We never noticed we didn't do SET_S4_OBJECT() in our C code nor asS4() in our R...
2017 Nov 29
2
binary form of is() contradicts its unary form
Yes, data.frame is not an S4 class but is(data.frame()) finds its super-classes anyway and without the need to wrap it in asS4(). And "list' is one of the super-classes. Then is(data.frame(), "list") contradicts this. I'm not asking for a workaround. I already have one with 'class2 %in% is(object)' as reported in my original post. 'is(asS4(object), class2)' is maybe another one but,...
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
2017 Nov 29
0
binary form of is() contradicts its unary form
Hi Herve, Interesting observation with `setClass` but it is for S4. It looks like `data.frame()` is not an S4 class. > isS4(data.frame()) [1] FALSE And in your case this might help: > is(asS4(data.frame()), "list") [1] TRUE Looks like `is` is designed for S4 classes, I am not entirely sure. Best, -Mehmet On 29 November 2017 at 20:46, Herv? Pag?s <hpages at fredhutch.org> wrote: > Hi Mehmet, > > On 11/29/2017 11:22 AM, Suzen, Mehmet wrote: >> >> Hi...
2020 Oct 30
2
Change to I() in R 4.1
...AsIs" Now the new behavior of I() makes a little bit more damage to an S4 object. In addition to breaking validObject(), like the old behavior did, it removes its S4 bit. This means that after removing the AsIs tag, the DataFrame() constructor now will also need to repair the object (with asS4(), which I just discovered today). This is not too bad and we could do that. However the problem would remain that now users get an ugly/obscure warning when they do things like: DataFrame(a=I(df), Z=11:13). I can think of 2 ways to move forward: 1. Keep I()'s current implementation but...
2020 Oct 23
2
Change to I() in R 4.1
Hi there, Is that change in R-devel intentional? library(Matrix) m <- as(matrix(c(0, 1)), "sparseMatrix") isS4(m) # [1] TRUE x <- I(m) # Warning message: # In `class<-`(x, unique.default(c("AsIs", oldClass(x)))) : # Setting class(x) to multiple strings ("AsIs", "dgCMatrix", ...); result will no longer be an S4 object