[R] Scaling X axis from -1 to 1
dwinsemius at comcast.net
Tue Sep 16 04:36:51 CEST 2008
On Sep 15, 2008, at 9:49 PM, Gundala Viswanath wrote:
> Dear Jim,
> I cannot find the function "rescale".
> Does it belong to any particular package?
> - Gundala Viswanath
> Jakarta - Indonesia
Marc's plotrix theory certainly looks probable, but a Google search
... and for some reason Google did not rank a link to the plotrix
package highly enough to be on the first two pages. Appears that the
two functions handle exception trapping somewhat differently. The
material in Kickstarting-R looks top-notch for us beginners.
R Site Search produced quite a few other rescale() or rescale work
> On Mon, Sep 15, 2008 at 5:24 PM, Jim Lemon <jim at bitwrit.com.au> wrote:
>> Gundala Viswanath wrote:
>>> I have a density plot in which the x axis
>>> ranged from 0 to 2000.
>>> How can I scale the data so that the x-axis
>>> is scaled in -1 to 1 form?
>> Hi Gundala,
>> If your data is named "mydata":
>> This will linearly transform "mydata" into the range -1 to 1. You
>> may also
>> want to manually create the axis on the plot:
>> If you want the original values.
> R-help at r-project.org mailing list
> 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