[Raster-commits] r162 - pkg/raster/R
noreply at r-forge.r-project.org
noreply at r-forge.r-project.org
Mon Jan 19 18:51:40 CET 2009
Author: rhijmans
Date: 2009-01-19 18:51:40 +0100 (Mon, 19 Jan 2009)
New Revision: 162
Modified:
pkg/raster/R/properties.R
Log:
Modified: pkg/raster/R/properties.R
===================================================================
--- pkg/raster/R/properties.R 2009-01-19 17:46:56 UTC (rev 161)
+++ pkg/raster/R/properties.R 2009-01-19 17:51:40 UTC (rev 162)
@@ -95,13 +95,19 @@
}
)
-setMethod('nlayers', signature(object='RasterStackBrick'),
+setMethod('nlayers', signature(object='RasterStack'),
function(object){
return(object at data@nlayers)
}
)
+setMethod('nlayers', signature(object='RasterBrick'),
+ function(object){
+ return(object at data@nlayers)
+ }
+)
+
layers <- function(object) {
if (class(object) == "RasterLayer") {
return(filename(object))
More information about the Raster-commits
mailing list