[datatable-help] What is going on with R 3.1 ?

Paul Johnson pauljohn32 at gmail.com
Thu Apr 24 00:25:49 CEST 2014


I was going to say you don't mention if you re-compiled data.table to
go with the new R and such.

update.packages(checkBuilt=TRUE)

because you have not mentioned if you did that...

Then I was going to say "show us the commands that produced those
errors you mentioned and post us an example object to test".  I still
think you should.

But I've just tested your example and I see same, but am not sure
something is wrong because the .internal.selfref is not saved by the
RDS.

In a session, I save a new data.table as usual:

> dt<-data.table(id=1:10)
> attr(dt, ".internal.selfref")
<pointer: 0x13cf118>
> saveRDS(dt, "/tmp/dt.rds")

close down, re-start

> library(data.table)
data.table 1.9.2  For help type: help("data.table")
> attr(dt, ".internal.selfref")
NULL

Before R-3.1, you mean to say the pointers were the same after saving
and re-opening the file? That seems impossible to me that the pointer
would be restored, it is session specific. Yes?

The data table is still there, it still works.
> dt2[ , new2 := rnorm(10)]
> dt2
    id       new2
 1:  1 -0.3064382
 2:  2 -0.3414318
 3:  3 -0.5758131
 4:  4 -0.2792946
 5:  5 -0.1887096
 6:  6 -2.7454482
 7:  7 -0.2169927
 8:  8  1.0065699
 9:  9 -2.0388283
10: 10 -2.5366451
> attr(dt, ".internal.selfref")
NULL

It just doesn't know who it is :)

I expect the best thing is to provide the code & example to reproduce
the trouble you see, because, at least within R 3.1, I don't have the
troubles you do.  But I'm also not trying to use .rds objects that
were written in the previous version.

pj


On Thu, Apr 17, 2014 at 2:22 PM, Michele <carrieromichele at gmail.com> wrote:
>> a <- data.table(a=1:10)
>> b <- data.table(a=1:10)
>> attributes(a)$.internal.selfref
> <pointer: 0x0000000000120788>
>> attributes(b)$.internal.selfref
> <pointer: 0x0000000000120788>
>
> The real problem is that my usual codes fail, giving error like
>
> Error in if (!is.null(lhs)) { : missing value where TRUE/FALSE needed
>
> when I do like x[y, `:=`(a = i.a, b = i.b)]
>
> As I said I'll try to replicate the error. However I already gave you
> something, if you read my post I show how moving data from 3.0.2 to 3.1
> creates the problem. Thankfully I just managed to downgrade to 3.0.2 so I
> don't get fired...
>
>
>
>
>
>
>
>
>
> --
> View this message in context: http://r.789695.n4.nabble.com/What-is-going-on-with-R-3-1-tp4689002p4689020.html
> Sent from the datatable-help mailing list archive at Nabble.com.
> _______________________________________________
> datatable-help mailing list
> datatable-help at lists.r-forge.r-project.org
> https://lists.r-forge.r-project.org/cgi-bin/mailman/listinfo/datatable-help



-- 
Paul E. Johnson
Professor, Political Science      Assoc. Director
1541 Lilac Lane, Room 504      Center for Research Methods
University of Kansas                 University of Kansas
http://pj.freefaculty.org               http://quant.ku.edu


More information about the datatable-help mailing list