Bug in raster::canProcessInMemory?
The current code is:
```
function(x, n=4) {
if (.toDisk()) {
return(FALSE)
}
n <- n + nlayers(x) - 1
cells <- round( 1.1 * ncell(x) ) * n
if ( cells > .maxmemory() ) {
return(FALSE)
} else {
return(TRUE)
}
}
```
The line ``n <- n + nlayers(x) - 1`` seems like it should be ``n <- n *
nlayers(x)``.
Better yet, I'd remove that line and change the next to: ``cells <- round(
1.1 * ncell(x) * nlayers(x) ) * n``
Hope this helps,
Kenny
Kendon Bell Email: kmb56 at berkeley.edu Phone: (510) 612-3375 Ph.D. Candidate Department of Agricultural & Resource Economics University of California, Berkeley [[alternative HTML version deleted]]