[R-sig-Geo] Best way to get values of a raster that are not masked?
Jonathan Greenberg
greenberg at ucdavis.edu
Thu Jun 3 02:27:50 CEST 2010
I've got a file and a mask (1s for "good data", NAs for "bad"), and I
want to extract the cell values AND geographic coordinates of these
cells into a data frame or vector that correspond to the locations
where the mask is 1 -- what is the best practice for doing this? I
can loop through each row/block and do the query, but is there a
"cleaner" way of approaching this in raster()?
--j
More information about the R-sig-Geo
mailing list