On Wed, 16 Feb 2005 [EMAIL PROTECTED] 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,                  [EMAIL PROTECTED]
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

______________________________________________
R-help@stat.math.ethz.ch mailing list
https://stat.ethz.ch/mailman/listinfo/r-help
PLEASE do read the posting guide! http://www.R-project.org/posting-guide.html

Reply via email to