RE: [R] scaling axes when plotting multiple data sets

2005-02-17 Thread Prof Brian Ripley
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

Re: [R] scaling axes when plotting multiple data sets

2005-02-16 Thread John Fox
Dear Ben, On Wed, 16 Feb 2005 17:04:13 -0500 Benjamin M. Osborne [EMAIL PROTECTED] wrote: 1) When adding additional data sets to a plot using plot followed by lines, is there a way to automate the scaling of the axes to allow for all data sets to fit within the plot area? Not, to my

Re: [R] scaling axes when plotting multiple data sets

2005-02-16 Thread Spencer Graves
I just did ?min and found an argument na.rm, which when TRUE causes min to ignore NAs. Also, See Also for ?min mentions range, which returns a 2-vector consisting of both min and max. The function range also accepts the na.rm argument. AND the documentation for range includes a simple

Re: [R] scaling axes when plotting multiple data sets

2005-02-16 Thread Gabor Grothendieck
Benjamin M. Osborne Benjamin.Osborne at uvm.edu writes: : : 1) When adding additional data sets to a plot using plot followed by lines, : is there a way to automate the scaling of the axes to allow for all data sets : to fit within the plot area? : : 2) I attempted to solve this by setting :