Problem solved... I just change 'getValues' to 'getValuesBlock' and voilà! Best, Eric -- View this message in context: http://r-sig-geo.2731867.n2.nabble.com/Write-a-new-raster-brick-calculated-from-the-other-two-raster-stacks-tp7588029p7588036.html Sent from the R-sig-geo mailing list archive at Nabble.com.