[R] Error in plot.window(...) : need finite 'ylim' values

Rich Shepard rshepard at appl-ecosys.com
Thu Jan 5 18:53:19 CET 2012


On Thu, 5 Jan 2012, William Dunlap wrote:

> Most plot methods die with an error like this if all the values in y (or
> x) are NA.  E.g., you get the same problem with
>   plot(rep(NA, 10)) 
> Remove the columns that are all NA's before trying to plot them.

Bill,

   Ah, so. I did not look to see if all the data frames that did plot had at
least one value in each column.

> An ugly way of avoiding the error that stops you from seeing the
> non-missing columns of the dataset is to replace plot.window with a
> version that assigns an arbitrary value to xlim or ylim if they contain
> illegal values:

   Ugly is only skin deep; I'll take your advice on addressing this issue
with the two streams that fail to plot.

   There is still something I'm not doing properly because a lattice xyplot()
of TDS concentrations by time conditioned by sites on a stream show more
points than do the zoo line plots for the same stream. I assume that's not
correct. I need to look for the reason(s) for the differences, but I must
get a report revised and out to a client today so it will be at least
tomorrow before I'm back on this.

Thanks very much,

Rich



More information about the R-help mailing list