[R] Two lines, two scales, one graph
David Winsemius
dwinsemius at comcast.net
Tue Aug 25 01:23:42 CEST 2009
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:
> 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
More information about the R-help
mailing list