[R] weird error with contourplot

Cable, Samuel B Civ USAF AFMC AFRL/RVBXI Samuel.Cable at hanscom.af.mil
Thu Apr 16 15:54:38 CEST 2009


Sorry if I am cluttering up this list with too many rank beginner
questions.  But I *am* a rank beginner, and I am at my wit's end with
this one:

I have a data frame df, with components x,y,z.  This command to make a
contour plot with lattice graphics works just fine:

> contourplot(z~x*y,data=df,cuts=20)

Then I try

> contourplot(z~x*y,data=df,cuts=20,region=T)

And it dies on me with the error:

Error in unit(x, default.units) : 'x' and 'units' must have length > 0


I have done maybe a hundred contour plots in this same exact way, and
have never seen this error before.  And it seems to me that adding the
flag region=T should be a benign thing to do.  I have no idea what it
causing the problem.  Anyone see what I'm doing wrong?  Thanks!

--Sam Cable




More information about the R-help mailing list