[R] Two Dimensional Transformation

Nikhil Kaza nikhil.list at gmail.com
Fri Jul 16 13:22:20 CEST 2010


Unless I am missing something this should do it

  a<- cbind(runif(10),runif(10))
b <- cbind(a[,1]+a[,2], a[,1]/a[,2])




On Jul 16, 2010, at 7:00 AM, Ravi Ramaswamy wrote:

> Hi -
>
> I am trying to map a two dimensional area A to another two  
> dimensional area
> B using a function.  For instance A = {(x,y), 0<x<1, 0<y<1}, and the
> function is u = x+y and v = x/y.  2-D area is defined by (u,v).
>
> Is there a way I can do this in R?
>
> Thanks
>
> Ravi
>
> 	[[alternative HTML version deleted]]
>
> ______________________________________________
> R-help at r-project.org mailing list
> https://stat.ethz.ch/mailman/listinfo/r-help
> PLEASE do read the posting guide http://www.R-project.org/posting-guide.html
> and provide commented, minimal, self-contained, reproducible code.



More information about the R-help mailing list