[R] scaling axes when plotting multiple data sets
Prof Brian Ripley
ripley at stats.ox.ac.uk
Thu Feb 17 08:49:36 CET 2005
On Wed, 16 Feb 2005 davidr at rhotrading.com wrote:
> min, max, and range (and many other functions) take the na.rm parameter
> to ignore NAs, but the Infs must be removed by hand as far as I know:
>
> dat <- c(data1,data2,data3,data4)
> dat <- dat[(dat!=Inf)&(dat!=(-Inf))]
> rng <- range(dat, na.rm=TRUE)
> then use xlim = rng
range(dat[is.finite(dat)]) is clearer, I find.
--
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
mailing list