Re: [R] 2D density tophat

2008-12-05 Thread Aaron Robotham
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)

[R] 2D density tophat

2008-12-01 Thread Aaron Robotham
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

[R] 2D density tophat

2008-11-29 Thread Aaron Robotham
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