> On 29 Sep 2016, at 11:40 , Duncan Murdoch <murdoch.dun...@gmail.com> wrote:
> 
> 
> It's a "factor".  read.csv2() defaults to a decimal separator of "," rather 
> than ".", so the last column doesn't look like numbers, and they're being 
> read as character strings, and then automatically converted to a factor.  
> Reading as
> 

Yep, that's the whole point of read.csv2 -- someone stupidly decided (back in 
the 90's) that the use of comma as a decimal separator in some languages should 
extend to storage file formats.  That, of course, ruined the CSV standard use 
of comma as a field separator and prompted the double-standard situation where 
.csv files can be comma/period or semicolon/comma style, often depending on 
languages settings, which in turn can make data transfer between different 
languages an ungodly mess....

As Duncan points out, R provides settings that will (mostly) let you handle csv 
files that are written in hybrid formats like semicolon/period. 
______________________________________________
R-help@r-project.org mailing list -- To UNSUBSCRIBE and more, see
https://stat.ethz.ch/mailman/listinfo/r-help
PLEASE do read the posting guide http://www.R-project.org/posting-guide.html
and provide commented, minimal, self-contained, reproducible code.

Reply via email to