[R] Re - segments within a lattice graph
ripley at stats.ox.ac.uk
Mon Jan 6 13:19:02 CET 2003
On Mon, 6 Jan 2003 John.Gavin at ubsw.com wrote:
> The solution to my problem is to use
> 'lsegments' instead of 'segments' within lattice commands.
> (Although I wont forget again,
> a comment in the segments help file referring to 'lsegments'
> might help others not to make the same mistake in the future.)
*But* the segments help file is part of base R graphics, and xyplot and
lsegments are part of the recommended addon package lattice. To be
consistent you would want us to document in base R all the places where
there are limitations of usage with addons (or recommended addons).
There would be an awful lot of those (including on all of the
graphics-related help pages).
Surely the answer is to read the documentation of the package you are
using to see *its* restrictions. In your case you were using a panel
function in xyplot, and ?xyplot's panel argument does explicitly tell you
There are also some grid-compatible replacements of base R graphics
functions useful for this purpose, such as `llines'. (Note
that the corresponding base R graphics functions like `lines'
would not work.) These are usually sufficient to convert
existing custom panel functions written for S-Plus.
Brian D. Ripley, ripley at stats.ox.ac.uk
Professor of Applied Statistics, http://www.stats.ox.ac.uk/~ripley/
University of Oxford, Tel: +44 1865 272861 (self)
1 South Parks Road, +44 1865 272866 (PA)
Oxford OX1 3TG, UK Fax: +44 1865 272595
More information about the R-help