"density"(x, sigma, ..., weights=NULL, kernel="gaussian", continuous=TRUE, epsilon = 1e-06, verbose = TRUE, debug = FALSE, savehistory = TRUE)
"density"(x, sigma, ...)
"lpp"
)
to be smoothed.
x
.
as.mask
determining the
resolution of the result.
x
. Weights may be positive, negative or zero.
dkernel
for possible options.
continuous=TRUE
, the
default) or the “equal-split discontinuous” smoother
(continuous=FALSE
).
epsilon
may be deleted.
"linim"
).
sigma
. The computational complexity increases exponentially with
sigma
. You Have Been Warned.x
using one of the algorithms described in Okabe and Sugihara (2012).
The result is a pixel image on the linear network (class
"linim"
) which can be plotted. If continuous=TRUE
(the default), smoothing is performed
using the “equal-split continuous” rule described in
Section 9.2.3 of Okabe and Sugihara (2012). The resulting function
is continuous on the linear network.
If continuous=FALSE
, smoothing is performed
using the “equal-split discontinuous” rule described in
Section 9.2.2 of Okabe and Sugihara (2012). This algorithm is
faster, but the resulting function is not continuous.
There is also a method for split point patterns on a linear network
(class "splitppx"
) which will return a list of pixel images.
lpp
,
linim
X <- runiflpp(3, simplenet)
D <- density(X, 0.2, verbose=FALSE)
plot(D, style="w", main="", adjust=2)
Dw <- density(X, 0.2, weights=c(1,2,-1), verbose=FALSE)
De <- density(X, 0.2, kernel="epanechnikov", verbose=FALSE)
Ded <- density(X, 0.2, kernel="epanechnikov", continuous=FALSE, verbose=FALSE)
Run the code above in your browser using DataLab