Displaying 20 results from an estimated 2000 matches similar to: "Change to I() in R 4.1"
2020 Oct 30
2
Change to I() in R 4.1
Hi Martin,
On 10/26/20 04:52, Martin Maechler wrote:
>>
>> 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,
2020 Oct 26
0
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",
2020 Oct 30
1
[External] Re: Change to I() in R 4.1
On Fri, 30 Oct 2020, Pages, Herve wrote:
>
> On 10/29/20 23:08, Pages, Herve wrote:
> ...
>>
>> I can think of 2 ways to move forward:
>>
>> 1. Keep I()'s current implementation but suppress the warning. We'll
>> make the necessary adjustments to DataFrame() to repair columns supplied
>> as I(<S4>) objects. Note that we would still be in
2024 Jul 14
2
xftrm is more than 100x slower for AsIs than for character vectors
? Fri, 12 Jul 2024 17:35:19 +0200
Hilmar Berger via R-devel <r-devel at r-project.org> ?????:
> This can be finally traced to base::rank() (called from
> xtfrm.default), where I found that
>
> "NB: rank is not itself generic but xtfrm is, and rank(xtfrm(x), ....)
> will have the desired result if there is a xtfrm method. Otherwise,
> rank will make use of ==, >,
2024 Jul 12
1
xftrm is more than 100x slower for AsIs than for character vectors
Good evening,
I recently have observed slow merges when combining multiple data frames
derived from DataFrame and base::data.frame. I observed that the index
column of intermediate tables was of class <AsIs> (automatically
converted from character). The problem occurred mainly when using the
sorted = T option in base::merge.
This can be traced to xtfrm.AsIs being more than 100 times slower
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
2020 Oct 30
0
Change to I() in R 4.1
On 10/29/20 23:08, Pages, Herve wrote:
...
>
> I can think of 2 ways to move forward:
>
> 1. Keep I()'s current implementation but suppress the warning. We'll
> make the necessary adjustments to DataFrame() to repair columns supplied
> as I(<S4>) objects. Note that we would still be in the situation where
> I(<S4>) objects break validObject() but
2009 Nov 02
1
two small wishes (with code sugegstions) for R-core
Dear R developers,
It would be great if you could implement the two minor code changes suggested below, which would help processing large objects in R.
Jens Oehlschl?gel
# Wish no. 1: let [.AsIs return the class AFTER subsetting, not the class of the original object
# Wish no. 2: adjust write.csv and write.csv2 for multiple calls in chunked writing
# Rationale no. 1: a couple of packages
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.
2009 Sep 15
2
S3 objects in S4 slots
Hello,
I am the maintainer of the stringkernels package and have come across
a problem with using S3 objects in my S4 classes.
Specifically, I have an S4 class with a slot that takes a text corpus
as a list of character vectors. tm (version 0.5) saves corpora as
lists with a class attribute of c("VCorpus", "Corpus", "list"). I
don't actually need the
2004 Jul 15
2
formula and lm
Hi, don' t understand why the function fomula have this error, i enclose
the parameter "a" with the function I()
Thank Ruben
x<-1:5
y<-c( 2 ,4 , 6 , 8 ,11)
formu<-y~I(a*x)
form<-formula(formu)
dummy<-data.frame(x=x,y=y)
fm<-lm(form,data=dummy)
Error in unique(c("AsIs", oldClass(x))) : Object "a" not found
2015 May 13
2
Unexpected failure when calling new() with unnamed arg and
Thanks Martin for looking into this. H.
On 05/13/2015 03:57 AM, Martin Maechler wrote:
>>>>>> 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
2015 Oct 08
1
Unexpected failure when calling new() with unnamed arg and
>>>>> Joshua Wiley <jwiley.psych at gmail.com>
>>>>> on Thu, 8 Oct 2015 12:19:16 +1100 writes:
> 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.
Well,
2007 Sep 25
1
'load' does not properly add 'show' methods for classes extending 'list'
The GeneSetCollection class in the Bioconductor package GSEABase
extends 'list'
> library(GSEABase)
> showClass("GeneSetCollection")
Slots:
Name: .Data
Class: list
Extends:
Class "list", from data part
Class "vector", by class "list", distance 2
Class "AssayData", by class "list", distance 2
If I create
2013 Mar 03
1
Missing PROTECT in mkPRIMSXP ?
The Bioconductor build for a package DirichletMultinomial on
R Under development (unstable) (2013-02-26 r62077) -- "Unsuffered Consequences"
at
http://bioconductor.org/checkResults/devel/bioc-LATEST/DirichletMultinomial/george2-buildsrc.html
shows
* creating vignettes ... ERROR
...
Error: processing vignette ?DirichletMultinomial.Rnw? failed with diagnostics:
chunk 21 (label
2008 Dec 04
1
Recent snapshot tarballs of R-devel don't compile
Hi,
Trying to compile one of the latest snapshot tarballs of R-devel gives
me the following error (64-bit openSUSE 10.3):
...
make[2]: Entering directory
`/loc/home/biocbuild/bbs-2.4-bioc/R/src/library/Recommended'
make[2]: *** No rule to make target `VR.ts', needed by
`stamp-recommended'. Stop.
make[2]: Leaving directory
2017 Apr 26
4
byte-compiler bug
Hi,
I'm running into a case where byte-compilation changes
the semantic of a function. This is with R 3.4.0:
foo <- function(x) { TRUE && x }
foo(c(a=FALSE))
# [1] FALSE # OK
foo(c(a=TRUE))
# [1] TRUE # OK
foo(c(a=FALSE))
# a # ????
# FALSE
The 3rd call returned a result that it different from the 1st
call!
After
2012 Oct 04
1
identical() fails to compare isS4(<S4 instance>) to TRUE
> setClass("A", "integer")
> isS4(new("A"))
[1] TRUE
> identical(isS4(new("A")), TRUE)
[1] FALSE
> sessionInfo()
R Under development (unstable) (2012-10-04 r60876)
Platform: x86_64-unknown-linux-gnu (64-bit)
locale:
[1] LC_CTYPE=en_US.UTF-8 LC_NUMERIC=C
[3] LC_TIME=en_US.UTF-8 LC_COLLATE=en_US.UTF-8
[5]
2006 Mar 06
1
validObject does not check validity of slots
The documentation for validObject suggests that slots are checked for
validity, but validObject seems only to check that the slot has
something claiming to be correct; validObject(obj) does not perform
the equivalent of validObject(obj at y) for slot y.
This is also the second problem issue reported in
http://tolstoy.newcastle.edu.au/R/devel/05/03/0151.html
Relevant documentation, an example,
2008 Apr 15
1
Pb with validObject(..., complete=TRUE)
Hi,
When called with complete=TRUE, validObject() is supposed to work in a
recursive manner. But here is a situation where it doesn't seem to be
the case.
Let's define a class with a validity method:
setClass("PosInts", representation(ii="integer"))
setValidity("PosInts",
function(object)
{
if (!all(object at ii > 0))