Tag Info

Hot answers tagged

3

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 <- ...


2

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 <- ...


2

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 ...


1

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



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