Isn't anything in a data frame that is not explicitly numeric a *factor*? -Greg > -----Original Message----- > From: Peter Dalgaard BSA [mailto:p.dalgaard@biostat.ku.dk] > Sent: Friday, December 07, 2001 5:32 PM > To: Erich Neuwirth > Cc: r-devel@stat.math.ethz.ch > Subject: Re: [Rd] question > > > Erich Neuwirth <erich.neuwirth@univie.ac.at> writes: > > > in r 1.3.1, > > i read in data into a dataframe and (erroneously) forgot > to convert text > > into numbers. > > > > the frame was called olddata > > then i could to the following calculation: > > > > vp95<-olddata["vp95"]/olddata["wb95"] > > > > "vp95" and "wb95" are column names. > > > > in r 1.4.0, this does not work any more. > > i have to do > > > > vp95<-as.real(olddata[,"vp95"])/as.real(olddata[,"wb95"]) > > > > is this intended behavior now? > > Eh? Could you give an example of how to create such a data > frame? The > things I can think up give the same in both versions? > > -- > O__ ---- Peter Dalgaard Blegdamsvej 3 > c/ /'_ --- Dept. of Biostatistics 2200 Cph. N > (*) \(*) -- University of Copenhagen Denmark Ph: > (+45) 35327918 > ~~~~~~~~~~ - (p.dalgaard@biostat.ku.dk) FAX: > (+45) 35327907 > -.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-. > -.-.-.-.-.-.-.-.-.- > 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 > _._._._._._._._._._._._._._._._._._._._._._._._._._._._._._. > _._._._._._._._._._ > LEGAL NOTICE Unless expressly stated otherwise, this message is confidential and may be privileged. It is intended for the addressee(s) only. Access to this E-mail by anyone else is unauthorized. If you are not an addressee, any disclosure or copying of the contents of this E-mail or any action taken (or not taken) in reliance on it is unauthorized and may be unlawful. If you are not an addressee, please inform the sender immediately. -.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.- 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 _._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._
On Fri, 7 Dec 2001, Warnes, Gregory R wrote:> > Isn't anything in a data frame that is not explicitly numeric a *factor*?No. You can have columns of just about any type in a data frame, including logical, complex, character, POSIXt, .... In (pre-)1.4.0 read.table will generate these for you much more often (and more easily). -- 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 _._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._
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 -- Erich Neuwirth, Computer Supported Didactics Working Group Visit our SunSITE at http://sunsite.univie.ac.at Phone: +43-1-4277-38624 Fax: +43-1-4277-9386 -.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.- 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 _._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._
Possibly Parallel Threads
- CForest Error Logical Subscript Too Long
- R Processing dataframe by group - equivalent to SAS by group processing with a first. and retain statments
- R Processing dataframe by group - equivalent to SAS by group processing with a first. and retain statments
- Identify first row of each ID within a data frame, create a variable first =1 for the first row and first=0 of all other rows
- R Processing dataframe by group - equivalent to SAS by group processing with a first. and retain statments