From h.wickham at gmail.com  Thu Apr 17 15:49:08 2014
From: h.wickham at gmail.com (Hadley Wickham)
Date: Thu, 17 Apr 2014 08:49:08 -0500
Subject: [Rd] type.convert and doubles
In-Reply-To: <534860CC.2090206@gmail.com>
References: <3736EC2D-7360-4AF6-BF96-5A2DF3D3EF14@warnes.net>
	<326FE12B-D6FE-471B-9E0C-10BEC0584DB7@r-project.org>
	<534860CC.2090206@gmail.com>
Message-ID: <CABdHhvHNhps=YKK712Y+5iMeo8TyBY+60KT7tc3fSX-kSotn7A@mail.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/



[Rd] type.convert and doubles
Hadley Wickham