[R] Applying interpolation within a convex hull
Rolf Turner
rolf.turner at xtra.co.nz
Sun Apr 17 01:35:31 CEST 2011
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.
cheers,
Rolf
More information about the R-help
mailing list