[Raster-commits] r410 - in pkg/raster: . R
noreply at r-forge.r-project.org
noreply at r-forge.r-project.org
Fri Apr 17 03:20:31 CEST 2009
Author: rhijmans
Date: 2009-04-17 03:20:31 +0200 (Fri, 17 Apr 2009)
New Revision: 410
Modified:
pkg/raster/DESCRIPTION
pkg/raster/R/coercion.R
Log:
Modified: pkg/raster/DESCRIPTION
===================================================================
--- pkg/raster/DESCRIPTION 2009-04-17 01:08:58 UTC (rev 409)
+++ pkg/raster/DESCRIPTION 2009-04-17 01:20:31 UTC (rev 410)
@@ -2,7 +2,7 @@
Type: Package
Title: Raster data handling for geographic data analysis and modeling
Version: 0.8.9-12
-Date: 12-April-2009
+Date: 17-April-2009
Depends: methods, sp, rgdal (>= 0.5-33), R (>= 2.8.0)
Author: Robert J. Hijmans & Jacob van Etten
Maintainer: Robert J. Hijmans <r.hijmans at gmail.com>
Modified: pkg/raster/R/coercion.R
===================================================================
--- pkg/raster/R/coercion.R 2009-04-17 01:08:58 UTC (rev 409)
+++ pkg/raster/R/coercion.R 2009-04-17 01:20:31 UTC (rev 410)
@@ -202,3 +202,11 @@
}
+
+setAs('matrix', 'RasterLayer',
+ function(from){ return(raster(from)) }
+)
+
+setAs('RasterLayer', 'matrix',
+ function(from){ return( values(from, format='matrix')) }
+)
More information about the Raster-commits
mailing list