[R] dataframe computation behaviour

From: Mihai Nica <mihai.p.nica_at_gmail.com>
Date: Sun 16 Jul 2006 - 23:01:12 EST


Greetings:

I have a simple issue; the (probably cumbersome) code follows:

#_______________________________________________

datmod=(dat)

datmod$em96gbr=ifelse(datmod$em96gbr > 0, log(datmod$em96gbr), datmod$em96gbr)

datmod$em96spbr=ifelse(datmod$em96spbr > 0, log(datmod$em96spbr), datmod$em96spbr)

datmod[,4:8]=log(datmod[,4:8])

datmod[,10:13]=log(datmod[,10:13])

datmod[,15:28]=log(datmod[,15:28])

datmod[,4:23]=datmod[,4:23]-datmod$p97

datmod[,25:26]=datmod[,25:26]-datmod$p97

#__________________________________________________

It works fine with the exception of datmod[,26] where the operation "- datmod$p97" is not performed. I thought this might be interesting enough to share with the list :-)

mihai

        [[alternative HTML version deleted]]



R-help@stat.math.ethz.ch mailing list
https://stat.ethz.ch/mailman/listinfo/r-help PLEASE do read the posting guide! http://www.R-project.org/posting-guide.html Received on Mon Jul 17 00:15:03 2006

Archive maintained by Robert King, hosted by the discipline of statistics at the University of Newcastle, Australia.
Archive generated by hypermail 2.1.8, at Mon 17 Jul 2006 - 02:14:43 EST.

Mailing list information is available at https://stat.ethz.ch/mailman/listinfo/r-help. Please read the posting guide before posting to the list.