Description Usage Arguments Value Author(s) Examples
View source: R/Class.Constructors.R
This creates an instance of the Region class. If the
shapefile
argument is supplied, all information will be extracted from
there. Otherwise, the a list of polygons describing the areas of interest needs
to be supplied (coords
) and optionally a list of polygons describing the
areas to be excluded (gaps
). If area
is not specified it will be
calculated.
1 2 3 4 5 6 7 8 9 10 11 |
region.name |
the region name |
strata.name |
the stratum names (character vector, same length as the
number of areas in the |
units |
measurement units; either |
area |
the area of the region (optional - if not supplied it will be calculated for you) |
shapefile |
a shapefile object of the region loaded into R using |
coords |
A list with one element per stratum. Each element in the list is a list of dataframes describing the polygon coordinates. This allows multiple regions in each strata. The coordinates should start and finish with the same point. By default DSsim will create a rectangular study region 2000 m by 500 m. |
gaps |
A list with one element per stratum giving the areas to be excluded from the study area (the "holes"). Each element in the list is a list of |
check.LinkID |
boolean to check the order of the LinkID value in the attribute table. This is important if this shapefile was used in Distance to create the survey shapefiles as Distance would have re-ordered the strata in this way. Failing to re-order the strata will mean that the strata in DSsim will not match the transect strata ID values created by Distance. If you have created your surveys outside Distance you can turn this option off. |
object of class Region
Laura Marshall
1 2 3 4 5 6 7 8 9 10 11 12 13 14 | # A basic study region of 2000m by 500m is created using the defaults
region <- make.region()
plot(region)
# Here is an example of a 1000 x 1000 study region with a gap
coords <- gaps <- list()
coords[[1]] <- list(data.frame(x = c(0,1000,1000,0,0), y = c(0,0,
1000,1000,0)))
gaps[[1]] <- list(data.frame(x = c(400,600,500,350,400), y = c(100,
250,600,120,100)))
region <- make.region(region.name = "study.area", units = "m",
coords = coords, gaps = gaps)
plot(region)
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.