Tag Info

Hot answers tagged


I wanted to point out that you can rewrite the mean function, mean, which you can write yourself to do anything you want, including ditch the 0 values and calculate the mean. For example, if you want to ignore 0s: meanIgnoringZeroes <- function(x) { mean(x[x!=0],na.rm=T) } Then you can pass the function, meanIgnoringZeroes to overlay: mean <- ...


You cannot have R objects called "2000", so presumably these are fake names? Your example actually should work, so you may want to double check why you think that the results are incorrect. @aaryno's approach should work. I would do this: library(raster) s <- stack(r2000, r2001, r2002, r2003, r2004, r2005) x <- reclassify(s, cbind(0, NA)) r <- ...


According to the Earth Explorer metadata on NAIP JPEG2000: The U.S. Geological Survey (USGS) Earth Resources Observation and Science (EROS) Center manages and distributes NAIP products in JPEG2000 format, which is a compressed file with embedded georeferencing information. The 10:1 lossy compression makes the file size smaller by reorganizing the ...


Adding a .tif extension to the file name solved the problem.

Only top voted, non community-wiki answers of a minimum length are eligible