Re: [R] Applying interpolation within a convex hull

From: Rolf Turner <>
Date: Sun, 17 Apr 2011 11:35:31 +1200

On 17/04/11 10:01, sam.e wrote:
> Hi there,
> I have been using the Tps function (within the Fields package) for a while
> now to interpolate different sedimentary units. Due to the method of
> formation of the units I know that at some edges the thickness of the unit
> decreases to zero. I was wondering if there was someway to specify that the
> interpolation only occurs within the convex hull of the data, outside of
> which the the values are zero. I am having problems with the output surface
> 'curling' up at distance from the data.

The interp() (and interpp()) functions in the "akima" package have argument "extrap" which defaults to FALSE whence interpolation is confined to the convex hull of the data. Sounds like what you want.


         Rolf mailing list PLEASE do read the posting guide and provide commented, minimal, self-contained, reproducible code. Received on Sat 16 Apr 2011 - 23:38:00 GMT

Archive maintained by Robert King, hosted by the discipline of statistics at the University of Newcastle, Australia.
Archive generated by hypermail 2.2.0, at Tue 19 Apr 2011 - 09:30:31 GMT.

Mailing list information is available at Please read the posting guide before posting to the list.

list of date sections of archive