Skip to content
Prev 3698 / 29559 Next

akima interpolation + Delaunay triangulation

In answering Steven I forgot to address this list also, so here is a repost of my answer (see below). At closing the R session in Emacs/ESS I got this:
*** SDTRAN Error 2: The first three data points are collinear.

    Error detected in SDTRAN called by SDSF3P

 
*** SDTRAN Error 2: The first three data points are collinear.

    Error detected in SDTRAN called by SDSF3P

 
*** SDTRAN Error 2: The first three data points are collinear.

    Error detected in SDTRAN called by SDSF3P


Process R finished at Wed Jun 04 11:05:28 2008

For this reason I have included the maintainer in the list. It support my answer.



My answer to Steven:

I think that it is because you data allready is gridded.

See ?interp where it is mentioned in the section on arguments:

          'x', 'y', and 'z' must be the same length and may contain no
          fewer than four points. The points of 'x' and 'y' cannot be
          collinear, i.e, they cannot fall on the same line (two
          vectors 'x' and 'y' such that 'y = ax + b' for some 'a', 'b'
          will not be accepted). 'interp' is meant for cases in which
          you have 'x', 'y' values scattered over a plane and a 'z'
          value for each.  If, instead, you are trying to evaluate a
          mathematical function, or get a graphical interpretation of
          relationships that can be described by a polynomial, try
          'outer()'. 

Try:

par(mfrow=c(2,1))
plot(u,v)
plot(jitter(u),jitter(v))

soil.interp3 <- interp(jitter(u),jitter(v),moist, linear=FALSE)
plot.surface(soil.interp3)


Best regards

Frede Aakmann T?gersen
Scientist


UNIVERSITY OF AARHUS
Faculty of Agricultural Sciences
Dept. of Genetics and Biotechnology
Blichers All? 20, P.O. BOX 50
DK-8830 Tjele

Phone:   +45 8999 1900
Direct:  +45 8999 1878

E-mail:  FredeA.Togersen at agrsci.dk
Web:	   http://www.agrsci.org				

This email may contain information that is confidential.
Any use or publication of this email without written permission from Faculty of Agricultural Sciences is not allowed.
If you are not the intended recipient, please notify Faculty of Agricultural Sciences immediately and delete this email.