I have a little problem with the bar plot function of R 3.1.0. (it works fine in older versions).
nd_p_a<- read.csv(\"nd_p_a.csv\")
barplot(nd_p_a$y, col=
There seems to be an issue with the new version (3.1.0) of type.convert()
which gets called by read.table()
which gets called by read.csv()
in R. The most recent version of type.convert()
assumes that the representation in your file is more accurate than R's internal numeric storage format (double-precision floating point values) and thus casts it to a FACTOR. This behavior appears very surprising to a bunch of people, so I would bet it will go away, or there will be a parameter that will be able to be passed to type.convert()
through the chain. It seems sufficiently painful for people (including myself) that rely on the old-standing behavior of the automatic field type detection algorithm.
This question should be cross-linked somewhere upstream to something like "Why doesn't read.csv()
work reliably with floating point values anymore?"
http://r.789695.n4.nabble.com/type-convert-and-doubles-td4688616.html
Here is a work around. The new behavior is annoying
read.csv("nd_p_a.csv", colClasses=c("numeric", "numeric"))