[R] RE: persp and soil PH data.

Mario DOS REIS ucgamdo at ucl.ac.uk
Mon Sep 22 15:19:43 CEST 2003


Hi,

  What you want to do, i.e. plot a surface representig PH values vs. geographical coordinates is not trivial enough as to be
easily explained here. Your set of points x, y, and pH are not good enough to feed them straight into persp as many people
have already pointed out. You must fit a 'surface' to your data, and them, you can use persp or contour on that surface to plot what
you want. Someone already pointed this out, but I will insist on it again: run to your nearest library and get the book on
modern applied statistics with S and S-plus written by Venables and Ripley, there is a chapter on spatial statistics, that
explains in great detail how to do exactly what you want. In fact, if I remember very well (but I'm not 100% sure) there are
some examples of some soil data, etc. Hope this helps. If after reading that chapter you still have problems, send me a
sample of your data and I will try to reproduce a surface for you.

Hope this helps.
Mario.




More information about the R-help mailing list