[R] replace values?

From: zhijie zhang <epistat_at_gmail.com>
Date: Sun 02 Jul 2006 - 14:39:17 EST


Dear friends,
  i have a dataset like this:
x y z
1 2 3
2 3 1
3 2 1
1 1 3
2 1 2
3 2 3

2 1 1
I want to replace x with the following values:1<-a,2<-b,3<-c,4<-d;

             replace y with the following values:1<-b,2<-a,3<-c,4<-d;
             replace z with the following values:1<-d,2<-c,3<-b,4<-a;
Finally,select two subsets:
1. if x='a';
2.x='a' and y='a';
 thanks very much!
-- 
Kind Regards,
Zhi Jie,Zhang ,PHD
Department of Epidemiology
School of Public Health
Fudan University
Tel:86-21-54237149

	[[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 Sun Jul 02 14:44:33 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 03 Jul 2006 - 08:16:03 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.