In case anyone other than me was interested, a pretty efficient
circular tophat can be made using the fields function fields.rdist.near:
CircHat=function (x, y, h=1, gridres = c((max(x)-min(x))/25,(max(y)-
min(y))/25), lims = c(range(x), range(y)),density=FALSE)
{
require(fields)
Hello R users,
I have successfully created a square (or more generally, rectangular)
tophat smoothing routine based on altering the already available
KDE2D. I would be keen to implement a circular tophat routine also,
however this appears to be much more difficult to write efficiently (I
h
Hello R users,
I have successfully created a square (or more generally, rectangular) tophat
smoothing routine based on altering the already available KDE2D. I would be
keen to implement a circular tophat routine also, however this appears to be
much more difficult to write efficiently (I have a rou
3 matches
Mail list logo