[R] Two lines, two scales, one graph

Felix Andrews felix at nfrac.org
Tue Aug 25 01:41:58 CEST 2009


2009/8/25 David Winsemius <dwinsemius at comcast.net>:
> On Aug 24, 2009, at 7:01 PM, Felix Andrews wrote:
>
>> 2009/8/25 David Winsemius <dwinsemius at comcast.net>
>>>
>>> On Aug 24, 2009, at 11:00 AM, Rick wrote:
>>>
>>>> I would like to plot two variables against the same abscissa values.
>>>> They
>>>> have different scales. I've found how to make a second axis on the right
>>>> for labeling, but not how to plot two lines at different scales.
>>>
>>> After using R site search I would ask: have you looked at as.layer in
>>> {latticeExtra}?
>>
>> Don't use as.layer().  For this purpose it has been replaced by
>> doubleYScale(), also in the latticeExtra package.
>
> Interesting. I just downloaded lattice Extra from CRAN this afternnon
> intending to look for doubleYscale and could not find it. So I looked for a
> substitute:

> other attached packages:
> [1] latticeExtra_0.5-4

The current version of latticeExtra is 0.6-1, but you have 0.5-4 installed. See:
http://cran.r-project.org/web/packages/latticeExtra/

[[ For the record, the function is called doubleYScale not doubleYscale. ]]


>
>> sessionInfo()
> R version 2.9.1 Patched (2009-07-04 r48897)
> x86_64-apple-darwin9.7.0
>
> locale:
> en_US.UTF-8/en_US.UTF-8/C/C/en_US.UTF-8/en_US.UTF-8
>
> attached base packages:
> [1] splines   stats     graphics  grDevices utils     datasets  methods
> base
>
> other attached packages:
> [1] latticeExtra_0.5-4 lattice_0.17-25    RColorBrewer_1.0-2 Design_2.1-2
> [5] survival_2.35-4    Hmisc_3.5-2        plotrix_2.5-4
>
> loaded via a namespace (and not attached):
> [1] cluster_1.12.0 grid_2.9.1     tools_2.9.1
>>
>
>
> David Winsemius, MD
> Heritage Laboratories
> West Hartford, CT
>
>



-- 
Felix Andrews / 安福立
Postdoctoral Fellow
Integrated Catchment Assessment and Management (iCAM) Centre
Fenner School of Environment and Society [Bldg 48a]
The Australian National University
Canberra ACT 0200 Australia
M: +61 410 400 963
T: + 61 2 6125 1670
E: felix.andrews at anu.edu.au
CRICOS Provider No. 00120C
-- 
http://www.neurofractal.org/felix/




More information about the R-help mailing list