[R] Strange behaviour of as.integer()

Ulrich Keller uhkeller at web.de
Mon Jan 11 10:41:11 CET 2010


I would like to thank all those who wrote helpful and interesting
replies to my question. I could have saved myself the time for writing
it up had I simply read ?as.integer. However, under the circumstances in
which I first encountered as.integer's truncating behaviour this was not
so obvious because as.integer was called implicitly. To summarize my
initial problem:

> length(rep(0, .57 * 100))
[1] 56



More information about the R-help mailing list