[R] "Local trend surfaces" Ex from V&R MASS

(Ted Harding) Ted.Harding at nessie.mcc.ac.uk
Fri Mar 7 15:11:26 CET 2003


Hi Folks,

I'm probably overlooking some small point, but can't see it.

Trying the "Local trend surfaces" example from p.437 of MASS
(3rd edn) by V&R, all goes well until the line

contour(topo.mar$x, topo.mar$y, topo.lo$fit,
        levels=seq(700,1000,25), xlab="fi t", ylab="")

which produces the response:

  Error in contour.default(topo.mar$x, topo.mar$y, topo.lo$fit,
  levels = seq(700,  : 
          no proper `z' matrix specified

I've checked the sizes of topo.mar$x, topo.mar$y and topo.lo$fit, and
they should all line up, so I can't see why "no proper `z' matrix
specified". I notice that topo.lo$fit has NAs (but "NA's are allowed"
according to "?contour") and wonder if this may be causing a problem
(options("na.action")->[1] "na.omit").

Using R 1.6.2 here ... 

Thanks for any info,
Ted.


--------------------------------------------------------------------
E-Mail: (Ted Harding) <Ted.Harding at nessie.mcc.ac.uk>
Fax-to-email: +44 (0)870 167 1972
Date: 07-Mar-03                                       Time: 14:11:26
------------------------------ XFMail ------------------------------



More information about the R-help mailing list