[R] remap values from one vector to the other

Jim Lemon jim at bitwrit.com.au
Thu Oct 31 11:01:39 CET 2013

On 10/31/2013 08:23 PM, Alaios wrote:
> Hi everyone,
> I am plotting some legend and I am using the axis(at=..) to specify the place to plot the marks I want.
> My plotted data have ncol(x) so the at places have values that span from 1 to ncol(x)
> there I would like to be able to map values that go from 880e6 to 1020e6.....
> so
> 880e6 remaps to 1
> ....
> 1020e6 repams to ncol(x)
> what I do not know how to do is to remap the values that are between 880e6 and 1020e6 between then 1 and ncol(x).
> Can someone help me find an appropriate function for that?
Hi Alex,
Try rescale in plotrix.


More information about the R-help mailing list