[datatable-help] R Studio Interactions with data.table

Zachary Long long at dc-energy.com
Tue Apr 22 20:07:59 CEST 2014


Hello,

I was wondering if an error like this had been addressed before. I am using data table 1.9.2.

It appears that the error has to do with the interaction with R-Studio. When I run

> library(data.table)
> dt<-data.table(strip="Nov08",date=c("2006-08-01","2006-08-02","2006-08-03","2006-08-04","2006-08-07",
>                                     "2006-08-08","2006-08-09","2006-08-10","2006-08-11","2006-08-14"))
> dt[,forward_date:=c(rep(NA,5),date),by='strip']

The result I expect is below, along with a warning message.
strip       date forward_date
 1: Nov08 2006-08-01           NA
 2: Nov08 2006-08-02           NA
 3: Nov08 2006-08-03           NA
 4: Nov08 2006-08-04           NA
 5: Nov08 2006-08-07           NA
 6: Nov08 2006-08-08   2006-08-01
 7: Nov08 2006-08-09   2006-08-02
 8: Nov08 2006-08-10   2006-08-03
 9: Nov08 2006-08-11   2006-08-04
10: Nov08 2006-08-14   2006-08-07

However, I don't get this.

1 of two things can happen.

1. My R-Studio will completely crash without warning. All unsaved information is lost.
2. I can get "Error: Value of SET_STRING_ELT() must be a 'CHARSXP' not a 'character'" "In addition:Lost warning messages"

Do you know what is the cause here? It seems related to memory allocation, or something under the hood relating to the interaction of R-Studio and data table.

Zach
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.r-forge.r-project.org/pipermail/datatable-help/attachments/20140422/37aefa90/attachment.html>


More information about the datatable-help mailing list