Tract-methods {sampSurf}R Documentation

Methods for "Tract" Object Construction in package ‘sampSurf’

Description

There are several methods available for the Tract generic function, which will generate valid objects of class "Tract". These constructors are the preferred method for generating such objects instead of using new. Other constructors could be added by extention to these method as required.

Methods

signature(object = "missing")

Several of the constructors listed below end up calling this one for final object construction, so it could be considered the base constructor. It is patterned after the construction of a "GridTopology" object in the ‘sp’ package. Please note that it is best to either explicitly name the arguments when using this constructor, or to include an initial missing argument (see examples in the generic) to invoke it, since supplying an unnamed numeric scalar as the first argument will instead, invoke the second constructor below (with an error).

usage...

Tract(cellSize,
      cellDims = c(x=100, y=100), 
      cellCenter = NULL,
      units = 'metric',
      data = 0,
      spUnits = CRS(projargs=as.character(NA)),
      description = 'object of class Tract',
      runQuiet = FALSE,
      ... )
signature(object = "numeric")

In this second constructor, the object argument should be a numeric vector specifying the maximum extents of the tract. The tract minimum is always assumed to be at (0,0) for this method. If some other minima is desired, use one of the other constructors.

usage...

Tract(object = c(x=10, y=10),
      cellSize,
      units = 'metric',
      data = 0,
      spUnits = CRS(projargs=as.character(NA)),
      description = 'object of class Tract',
      runQuiet = FALSE,
      ... )
signature(object = "matrix")

This construtor allows creation of a “Tract” object using a bounding box specification.

usage...

Tract(object, 
      cellSize,
      units = 'metric',
      data = 0,
      spUnits = CRS(projargs=as.character(NA)),
      description = 'object of class Tract',
      runQuiet = FALSE,
      ... )
signature(object = "RasterLayer")

Finally this constructor takes an object of class “RasterLayer”.

usage...

Tract(object, 
      units = 'metric',
      description = 'object of class Tract',
      runQuiet = FALSE,
      ... )

[Package sampSurf version 0.7-5 Index]