[Raster-commits] r390 - pkg/raster/R
noreply at r-forge.r-project.org
noreply at r-forge.r-project.org
Fri Apr 3 08:55:26 CEST 2009
Author: jacobvanetten
Date: 2009-04-03 08:55:26 +0200 (Fri, 03 Apr 2009)
New Revision: 390
Modified:
pkg/raster/R/distance.R
Log:
back to fromCells = !is.na
Modified: pkg/raster/R/distance.R
===================================================================
--- pkg/raster/R/distance.R 2009-04-03 03:44:57 UTC (rev 389)
+++ pkg/raster/R/distance.R 2009-04-03 06:55:26 UTC (rev 390)
@@ -17,7 +17,7 @@
if(dataContent(object)=='all' & canProcessInMemory(object, 5)){
outRaster <- raster(object, filename=filename)
- fromCells <- which(values(object) > 0)
+ fromCells <- which(!is.na(values(object) > 0))
toCells <- (1:n)[-fromCells]
accDist <- rep(0,times=n)
accDist[toCells] <- Inf
More information about the Raster-commits
mailing list