Quantcast

Gremlins since 1.7.8

classic Classic list List threaded Threaded
2 messages Options
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate
star

Gremlins since 1.7.8

Damian Betebenner-2

All,

 

My colleagues and I have been working hard to root out old code since 1.7.8 but every now and then for reasons I can’t discern I get errors like:

 

Error in `[.data.table`(x, , `:=`(i, .xi), with = FALSE) :

  At an earlier point, this data.table has been copied by R. Avoid key<-, names<- and attr<- which in R currently (and oddly) all copy the whole data.table. Use set* syntax instead to avoid copying:

setkey(), setnames() and setattr(). If this message doesn't help, please ask on datatable-help.

 

 

If I have data.table objects created with an earlier version of data.table, do they function exactly the same with the updated version of data.table. Or do they need to be re-data.tabled?

 

Strangely, the above error disappeared when we did some cleaning on the data.set and resaved it?

 

Puzzled,

 

Damian Betebenner

Center for Assessment

PO Box 351

Dover, NH   03821-0351

 

Phone (office): (603) 516-7900

Phone (cell): (857) 234-2474

Fax: (603) 516-7910

 

[hidden email]

www.nciea.org

 

 

 


_______________________________________________
datatable-help mailing list
[hidden email]
https://lists.r-forge.r-project.org/cgi-bin/mailman/listinfo/datatable-help
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate
star

Re: Gremlins since 1.7.8

Matthew Dowle

There's quite a lot going on here and I'm not sure where to start. Just a
first stab ...

Other ways to get this message are using colnames<- and dimnames<-, both
of which should be replaced with calls to setnames() [now in 1.7.9].
Could that be it?  Perhaps grep all your R source for "[)][ ]*[<][-]" and
"[)][ ]*[=]" and see if anything I didn't anticipate pops up?  You're
looking for anything that copies via `*tmp*` i.e. somefun()<-value

I think I got loading and saving from disk right, even loading pre-1.7.8
data.table, but things have been moving fast and I'm not that surprised
there could be a gremlin there. When you say 'resaved it' at the end, do
you mean resaving it and then reloading it, and in the same R session or a
new one.  And is this all in 2.14.0, both pre and post 1.7.8?

Chris has convinced me off list that it should be an error but it should
shallow copy and be a warning. So that'll be changed for next release, but
it'll still warn with the same message.

So R-Forge is back up then. Anyone know if it was down for improvement
(e.g. binary builds and checks working now?), or ...

Matthew

> All,
>
> My colleagues and I have been working hard to root out old code since
> 1.7.8 but every now and then for reasons I can't discern I get errors
> like:
>
>
> Error in `[.data.table`(x, , `:=`(i, .xi), with = FALSE) :
>
>   At an earlier point, this data.table has been copied by R. Avoid key<-,
> names<- and attr<- which in R currently (and oddly) all copy the whole
> data.table. Use set* syntax instead to avoid copying:
>
> setkey(), setnames() and setattr(). If this message doesn't help, please
> ask on datatable-help.
>
>
> If I have data.table objects created with an earlier version of
> data.table, do they function exactly the same with the updated version of
> data.table. Or do they need to be re-data.tabled?
>
> Strangely, the above error disappeared when we did some cleaning on the
> data.set and resaved it?
>
> Puzzled,
>
> Damian Betebenner
> Center for Assessment
> PO Box 351
> Dover, NH   03821-0351
>
> Phone (office): (603) 516-7900
> Phone (cell): (857) 234-2474
> Fax: (603) 516-7910
>
> [hidden email]<mailto:[hidden email]>
> www.nciea.org<http://www.nciea.org/>
>
>
>
> _______________________________________________
> datatable-help mailing list
> [hidden email]
> https://lists.r-forge.r-project.org/cgi-bin/mailman/listinfo/datatable-help


_______________________________________________
datatable-help mailing list
[hidden email]
https://lists.r-forge.r-project.org/cgi-bin/mailman/listinfo/datatable-help
Loading...