This generic function has methods based on the signature
object. It is used as a constructor function for
objects that are of class "
Tract". This method
should be used in preference to
new to insure a valid
This is the signature formal argument, see the methods for more details.
Formal arguments that are different for each method, see those for details.
There is no default generic function for
se. It is defined completely with respect to the signature of its
Tract-methods. Methods are available for several
useful signatures, such as objects of class
"RasterLayer", allowing for a large variety of ways
to generate objects of this class. Other methods can obviously be added
for other signatures as necessary.
A valid object of class "
Jeffrey H. Gove
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18
tract = Tract(c(x=20,y=20), cellSize=0.25) #extents constructor tr = Tract(,0.5, c(x=20,y=20),c(0.25,0.25),units='metric') #missing constructor tr2 = Tract(cellSize=0.5, cellDims=c(x=20,y=20), cellCenter=c(0.25,0.25), units='metric') #same constructor as the previous tr.ext = Tract(c(x=10,y=15), cellSize=0.5) #maximal extent constructor #bounding box constructor... bb = bbox(tr.ext) bb[,1] = c(5,4) tr3 = Tract(bb, 0.5) #RasterLayer constructor... ex = extent(tr3) rl = raster(ex, nrow=10, ncols=10, crs=NA) ## Not run: tr4 = Tract(rl) #error: non-square grid cells ## End(Not run) rl = raster(ex, nrow=22, ncol=10, crs=NA) tr4 = Tract(rl) #okay, square cells
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.