[Raster-commits] r223 - pkg/raster/man

noreply at r-forge.r-project.org noreply at r-forge.r-project.org
Fri Jan 30 17:02:16 CET 2009


Author: rhijmans
Date: 2009-01-30 17:02:16 +0100 (Fri, 30 Jan 2009)
New Revision: 223

Modified:
   pkg/raster/man/Compare-methods.Rd
   pkg/raster/man/raster-package.Rd
   pkg/raster/man/setDatatype.Rd
Log:


Modified: pkg/raster/man/Compare-methods.Rd
===================================================================
--- pkg/raster/man/Compare-methods.Rd	2009-01-30 15:18:58 UTC (rev 222)
+++ pkg/raster/man/Compare-methods.Rd	2009-01-30 16:02:16 UTC (rev 223)
@@ -6,9 +6,10 @@
 
 \title{ Methods to compare Raster* objects}
 \description{
- These methods compare the location and resolution of Raster*(i.e. their bounding boxes, projection, and rows and columns. They do not compare the values associated with the objects; nor if they are of the same class (but they must be decendants from Raster' 
- The following methods have been implemented: for BasicRaster returning a single logical value \code{TRUE} or \code{FALSE}
- and the folliwing for RasterLayer: "==", "!=", ">", "<",  "<=", ">=", returning a logical (Boolean) RasterLayer
+ These methods compare the location and resolution of Raster* objects. That is, they compare their bounding boxes, projection, and rows and columns. 
+ For BasicRaster objects you can use "==" and "!=", the values returned is a single logical value \code{TRUE} or \code{FALSE}
+ For RasterLayer objects, they also compare the values associated with the objects, and the result is a logical (Boolean) RasterLayer object.
+ The following methods have been implemented for RasterLayer objects: "==", "!=", ">", "<",  "<=", ">="
 }
 
 \author{Robert J. Hijmans \email{r.hijmans at gmail.com}}

Modified: pkg/raster/man/raster-package.Rd
===================================================================
--- pkg/raster/man/raster-package.Rd	2009-01-30 15:18:58 UTC (rev 222)
+++ pkg/raster/man/raster-package.Rd	2009-01-30 16:02:16 UTC (rev 223)
@@ -13,7 +13,7 @@
 Package: \tab raster\cr
 Type: \tab Package\cr
 Version: \tab 0.8\cr
-Date: \tab 2009-01-11\cr
+Date: \tab 2009-01-30\cr
 License: \tab GPL-3\cr
 LazyLoad: \tab yes\cr
 }

Modified: pkg/raster/man/setDatatype.Rd
===================================================================
--- pkg/raster/man/setDatatype.Rd	2009-01-30 15:18:58 UTC (rev 222)
+++ pkg/raster/man/setDatatype.Rd	2009-01-30 16:02:16 UTC (rev 223)
@@ -1,4 +1,4 @@
-\name{set}
+\name{set data tyoe}
 \alias{setDatatype}
 
 \title{ Set data type }
@@ -21,9 +21,12 @@
 \details{
 While you can access the slots of the object directly, you would do that at your own peril because the value of one raster property can affect values in other properties, and changing slot values may thus break the integrity of the objects. Using slots directly may also lead to code to break in the future if underlying class definitions change. 
 
+
+The following datatype/size/signed combinations are available.
+
 datatype, size, signed: range of possible values
 
-'boolean', 1: FALSE (0) to TRUE (1)
+'logical', 1: FALSE (0) to TRUE (1)
 
 'integer', 1, signed: -127 to 127
 
@@ -41,8 +44,13 @@
 
 'integer', 8, unsigned: 0 to 18,446,744,073,709,551,614
 
+'numeric', 4, signed:
 
+'numeric', 8, signed:
 
+
+For all integer types, except the single byte types, the lowest (signed) or highest (unsigned) value is used to store NA. Single byte files do not have an NA.
+Logical values are stored as signed single byte integers, they do have an NA value (-127)
 }
 
 \value{
@@ -51,16 +59,15 @@
 \author{ Robert J. Hijmans \email{r.hijmans at gmail.com} }
 
 \examples{ 
-	r <- raster()
-# 2 byte signed integer between -32,768 to +32,767
-	r <- setDatatype(r, datatype="integer", datasize=2)
-# 2 byte unsigned integer between 0 to +65,535
-	r <- setDatatype(r, datatype="integer", datasize=2, signed=FALSE)
+r <- raster()
+# 2 byte signed integer
+r <- setDatatype(r, datatype="integer", datasize=2)
+# 2 byte unsigned integer
+r <- setDatatype(r, datatype="integer", datasize=2, signed=FALSE)
 # very large integers
-	r <- setDatatype(r, datatype="numeric", datasize=8)
-# save byte values between 0 and 255	
-	r <- setDatatype(r, datatype="integer", datasize=1, signed=FALSE)
-	
+r <- setDatatype(r, datatype="numeric", datasize=8)
+# single byte values
+r <- setDatatype(r, datatype="integer", datasize=1, signed=FALSE)
 }
 
 \keyword{ spatial }



More information about the Raster-commits mailing list