[Rd] question
Prof Brian Ripley
ripley@stats.ox.ac.uk
Sat, 8 Dec 2001 10:18:34 +0000 (GMT)
On Sat, 8 Dec 2001, Erich Neuwirth wrote:
> here is the example
>
> this is how i read my data
>
> assign("oldfilename","d:\\documents\\wahl99\\nrw95testin.csv",envir=.GlobalEnv)
> olddata<-read.csv(oldfilename,as.is=TRUE,sep=";",header=FALSE,
> col.names=c("nr","name","wb95","abg95","glt95",
> "sp95","vp95","fp95","gr95","lif95"))
>
>
> when i then compute
> olddata["sp95"]/olddata["wb95"]
>
> r 1.3.1 is ok,
> and r 1.4.0 says
>
> Error in FUN(left, right) : non-numeric argument to binary operator
Well, actually 1.3.1 was not behaving as documented:
as.is: the default behavior of `read.table' is to convert
...
numeric indices which specify which columns should be left as
character strings.
and 1.4.0 is. I'll revert the behaviour and correct the documentation.
The `as.is' argument has been superseded anyway by `colClasses'.
--
Brian D. Ripley, ripley@stats.ox.ac.uk
Professor of Applied Statistics, http://www.stats.ox.ac.uk/~ripley/
University of Oxford, Tel: +44 1865 272861 (self)
1 South Parks Road, +44 1865 272860 (secr)
Oxford OX1 3TG, UK Fax: +44 1865 272595
-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-
r-devel mailing list -- Read http://www.ci.tuwien.ac.at/~hornik/R/R-FAQ.html
Send "info", "help", or "[un]subscribe"
(in the "body", not the subject !) To: r-devel-request@stat.math.ethz.ch
_._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._