[R] text() and vector arguments like adj
Prof Brian Ripley
ripley at stats.ox.ac.uk
Mon Jul 30 17:50:13 CEST 2007
On Sat, 28 Jul 2007, strinz at freenet.de wrote:
> I remarked that the function
> ## Default S3 method:
> text (x, y = NULL, labels = seq(along = x), adj = NULL,pos = NULL, offset = 0.5, vfont = NULL,cex = 1, col = NULL, font = NULL, ...)
> accepts vectors of arguments (of the same length) except for the
> parameter adj.
Not true, e.g. for vfont.
> When passing a vector of information for adjusting the labels, only the
> first value is taken.
You mean supplying a vector value of length > 1 for 'adj', I guess.
> Any special reason for this ?
Yes, please DO read the help page:
adj: one or two values in [0,1] which specify the x (and
optionally y) adjustment of the labels. On most devices
values outside that interval will also work.
Note, 'one or two'.
> btw: could a rotating argument like the 'srt' argument in mtext() be
> incorporated ?
Yes, *parameter* 'srt' works exactly as in mtext: see the '...' part of
the help page.
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