| taperoff {spatstat.utils} | R Documentation |
Computes a function that tapers smoothly from 0 to 1.
taperoff(x, zeropoint = 0, onepoint = 1,
type = c("smooth", "cosine", "Gaussian"))
x |
Function argument. A number or a numeric vector. |
zeropoint |
Value of |
onepoint |
Value of |
type |
Character string (partially matched) specifying which taper function to use. |
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.
A numeric vector of the same length as x.
Adrian Baddeley
curve(taperoff(x, type="smooth")) curve(taperoff(x, type="cosine"), add=TRUE, col="green") curve(taperoff(x, type="Gaussian"), add=TRUE, col="blue")