[datatable-help] Bug filled [#4878]

Arunkumar Srinivasan aragorn168b at gmail.com
Tue Sep 3 16:50:56 CEST 2013


Statquant, 

I don't think this is a bug because the default NA is indeed NA_logical_

IF you do:

x <- rep(NA, 10)
class(x) # [1] logical

You should just do:

x <- rep(NA_integer_, 10)
class(x) # [1] integer

>From ?NA (first paragraph)
NA is a logical constant of length 1 which contains a missing value indicator. NA can be coerced to any other vector type except raw. There are also constants NA_integer_, NA_real_, NA_complex_ and NA_character_ of the other atomic vector types which support missing values: all of these are reserved (http://127.0.0.1:42400/help/library/base/help/reserved) words in the R language.

Arun


On Tuesday, September 3, 2013 at 4:36 PM, statquant3 wrote:

> I filled a bug [#4878] following this post
> <http://stackoverflow.com/questions/18594017/why-is-data-table-casting-automatically-when-i-assign-all-columns-by-reference/18594544?noredirect=1#18594544> 
> 
> 
> 
> --
> View this message in context: http://r.789695.n4.nabble.com/Bug-filled-4878-tp4675263.html
> Sent from the datatable-help mailing list archive at Nabble.com (http://Nabble.com).
> _______________________________________________
> datatable-help mailing list
> datatable-help at lists.r-forge.r-project.org (mailto:datatable-help at lists.r-forge.r-project.org)
> https://lists.r-forge.r-project.org/cgi-bin/mailman/listinfo/datatable-help
> 
> 


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


More information about the datatable-help mailing list