R: Taper Functions

taperoff {spatstat.utils} | R Documentation

## Taper Functions

### Description

Computes a function that tapers smoothly from 0 to 1.

### Usage

    taperoff(x, zeropoint = 0, onepoint = 1,
             type = c("smooth", "cosine", "Gaussian"))

### Arguments

`x` | Function argument. A number or a numeric vector.
`zeropoint` | Value of `x` that should return a function value of 0.
`onepoint` | Value of `x` that should return a function value of 1.
`type` | Character string (partially matched) specifying which taper function to use.

### Details

A taper is a mathematical function that exhibits a gradual transition between the values 0 and 1.

By default, the function value f(x) is equal to 0 if x ≤ 0, is equal to 1 if x ≥ 1, and lies between 0 and 1 when 0 < x < 1.

If `type="cosine"`, the function is the cosine taper f(x) = 1 - cos(π * x)/2.

If `type="smooth"` the function is the smooth partition of unity f(x) = θ(x)/(θ(x) + θ(1-x)) where θ(x) = exp(-1/x).

If `type="Gaussian"` the function is the cumulative distribution function of the Gaussian (normal) distribution with mean 1/2 and standard deviation 1/6.

If `zeropoint` and `onepoint` are specified, then the function value is equal to 0 when `x=zeropoint`, equal to 1 when `x=onepoint`, and lies between 0 and 1 when `x` lies between `zeropoint` and `onepoint`.

### Value

A numeric vector of the same length as `x`.

### Author(s)

Adrian Baddeley

### Examples

      curve(taperoff(x, type="smooth"))
      curve(taperoff(x, type="cosine"), add=TRUE, col="green")
      curve(taperoff(x, type="Gaussian"), add=TRUE, col="blue")

[Package spatstat.utils version 1.17-0 Index]