[Raster-commits] r448 - pkg/raster/R

noreply at r-forge.r-project.org noreply at r-forge.r-project.org
Fri May 8 17:05:35 CEST 2009


Author: rhijmans
Date: 2009-05-08 17:05:35 +0200 (Fri, 08 May 2009)
New Revision: 448

Modified:
   pkg/raster/R/projectRaster.R
Log:


Modified: pkg/raster/R/projectRaster.R
===================================================================
--- pkg/raster/R/projectRaster.R	2009-05-08 15:00:18 UTC (rev 447)
+++ pkg/raster/R/projectRaster.R	2009-05-08 15:05:35 UTC (rev 448)
@@ -52,8 +52,10 @@
 		filename(to) <- filename
 		if (getOption('verbose')) { cat('writing raster to:', filename(to))	}
 	}
-	inMemory <- to at file@name == ""
-	v <- matrix(NA, nrow=ncol(to), ncol=nrow(to))
+	inMemory <- filename(to) == ""
+	if (inMemory) {
+		v <- matrix(NA, nrow=ncol(to), ncol=nrow(to))
+	}
 	
 	if (method=='ngb') {
 		xymethod <- 'simple' 



More information about the Raster-commits mailing list