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 > [email protected] > (mailto:[email protected]) > https://lists.r-forge.r-project.org/cgi-bin/mailman/listinfo/datatable-help > >
_______________________________________________ datatable-help mailing list [email protected] https://lists.r-forge.r-project.org/cgi-bin/mailman/listinfo/datatable-help
