All,

In using data.table within a package I develop, I'm trying to avoid those pesky 
warnings about variables not having a binding. Because data.table scopes within 
the existing frame and code.tools isn't smart enough to detect
that, I'm getting a few of those pesky errors.

This brought me to the following inconsistent behavior (at least it appears 
that way to me):

tmp.dt <- data.table(ID=1:10, SCORE=rnorm(10))

tmp.dt[,SCORE]

and

tmp.dt[,"SCORE", with=FALSE]

The first returns a numeric vector whereas the second produces a 
data.table/data.frame with a single column. The second avoids those pesky 
warnings about unbound variables but I'd prefer to get the result provided by 
the
first.

Any suggestions/comments on the consistency of these results and/or the binding 
of variables when using data.table inside a package?

Best regards,

Damian

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

[email protected]<mailto:[email protected]>
www.nciea.org<http://www.nciea.org/>



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

Reply via email to