make.design: Creates a Survey.Design object

Description Usage Arguments Details Value Author(s) Examples

View source: R/Class.Constructors.R

Description

Currently surveys are only generated within the GIS in Distance. If you are running a simulation in R you will need to get Distance to generate all the surveys as shapefiles in advance and supply the path to the directory which contains these shapefiles and only these shapefiles.

Usage

1
2
3
4
5
make.design(transect.type = "line", design.details = "default",
  region.obj = "region", design.axis = 0, spacing = 100,
  nested.space = numeric(0), no.complex = numeric(0),
  angle = numeric(0), plus.sampling = logical(0),
  path = character(0))

Arguments

transect.type

character variable specifying either "Line" or "Point"

design.details

a character vector describing the type of design. See details section.

region.obj

the character name of the Region object where the survey is to be carried out.

design.axis

user may provide the angle of the design axis but not currently used

spacing

user may provide the systematic design spacing but but not currently used

nested.space

the number of spaces between nested points. If spacing = 1 then all points on the systematic design will be selected.

no.complex

the number of complex detectors to distribute based on simple random sampling of the systematic grid of detectors.

angle

user may provide the design angle (only relevant in equal angle zigzag designs) but not currently used

plus.sampling

logical value indicating whether a plus sampling protocol is used but not currently used

path

pathway giving the location of the folder of survey shapefiles

Details

The design.details argument should specify a character vector of either 1 or 2 elements. These options are described in the table below:

Transect Type Design Details
Line Parallel Systematic
Line Parallel Random
Line Zigzag Equal Angle
Line Zigzag Equal Spaced
Line User Specified
Point Systematic
Point Random
Point Nested

Value

object of a class which inherits from class Survey.Design

Author(s)

Laura Marshall

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
# DSsim can generate a systematic set of parallel line transects which by default have a 
# spacing of 100
design <- make.design("line")

# The easiest way to generate the transect is by creating a simulation (default simulations 
#create a line transect design)
sim <- make.simulation()
transects <- generate.transects(sim)
plot(make.region())
plot(transects, col = 4, lwd = 2)

# DSsim can generate a systematic grid of point transects which by default have a spacing of 100
design <- make.design("point")

sim <- make.simulation(design.obj = design)
transects <- generate.transects(sim)
plot(make.region())
plot(transects)

# More complex designs can be defined in Distance for Windows. This software can then generate
# multiple survey instances and store them as shapefiles for use by DSsim. The shapefile below 
# was generated in this way.

## Not run: 

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)
 
data(transects.shp)
#Edit the pathway below to point to an empty folder where the
#transect shapefile will be saved
shapefile.pathway <- "C:/..."
library(shapefiles)
write.shapefile(transects.shp, paste(shapefile.pathway,"/transects_1",
 sep = ""))

# This design was created in Distance for Windows in a region with the same dimensions as the
# deault make.region().
parallel.design <- make.design(transect.type = "Line", 
 design.details = c("Parallel","Systematic"), region = region, 
 design.axis = 0, spacing = 100, plus.sampling =FALSE, 
 path = shapefile.pathway)

# As there is only one set of transects we have to set single.transect.set = TRUE
sim <- make.simulation(single.transect.set = TRUE, design.obj = parallel.design)
transects <- generate.transects(sim)
plot(region)
plot(transects, col = 4, lwd = 2)

## End(Not run)

DSsim documentation built on Feb. 13, 2019, 5:04 p.m.