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

noreply at r-forge.r-project.org noreply at r-forge.r-project.org
Sat Mar 14 11:20:45 CET 2009


Author: rhijmans
Date: 2009-03-14 11:20:44 +0100 (Sat, 14 Mar 2009)
New Revision: 360

Modified:
   pkg/raster/man/overlay.Rd
   pkg/raster/man/raster.Rd
Log:


Modified: pkg/raster/man/overlay.Rd
===================================================================
--- pkg/raster/man/overlay.Rd	2009-03-14 08:14:19 UTC (rev 359)
+++ pkg/raster/man/overlay.Rd	2009-03-14 10:20:44 UTC (rev 360)
@@ -1,4 +1,5 @@
 \name{overlay}
+
 \docType{methods}
 
 \alias{overlay}
@@ -11,23 +12,33 @@
 \title{Overlay RasterLayers}
 
 \description{
-
 Calculate values for a new RasterLayer object, based on two or more existing and RasterLayers of the same extent and resolution. 
 overlay is a generic functon used in the sp and raster packages. This help file describes its use in the raster package. 
 
 You should supply a function \code{fun} to set the way that the RasterLayers are combined. The number of arguments in the function must match the number of RasterLayer objects.
 For example, if you merge two RasterLayers you could use multiply: \code{fun=function(x,y){return(x*y)}} percentage: \code{fun=function(x,y){return(100 * x / y)}}. 
 The default function \code{sum} always works because its first argument is \code{...}
+}
 
+\usage{
+overlay(x, y, ...) 
 }
 
+\arguments{
+\item{x}{A RasterLayer object}
+\item{y}{A RasterLayer object}
+\item{...}{Additional arguments. See below, under Methods}  
+}
+
 \section{Methods}{
+\describe{
+A full call to the overlay method is:
 
-\code{overlay(x, y, ..., fun, filename="", overwrite=FALSE,  filetype='raster', datatype='FLT4S')}
+\code{overlay(x, y, ..., fun=sum, overwrite=FALSE, filetype='raster', datatype='FLT4S', track=-1)}
 
   \item{x}{a RasterLayer object}
   \item{y}{a RasterLayer object}
-  \item{...}{additional RasterLayer objects and
+  \item{...}{additional RasterLayer objects}
   \item{fun}{the function to be appliepd. This should be a function that takes two numbers as an argument }
   \item{filename}{ filename for the output raster. A valid filename must be provided when the data of the input rasters are on disk }
   \item{overwrite}{logical. If \code{TRUE}, existing files will be overwritten}
@@ -47,7 +58,6 @@
 
 \seealso{ \code{\link[raster]{Arith-methods}} }
 
-
 \author{
 Robert J. Hijmans 
 }
@@ -65,7 +75,6 @@
 
 # multiplication with more than two layers (make sure the number of RasterLayers matches the arguments of 'fun'
 r6 <- overlay(r1, r2, r3, r4, fun=function(a,b,c,d){return(a*b+c*d)} )  
-
 }
  
 \keyword{methods}

Modified: pkg/raster/man/raster.Rd
===================================================================
--- pkg/raster/man/raster.Rd	2009-03-14 08:14:19 UTC (rev 359)
+++ pkg/raster/man/raster.Rd	2009-03-14 10:20:44 UTC (rev 360)
@@ -26,6 +26,8 @@
 }
 
 \section{Methods}{
+\describe{
+
 1) Create a RasterLayer object from a file
 
 \code{raster(x, values=FALSE, band=1)}
@@ -76,9 +78,10 @@
 \item{\code{x}}{a Raster* object}
 \item{\code{filename}}{new filename for new RasterLayer }
 \item{\code{values}}{If not \code{NULL} it is used to set values to new object. Either pass a vector of length == ncells(x), or a single number}
-}
 
+}}
 
+
 \details{
 New RasterLayer objects normally have no values in memory. 
 You can get values into memory with \code{\link[raster]{readRow}}, and \code{\link[raster]{readAll}}; extract values with \code{\link[raster]{xyValues}};



More information about the Raster-commits mailing list