问题描述
我目前正在与 density.ppp
函数,并使用我自己设计的不同内核函数调用它.为此,我需要通过...
arglist通过density.ppp
将一些参数传递给我的内核函数.
I am currently working intensively with the density.ppp
function, calling it with different kernel functions of my own design.For this, I need to pass some arguments through density.ppp
to my kernel functions via the ...
arglist.
在一种情况下,这是行不通的,即如果我想通过边缘校正来计算at = "points"
.
There is one case in which this does not work, namely if I want to calculate at = "points"
with edge correction.
在densitypointsengine
中说
# evaluate edge correction weights at points
if(edge) {
win <- x$window
if(isgauss && is.null(varcov) && win$type == "rectangle") {
# evaluate Gaussian probabilities directly
xr <- win$xrange
yr <- win$yrange
xx <- x$x
yy <- x$y
xprob <-
pnorm(xr[2L], mean=xx, sd=sigma) - pnorm(xr[1L], mean=xx, sd=sigma)
yprob <-
pnorm(yr[2L], mean=yy, sd=sigma) - pnorm(yr[1L], mean=yy, sd=sigma)
edgeweight <- xprob * yprob
} else {
edg <- second.moment.calc(x, sigma=sigma,
kernel=kernel,
scalekernel=scalekernel,
what="edge", varcov=varcov)
edgeweight <- safelookup(edg, x, warn=FALSE)
}
因此,这里对second.moment.calc
的调用不支持...
中隐藏的其他参数.
so here the call for second.moment.calc
does not support additional parameters hidden in ...
.
我想知道这可能是错误,还是故意这样做.
I would like to know whether this might be a bug or if it is done this way on purpose.
推荐答案
这是一个错误.对second.moment.calc
的调用中应该有一个...
.
This is a bug. There should be a ...
in the call to second.moment.calc
.
很快将在spatstat
的开发版本中对其进行修复.
It will be fixed in the development version of spatstat
shortly.
这篇关于通过`density.ppp`向内核函数发出粘贴参数的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!