[R] how to recode in my dataset?

2006-07-02 Thread zhijie zhang
Dear Rusers, My question is about recode variables. First, i'd like to say something about the idea of recoding: My dataset have three variables:type,soiltem and airtem,which means grass type, soil temperature and air temperature. As we all known, the change of air temperature is greater than

Re: [R] how to recode in my dataset?

2006-07-02 Thread Dimitrios Rizopoulos
probably ?cut() is what you're looking for, e.g., something like: ind - cut(mydata$soiltem, seq(0, 60, 0.2), labels = FALSE) seq(0.1, 60, 0.2)[ind] I hope it helps. Best, Dimitris Dimitris Rizopoulos Ph.D. Student Biostatistical Centre School of Public Health Catholic University of

Re: [R] how to recode in my dataset?

2006-07-02 Thread ronggui
I always use recode function (in the car packages) to recode variables.That works well and I like that function. 2006/7/2, zhijie zhang [EMAIL PROTECTED]: Dear Rusers, My question is about recode variables. First, i'd like to say something about the idea of recoding: My dataset have three