From simon.urbanek at r-project.org  Fri Apr 11 19:43:48 2014
From: simon.urbanek at r-project.org (Simon Urbanek)
Date: Fri, 11 Apr 2014 13:43:48 -0400
Subject: [Rd] type.convert and doubles
In-Reply-To: <3736EC2D-7360-4AF6-BF96-5A2DF3D3EF14@warnes.net>
References: <3736EC2D-7360-4AF6-BF96-5A2DF3D3EF14@warnes.net>
Message-ID: <326FE12B-D6FE-471B-9E0C-10BEC0584DB7@r-project.org>

Greg,

On Apr 11, 2014, at 11:50 AM, Gregory R. Warnes <greg at warnes.net> wrote:

> Hi All,
> 
> I see this in the NEWS for R 3.1.0: 
> 
> type.convert() (and hence by default read.table()) returns a character vector or factor when representing a numeric input as a double would lose accuracy. Similarly for complex inputs.
> 
> This behavior seems likely to surprise users.

Can you elaborate why that would be surprising? It is consistent with the intention of type.convert() to determine the correct type to represent the value - it has always used character/factor as a fallback where native type doesn't match. It has never issued any warning in that case historically, so IMHO it would be rather surprising if it did now?

Cheers,
Simon


>  Would it be possible to issue a warning when this occurs?
> 
> Aside: I?m very happy to see the new ?s? and ?f? browser (debugger) commands!
> 
> -Greg
> 	[[alternative HTML version deleted]]
> 
> ______________________________________________
> R-devel at r-project.org mailing list
> https://stat.ethz.ch/mailman/listinfo/r-devel



[Rd] type.convert and doubles
Simon Urbanek