🔗Kernel Density Estimation in R
For a recent project I needed to run a kernel density estimation in R, turning GPS points into a raster of point densities. Below is how I accomplished that.
🔗Subset Raster Extent w/ R
A little snippet that helps subset raster extents.
🔗Extract Raster Values
Below is a method to use the raster package
extract()function to get a subet of rasterBrick values. To be specific, I need to extract all raster values that are within a polygon boundary. In the past I have used
mask()and then the
getValues()functions from the
rasterpackage to subset data values within a polygon. But that method returns a data frame with a ton of NA values (anything outside of the crop area in the raster is an NA). This is fine most of the time but the current project that I am working on requires almost all of the memory on my computer. I'm working with extremely large rasters (2Gb). Removing the NA values after the
getValues()process crashes my computer. So I need a more effecient process.
🔗Remote Sensing Tools
A collection of tools and documentation on remote sensing.
See all tags.