[Raster-commits] r284 - pkg/raster/R
noreply at r-forge.r-project.org
noreply at r-forge.r-project.org
Sat Feb 14 13:23:43 CET 2009
Author: rhijmans
Date: 2009-02-14 13:23:43 +0100 (Sat, 14 Feb 2009)
New Revision: 284
Modified:
pkg/raster/R/stack.R
Log:
Modified: pkg/raster/R/stack.R
===================================================================
--- pkg/raster/R/stack.R 2009-02-13 11:33:27 UTC (rev 283)
+++ pkg/raster/R/stack.R 2009-02-14 12:23:43 UTC (rev 284)
@@ -6,7 +6,11 @@
stackOpen <- function(stackfile) {
st <- read.table(stackfile, as.is=FALSE, strip.white=TRUE)
- rst <- stackFromFiles(st[,1], st[,2])
+ if (dim(st)[2] > 1) {
+ rst <- stackFromFiles(st[,1], st[,2])
+ } else {
+ rst <- stackFromFiles(st[,1])
+ }
rst <- setFilename(rst, stackfile)
return(rst)
}
More information about the Raster-commits
mailing list