Message-ID: <CABdHhvHNhps=YKK712Y+5iMeo8TyBY+60KT7tc3fSX-kSotn7A@mail.gmail.com>
Date: 2014-04-17T13:49:08Z
From: Hadley Wickham
Subject: type.convert and doubles
In-Reply-To: <534860CC.2090206@gmail.com>
> Strictly speaking, I don't think this is true. If it were, it would not have
> been necessary to make the change so that it does now fallback to using
> character/factor. It may, however, have always been the intent.
>
> I don't really think a warning is necessary, but there are some surprises:
>
>> str(type.convert(format(1/3, digits=17))) # R-3.0.3
> num 0.333
>
>> str(type.convert(format(1/3, digits=17))) # R-3.1.0
> Factor w/ 1 level "0.33333333333333331": 1
It is bizarre that it makes a factor rather than a string.
0.333333333333 is pretty obviously not a categorical value.
Hadley
--
http://had.co.nz/