Do you mean:

> pmax(x[,1], x[,2]) / pmin(x[,1], x[,2])
[1] 3.00 2.25 3.75 2.25

??

Andy

> From: Dan Bolser
> 
> Hi,
> 
> I have data like this....
> 
> print(x)
> 
> ID    VAL1    VAL2
> 1     2       6
> 2     4       9
> 3     45      12
> 4     99      44
> 
> What I would like is data like this...
> 
> ID    VAL1    VAL2
> 1     2       6
> 2     4       9
> 3     12      45
> 4     44      99
> 
> 
> So that my analysis of the ratio VAL2/VAL1 is somehow uniform.
> 
> Any advice is welcome!
> 
> Dan.

______________________________________________
[EMAIL PROTECTED] mailing list
https://www.stat.math.ethz.ch/mailman/listinfo/r-help
PLEASE do read the posting guide! http://www.R-project.org/posting-guide.html

Reply via email to