projectRaster
if the target has a different coordinate reference system (projection).
Before using resample, you may want to consider using these other functions instead: aggregate
, disaggregate
, crop
, extend
, merge
.## S3 method for class 'Raster,Raster':
resample(x, y, method="bilinear", filename="", ...)
x
should be resampled to"bilinear"
for bilinear interpolation, or "ngb"
for using the nearest neighborwriteRaster
aggregate
, disaggregate
, crop
, extend
, merge
, projectRaster
r <- raster(nrow=3, ncol=3)
r[] <- 1:ncell(r)
s <- raster(nrow=10, ncol=10)
s <- resample(r, s, method='bilinear')
#par(mfrow=c(1,2))
#plot(r)
#plot(s)
Run the code above in your browser using DataLab