[Raster-commits] r336 - pkg/raster/R
noreply at r-forge.r-project.org
noreply at r-forge.r-project.org
Tue Mar 10 02:14:40 CET 2009
Author: rhijmans
Date: 2009-03-10 02:14:40 +0100 (Tue, 10 Mar 2009)
New Revision: 336
Modified:
pkg/raster/R/replacement.R
Log:
Modified: pkg/raster/R/replacement.R
===================================================================
--- pkg/raster/R/replacement.R 2009-03-09 12:30:14 UTC (rev 335)
+++ pkg/raster/R/replacement.R 2009-03-10 01:14:40 UTC (rev 336)
@@ -33,8 +33,10 @@
stop('raster too large.')
}
}
- i <- subset(i, (i <= ncell(x)))
- i <- subset(i, (i >= 1))
+ if (!is.logical(i)) {
+ i <- subset(i, (i <= ncell(x)))
+ i <- subset(i, (i >= 1))
+ }
x at data@values[i] <- value
x at data@source <- 'ram'
x <- setFilename(x, "")
More information about the Raster-commits
mailing list