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

noreply at r-forge.r-project.org noreply at r-forge.r-project.org
Mon Jan 12 11:29:32 CET 2009


Author: rhijmans
Date: 2009-01-12 11:29:32 +0100 (Mon, 12 Jan 2009)
New Revision: 121

Modified:
   pkg/raster/R/set.R
   pkg/raster/R/standard.generic.functions.R
Log:


Modified: pkg/raster/R/set.R
===================================================================
--- pkg/raster/R/set.R	2009-01-12 09:16:13 UTC (rev 120)
+++ pkg/raster/R/set.R	2009-01-12 10:29:32 UTC (rev 121)
@@ -182,7 +182,7 @@
 			vals <- seq(1:ncells(raster))
 			vals <- cbind(vals, values(raster))
 			vals <- as.vector(na.omit(vals))
-			raster <- setValuesSparse(raster, sparsevalues=vals[,2], indices=vals[,1])
+			raster <- setValuesSparse(raster, sparsevalues=vals[,2], cellnumbers=vals[,1])
 			return(raster)
 		} else { 
 			# as above, but by reading data from disk, row by row

Modified: pkg/raster/R/standard.generic.functions.R
===================================================================
--- pkg/raster/R/standard.generic.functions.R	2009-01-12 09:16:13 UTC (rev 120)
+++ pkg/raster/R/standard.generic.functions.R	2009-01-12 10:29:32 UTC (rev 121)
@@ -309,7 +309,7 @@
 #	return(maxdim)
 #}
 
-getcex <- function(cex = 0.1, ...) {
+.getcex <- function(cex = 0.1, ...) {
 	return(cex)
 }
 
@@ -322,7 +322,7 @@
 		if (length(x) < nc) {
 			warning(paste('plot used a sample of ', round(100*length(x)/nc), "% of the cells", sep=""))
 		}
-		cex <- getcex(...)
+		cex <- .getcex(...)
 		plot(x, y, ...)			
 	}
 )



More information about the Raster-commits mailing list