Dear All,
 
I want to create one numeric variable from a factor one. here is a simple example:
 
x1      x2     factor
x11    x21    f1
x12    x22    f1
x13    x23    f2
x14    x24    f3
.        .         .
.        .         .
 
Suppose that the variable factor has 3 levels (f1,f2,f3). I want to add to this data frame a numeric variable x4 in (v1,v2,v3) such that x4=v1 if factor = f1, x4 = v2 if factor = f2 and x4 = v3 if factor = f3.
 
 
 
Thanks a lot for any help,
 
Bernard  

		
---------------------------------


	[[alternative HTML version deleted]]


