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

noreply at r-forge.r-project.org noreply at r-forge.r-project.org
Thu Jan 22 15:06:38 CET 2009


Author: rhijmans
Date: 2009-01-22 15:06:37 +0100 (Thu, 22 Jan 2009)
New Revision: 175

Added:
   pkg/raster/man/iniFile.Rd
   pkg/raster/man/read.Rd
   pkg/raster/man/sample.Rd
   pkg/raster/man/stats.Rd
Removed:
   pkg/raster/man/generic.read.Rd
Modified:
   pkg/raster/man/misc.Rd
Log:


Deleted: pkg/raster/man/generic.read.Rd
===================================================================
--- pkg/raster/man/generic.read.Rd	2009-01-22 09:50:02 UTC (rev 174)
+++ pkg/raster/man/generic.read.Rd	2009-01-22 14:06:37 UTC (rev 175)
@@ -1,76 +0,0 @@
-\name{Read Raster* data}
-
-\alias{readAll,RasterLayer-method}
-\alias{readAll,RasterStack-method}
-\alias{readRow,RasterLayer-method}
-\alias{readRow,RasterStack-method}
-\alias{readPartOfRow,RasterLayer-method}
-\alias{readPartOfRow,RasterStack-method}
-\alias{readBlock,RasterLayer-method}
-\alias{readRows,RasterLayer-method}
-
-\alias{readAll}
-\alias{readRow}
-\alias{readRows}
-\alias{readPartOfRow}
-\alias{readBlock}
-\alias{readRandom}
-\alias{readSkip}
-
-
-\title{Read values from disk}
-\description{Read values from a raster file associated with a RasterLayer, RasterStack or RasterBrick object into memory.
-You can either read all the data (memory permitting), or read data by row, part of row, block, by cellnumber, or for (x,y) coordinates. Data can be read from 'native raster' binary files, as well as for other formats that are supported by the rgdal package.
-}
-
-
-\usage{
-readAll(object)
-readRow(object, rownr)
-readRows(object, startrow, nrows = 3)
-readPartOfRow(object, rownr,  startcol=1, ncolumns=(ncol(object)-startcol+1)) 
-readBlock(object, startrow, nrows=3, startcol=1, ncolumns=(ncol(object)-startcol+1)) 
-readSkip(raster, maxdim=500, bndbox=NA, asRaster=FALSE)
-readRandom(raster, n=500, na.rm = TRUE)
-}
-
-\arguments{
-  \item{object}{a Raster* object}
-  \item{raster}{a RasterLayer object}
-  \item{rownr}{the row number of the row to read  (between 1 and nrows(raster))}
-  \item{startrow}{the frist row to read  (>= 1 & <= nrows(raster))}
-  \item{nrows}{the number of the rows to read (>= 1 & <= nrows(raster))}
-  \item{startcol}{first column of the block ( (>= 1 & <= nrows(raster))}
-  \item{ncolumns}{number of columns to read on this each row ( (>= 1 & <= ncols(raster) & > firstcol)}
-  \item{maxdim}{sets the density for regular sampling}  
-  \item{bndbox}{sets a bouding box within the raster, for regular sampling within that box}  
-  \item{asRaster}{Logical. If \code{TRUE}, a rasterLayer is returned, rather then the sampled values}  
-  \item{n}{size of random sample}  
-  \item{na.rm}{Logical. If \code{TRUE} NA values are removed from random sample}  
-}
-
-
-\note{After read* the values are accessible with the "values(object)" function}
-
-\author{Robert J. Hijmans \email{r.hijmans at gmail.com}}
-
-\examples{
-
- rs <- rasterFromFile(system.file("external/test.ag", package="sp"))
-
-# read a row
-  firstrow <- readRow(rs, 1)
-  lastrow <- readRow(rs, rs at nrows)
-
-# read a number of rows
-  fiverows <- readRows(rs, startrow=50, nrows=5)
-
-# read part of a row 
-  rowpart <- readPartOfRow(rs, 50,  startcol=30, ncolumns=10) 
-
-# read a block
-  block <- readBlock(rs, startrow=50, nrows=5, startcol=30, ncolumns=10)
-}
-
-\keyword{classes}
-\keyword{spatial}

Added: pkg/raster/man/iniFile.Rd
===================================================================
--- pkg/raster/man/iniFile.Rd	                        (rev 0)
+++ pkg/raster/man/iniFile.Rd	2009-01-22 14:06:37 UTC (rev 175)
@@ -0,0 +1,21 @@
+\name{inifile}
+\alias{readIniFile}
+
+\title{Miscellaneous functions}
+\description{
+	Read ini files
+}
+\usage{
+readIniFile(filename)
+}
+\arguments{
+  \item{filename}{filename of the .ini file}
+}
+
+\value{
+  readIniFile reads "ini-files". I.e. text file databases that are orginized in [sections] and "name = value" pairs.
+}
+
+\author{Robert J. Hijmans \email{r.hijmans at gmail.com}}
+
+\keyword{file}

Modified: pkg/raster/man/misc.Rd
===================================================================
--- pkg/raster/man/misc.Rd	2009-01-22 09:50:02 UTC (rev 174)
+++ pkg/raster/man/misc.Rd	2009-01-22 14:06:37 UTC (rev 175)
@@ -4,14 +4,10 @@
 \alias{fileName}
 \alias{filePath}
 \alias{trim}
-\alias{Mode}
-\alias{CV}
-\alias{readIniFile}
 
 \title{Miscellaneous functions}
 \description{
   Low level functions for file and string handling. Get or change file extension or extract the filename or path from a full name (path + filename). Trim a string of characters (remove the whitespace before or after the string).
-  And two miscellanous statistical functions (mode and coefficient of variation)
 }
 \usage{
 setFileExtension(filename, newextension)
@@ -19,38 +15,25 @@
 fileName(filename)
 filePath(filename)
 trim(astring)
-Mode(x, ties='random', na.rm = TRUE)
-CV(x, na.rm = TRUE, singlevalueaszero=TRUE)
-readIniFile(filename)
 }
 \arguments{
   \item{filename}{A filename with or without the path}
   \item{newextension}{A file extension, e.g., ".txt" }
   \item{astring}{A string that needs to be trimmed}
-  \item{x}{A vector of numbers (typically integers for mode)}
-  \item{ties}{character. Indicates how to treat ties. Either 'random', 'lowest', 'highest', or 'NA'}
-  \item{na.rm}{Remove (ignore) NA values}
-  \item{singlevalueaszero}{If \code{TRUE} a zero is returned (rather than an NA) if the mode of single value is computed}
 }
 
 \value{
-  file.get.* returns a file extension, filename or path.  
-  Mode returns the modal (most frequent) value of a vector of values, ties are broken at random
-  CV returns the coefficient of variation (expressed as a percentage). If there is only a single value, sd = NA
-  and CV returns NA if singlevaluecvzero=FALSE. However, the default is that cv=0 in this case.
-  readIniFile reads "ini-files". I.e. text file databases that are orginized in [sections] and "name = value" pairs.
+  A file extension, filename or path.  
 }
 
 \author{Robert J. Hijmans \email{r.hijmans at gmail.com}}
 
 \examples{
-	fn <- "c:/temp folder/filename.extension"
+	fn <- "  c:/temp folder/filename.extension  "
+	fn <- trim(fn)
 	fileExtension(fn)
 	setFileExtension(fn, ".txt")
 	fileName(fn)
 	filePath(fn)
-	data <- c(0,1,2,3,3,3,3,4,4,4,5,5,6,7,7,8,9,NA)
-	Mode(data)
-	CV(data)
 }
-\keyword{spatial}
+\keyword{file}

Added: pkg/raster/man/read.Rd
===================================================================
--- pkg/raster/man/read.Rd	                        (rev 0)
+++ pkg/raster/man/read.Rd	2009-01-22 14:06:37 UTC (rev 175)
@@ -0,0 +1,66 @@
+\name{Read Raster* data}
+
+\alias{readAll,RasterLayer-method}
+\alias{readAll,RasterStack-method}
+\alias{readRow,RasterLayer-method}
+\alias{readRow,RasterStack-method}
+\alias{readPartOfRow,RasterLayer-method}
+\alias{readPartOfRow,RasterStack-method}
+\alias{readBlock,RasterLayer-method}
+\alias{readRows,RasterLayer-method}
+
+\alias{readAll}
+\alias{readRow}
+\alias{readRows}
+\alias{readPartOfRow}
+\alias{readBlock}
+
+
+\title{Read values from disk}
+\description{Read values from a raster file associated with a RasterLayer, RasterStack or RasterBrick object into memory.
+You can either read all the data (memory permitting), or read data by row, part of row, block, by cellnumber, or for (x,y) coordinates. Data can be read from 'native raster' binary files, as well as for other formats that are supported by the rgdal package.
+}
+
+
+\usage{
+readAll(object)
+readRow(object, rownr)
+readRows(object, startrow, nrows = 3)
+readPartOfRow(object, rownr,  startcol=1, ncolumns=(ncol(object)-startcol+1)) 
+readBlock(object, startrow, nrows=3, startcol=1, ncolumns=(ncol(object)-startcol+1)) 
+}
+
+\arguments{
+  \item{object}{a Raster* object}
+  \item{rownr}{the row number of the row to read  (between 1 and nrows(raster))}
+  \item{startrow}{the frist row to read  (>= 1 & <= nrows(raster))}
+  \item{nrows}{the number of the rows to read (>= 1 & <= nrows(raster))}
+  \item{startcol}{first column of the block ( (>= 1 & <= nrows(raster))}
+  \item{ncolumns}{number of columns to read on this each row ( (>= 1 & <= ncols(raster) & > firstcol)}
+}
+
+
+\note{After read* the values are accessible with the "values(object)" function}
+
+\author{Robert J. Hijmans \email{r.hijmans at gmail.com}}
+
+\examples{
+
+ rs <- rasterFromFile(system.file("external/test.ag", package="sp"))
+
+# read a row
+  firstrow <- readRow(rs, 1)
+  lastrow <- readRow(rs, rs at nrows)
+
+# read a number of rows
+  fiverows <- readRows(rs, startrow=50, nrows=5)
+
+# read part of a row 
+  rowpart <- readPartOfRow(rs, 50,  startcol=30, ncolumns=10) 
+
+# read a block
+  block <- readBlock(rs, startrow=50, nrows=5, startcol=30, ncolumns=10)
+}
+
+\keyword{classes}
+\keyword{spatial}

Added: pkg/raster/man/sample.Rd
===================================================================
--- pkg/raster/man/sample.Rd	                        (rev 0)
+++ pkg/raster/man/sample.Rd	2009-01-22 14:06:37 UTC (rev 175)
@@ -0,0 +1,33 @@
+\name{Sample}
+
+\alias{readRandom}
+\alias{readSkip}
+
+\title{Sample values of a RasterLayer}
+
+\description{
+read a sample from a RasterLayer, either systematic or random
+}
+
+\usage{
+readSkip(raster, maxdim=500, bndbox=NA, asRaster=FALSE)
+readRandom(raster, n=500, na.rm = TRUE)
+}
+
+\arguments{
+  \item{raster}{a RasterLayer object}
+  \item{maxdim}{sets the density for regular sampling}  
+  \item{bndbox}{sets a bouding box within the raster, for regular sampling within that box}  
+  \item{asRaster}{Logical. If \code{TRUE}, a rasterLayer is returned, rather then the sampled values}  
+  \item{n}{size of random sample}  
+  \item{na.rm}{Logical. If \code{TRUE} NA values are removed from random sample}  
+}
+
+
+\author{Robert J. Hijmans \email{r.hijmans at gmail.com}}
+
+\examples{
+ rs <- rasterFromFile(system.file("external/test.ag", package="sp"))
+}
+
+\keyword{spatial}

Added: pkg/raster/man/stats.Rd
===================================================================
--- pkg/raster/man/stats.Rd	                        (rev 0)
+++ pkg/raster/man/stats.Rd	2009-01-22 14:06:37 UTC (rev 175)
@@ -0,0 +1,34 @@
+\name{stats}
+\alias{Mode}
+\alias{CV}
+
+\title{Miscellaneous statistical functions}
+\description{
+  Miscellanous statistical functions: mode and coefficient of variation
+}
+\usage{
+Mode(x, ties='random', na.rm = TRUE)
+CV(x, na.rm = TRUE, singlevalueaszero=TRUE)
+}
+\arguments{
+  \item{x}{A vector of numbers (typically integers for mode)}
+  \item{ties}{character. Indicates how to treat ties. Either 'random', 'lowest', 'highest', or 'NA'}
+  \item{na.rm}{Remove (ignore) NA values}
+  \item{singlevalueaszero}{If \code{TRUE} a zero is returned (rather than an NA) if the mode of single value is computed}
+}
+
+\value{
+  Mode returns the modal (most frequent) value of a vector of values, ties are broken at random
+  CV returns the coefficient of variation (expressed as a percentage). If there is only a single value, sd = NA
+  and CV returns NA if singlevaluecvzero=FALSE. However, the default is that cv=0 in this case.
+}
+
+\author{Robert J. Hijmans \email{r.hijmans at gmail.com}}
+
+\examples{
+	data <- c(0,1,2,3,3,3,3,4,4,4,5,5,6,7,7,8,9,NA)
+	Mode(data)
+	CV(data)
+}
+\keyword{univar}
+



More information about the Raster-commits mailing list