[R-sig-Geo] kde output from ks reversed

Robert Hijmans r.hijmans at gmail.com
Sat Feb 19 20:49:05 CET 2011


> What are good raster formats and R libraries for dealing with non-square
cells?

You can use geotiff, as in my example ("file.tif").

> Is this proper use of the hpi values from R? 

I do not know that

> How can I effectively get these rasters back to square cells 

I can see two ways to make the cells square. 

1) resampling the result
 
r2 = raster(r)
res(r2) = min(res(r))
r2 <- resample(r, r2, method='bilinear')


2) A better solution is to provide equally spaced evaluation points, using a
pre-defined square-cell grid (here re-using r2):

eval <- xyFromCell(r2, 1:ncell(r2))
ud_hpi <- kde(x = curset, H=Hpi1, eval.points=eval) 
r3 <- setValues(r2, ud_hpi$estimate)


Robert

-- 
View this message in context: http://r-sig-geo.2731867.n2.nabble.com/kde-output-from-ks-reversed-tp6037090p6044046.html
Sent from the R-sig-geo mailing list archive at Nabble.com.



More information about the R-sig-Geo mailing list