[R] Changing data scales

Jim Lemon jim at bitwrit.com.au
Mon Aug 22 10:13:38 CEST 2011


On 08/22/2011 10:04 AM, Jim Silverton wrote:
> I have data that ranges from 0.3 to 2 and I want to change the scale to be
> from 0 to 1.
> Can this be done in R?
>
Hi Jim,

library(prettyR)
rescale(x,c(0,1))

will linearly transform x into the specified range.

Jim



More information about the R-help mailing list