[Rd] type.convert and doubles

Hadley Wickham h.wickham at gmail.com
Thu Apr 17 15:49:08 CEST 2014


> 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/



More information about the R-devel mailing list