[datatable-help] (Presumably) unintended issue with data.table 1.6.3
Timothée Carayol
timothee.carayol at gmail.com
Thu Aug 4 18:04:51 CEST 2011
Also,
A$a <- NULL
A
at best shows an error:
> A$a <- NULL
> A
Error in data.table(lapply(x, function(x) { :
'translateCharUTF8' must be called on a CHARSXP
and at worst crashes my R process (segfault).
I guess I'll just do "as.data.table(within(as.data.frame(A)" for now ;-)
t
2011/8/4 Timothée Carayol <timothee.carayol at gmail.com>:
> I am used to removing columns using
> A <- within(A, rm(column))
>
> However this stopped working:
>
>> A <- data.table(a=1:10, b=11:20)
>> within(A, rm(a))
> Error in within.data.table(A, rm(a)) :
> Can only assign one column at a time currently via within
> In addition: Warning message:
> In rm(a) : object 'a' not found
>
> transform(A, a=NULL) doesn't work either.
>
> As a digression, is there a better way to drop a number of columns?
> A[, -col] doesn't work; A[, -"col", with=F] either.
>
> I have the latest version from CRAN I believe.
>
> Thanks
> Timothee
>
More information about the datatable-help
mailing list