Showing 20 of 189 files from the diff.
Newly tracked file
R/RapResults.R changed.
Newly tracked file
R/RapReliableOpts.R changed.
Newly tracked file
R/GurobiOpts.R changed.
Newly tracked file
R/RapUnsolved.R changed.
Newly tracked file
R/RapSolved.R changed.
Newly tracked file
R/generics.R changed.
Newly tracked file
R/DemandPoints.R changed.
Newly tracked file
R/RapUnreliableOpts.R changed.
Newly tracked file
R/raptr-internal.R changed.
Newly tracked file
R/PlanningUnitPoints.R changed.
Newly tracked file
R/AttributeSpace.R changed.
Newly tracked file
R/calcBoundaryData.R changed.
Newly tracked file
R/sim.pus.R changed.
Newly tracked file
R/ManualOpts.R changed.
Newly tracked file
R/RapData.R changed.
Newly tracked file
R/rap.R changed.
Newly tracked file
R/AttributeSpaces.R changed.
Newly tracked file
R/misc.R changed.
Other files ignored by Codecov
man/pu.subset.Rd has changed.
man/sim.space.Rd has changed.
man/spp.plot.Rd has changed.
man/is.cached.Rd has changed.
man/show.Rd has changed.
docs/pkgdown.css has changed.
docs/pkgdown.yml has changed.
man/space.plot.Rd has changed.
R/raptr.R has changed.
man/basemap.Rd has changed.
R/data.R has changed.
man/GurobiOpts.Rd has changed.
man/as.list.Rd has changed.
man/plot.Rd has changed.
man/RapData.Rd has changed.
man/dp.subset.Rd has changed.
man/rap.Rd has changed.
man/cache.Rd has changed.
docs/authors.html has changed.
man/summary.Rd has changed.
docs/index.html has changed.
docs/pkgdown.js has changed.
README.md has changed.
man/update.Rd has changed.
man/RapResults.Rd has changed.
NEWS.md has changed.
man/raptr.Rd has changed.
man/space.held.Rd has changed.
man/spp.subset.Rd has changed.
man/selections.Rd has changed.
man/print.Rd has changed.
man/names.Rd has changed.
man/ManualOpts.Rd has changed.
man/score.Rd has changed.
man/sim.pus.Rd has changed.
man/RapSolved.Rd has changed.
DESCRIPTION has changed.
man/solve.Rd has changed.

@@ -5,31 +5,31 @@
Loading
5 5
#'
6 6
#' This class is used to store RAP results.
7 7
#'
8 -
#' @slot summary \code{\link[base]{data.frame}} with summary information on
8 +
#' @slot summary [base::data.frame()] with summary information on
9 9
#'  solutions.
10 10
#'
11 -
#' @slot selections \code{\link[base]{matrix}} with binary selections. The cell
11 +
#' @slot selections [base::matrix()] with binary selections. The cell
12 12
#'   \eqn{x_{ij}} denotes if planning unit \eqn{j} is selected in the
13 13
#'   \eqn{i}'th solution.
14 14
#'
15 -
#' @slot amount.held \code{\link[base]{matrix}} with the amount held for each
15 +
#' @slot amount.held [base::matrix()] with the amount held for each
16 16
#'   species in each solution.
17 17
#'
18 -
#' @slot space.held \code{\link[base]{matrix}} with the proportion of attribute
18 +
#' @slot space.held [base::matrix()] with the proportion of attribute
19 19
#'   space sampled for each species in each solution.
20 20
#'
21 -
#' @slot best \code{integer} with index of best solution.
21 +
#' @slot best `integer` with index of best solution.
22 22
#'
23 -
#' @slot logging.file \code{character} Gurobi log files.
23 +
#' @slot logging.file `character` Gurobi log files.
24 24
#'
25 -
#' @slot .cache \code{\link[base]{environment}} used to store extra data.
25 +
#' @slot .cache [base::environment()] used to store extra data.
26 26
#'
27 -
#' @details The \code{summary} table follows Marxan conventions ("summary.dat" in \url{http://marxan.net/downloads/uq_marxan_web_2/module5.html}). The columns
27 +
#' @details The `summary` table follows Marxan conventions ("summary.dat" in <http://marxan.net/downloads/uq_marxan_web_2/module5.html>). The columns
28 28
#' are:
29 29
#' \describe{
30 30
#' \item{Run_Number}{The index of each solution in the object.}
31 31
#' \item{Status}{The status of the solution. The values in this column
32 -
#' correspond to outputs from the Gurobi software package (\url{http://www.gurobi.com/documentation/6.5/refman/optimization_status_codes.html}).}
32 +
#' correspond to outputs from the Gurobi software package (<http://www.gurobi.com/documentation/6.5/refman/optimization_status_codes.html>).}
33 33
#' \item{Score}{The objective function for the solution.}
34 34
#' \item{Cost}{Total cost associated with a solution.}
35 35
#' \item{Planning_Units}{Number of planning units selected in a solution.}
@@ -43,13 +43,13 @@
Loading
43 43
#' \item{Connectivity_Out}{The number of shared boundary length among planning
44 44
#' units not selected in the solution.}
45 45
#' \item{Connectivity_Fraction}{The ratio of shared boundary length in the
46 -
#' solution (\code{Connectivity_In}) to the total amount of boundary length
47 -
#' (\code{Connectivity_Edge}). This ratio is an indicator of solution quality.
46 +
#' solution (`Connectivity_In`) to the total amount of boundary length
47 +
#' (`Connectivity_Edge`). This ratio is an indicator of solution quality.
48 48
#' Solutions with a lower ratio will have less planning units and will be more
49 49
#' efficient.}
50 50
#' }
51 51
#'
52 -
#' @seealso \code{\link{RapResults}}, \code{\link{read.RapResults}}.
52 +
#' @seealso [RapResults()], [read.RapResults()].
53 53
#'
54 54
#' @name RapResults-class
55 55
#'
@@ -125,31 +125,31 @@
Loading
125 125
126 126
#' Create RapResults object
127 127
#'
128 -
#' This function creates a new \code{\link{RapResults}} object.
128 +
#' This function creates a new [RapResults()] object.
129 129
#'
130 -
#' @param summary \code{\link[base]{data.frame}} with summary information on
130 +
#' @param summary [base::data.frame()] with summary information on
131 131
#'   solutions. See details below for more information.
132 132
#'
133 -
#' @param selections \code{\link[base]{matrix}} with binary selections. The
133 +
#' @param selections [base::matrix()] with binary selections. The
134 134
#'   cell \eqn{x_{ij}} denotes if planning unit \eqn{j} is selected in the
135 135
#'   \eqn{i}'th solution.
136 136
#'
137 -
#' @param amount.held \code{\link[base]{matrix}} with the amount held for each
137 +
#' @param amount.held [base::matrix()] with the amount held for each
138 138
#'   species in each solution.
139 139
#'
140 -
#' @param space.held \code{\link[base]{matrix}} with the proportion of
140 +
#' @param space.held [base::matrix()] with the proportion of
141 141
#'   attribute space sampled for each species in each solution.
142 142
#'
143 -
#' @param logging.file \code{character} Gurobi log files.
143 +
#' @param logging.file `character` Gurobi log files.
144 144
#'
145 -
#' @param .cache \code{\link[base]{environment}} used to cache calculations.
145 +
#' @param .cache [base::environment()] used to cache calculations.
146 146
#'
147 -
#' @details The \code{summary} table follows Marxan conventions (summary.dat in \url{http://marxan.net/downloads/uq_marxan_web_2/module5.html}). The columns
147 +
#' @details The `summary` table follows Marxan conventions (summary.dat in <http://marxan.net/downloads/uq_marxan_web_2/module5.html>). The columns
148 148
#' are:
149 149
#' \describe{
150 150
#' \item{Run_Number}{The index of each solution in the object.}
151 151
#' \item{Status}{The status of the solution. The values in this column
152 -
#' correspond to outputs from the Gurobi software package (\url{http://www.gurobi.com/documentation/6.5/refman/optimization_status_codes.html}).}
152 +
#' correspond to outputs from the Gurobi software package (<http://www.gurobi.com/documentation/6.5/refman/optimization_status_codes.html>).}
153 153
#' \item{Score}{The objective function for the solution.}
154 154
#' \item{Cost}{Total cost associated with a solution.}
155 155
#' \item{Planning_Units}{Number of planning units selected in a solution.}
@@ -163,18 +163,18 @@
Loading
163 163
#' \item{Connectivity_Out}{The number of shared boundary length among planning
164 164
#' units not selected in the solution.}
165 165
#' \item{Connectivity_Fraction}{The ratio of shared boundary length in the
166 -
#' solution (\code{Connectivity_In}) to the total amount of boundary length
167 -
#' (\code{Connectivity_Edge}). This ratio is an indicator of solution quality.
166 +
#' solution (`Connectivity_In`) to the total amount of boundary length
167 +
#' (`Connectivity_Edge`). This ratio is an indicator of solution quality.
168 168
#' Solutions with a lower ratio will have less planning units and will be more
169 169
#' efficient.}
170 170
#' }
171 171
#'
172 -
#' @note slot \code{best} is automatically determined based on data in
173 -
#'   \code{summary}.
172 +
#' @note slot `best` is automatically determined based on data in
173 +
#'   `summary`.
174 174
#'
175 -
#' @return \code{RapResults} object
175 +
#' @return `RapResults` object
176 176
#'
177 -
#' @seealso \code{\link{RapResults-class}} \code{\link{read.RapResults}}.
177 +
#' @seealso [RapResults-class] [read.RapResults()].
178 178
#'
179 179
#' @export
180 180
RapResults <- function(summary, selections, amount.held, space.held,
@@ -187,8 +187,6 @@
Loading
187 187
188 188
#' @rdname selections
189 189
#'
190 -
#' @inheritParams selections
191 -
#'
192 190
#' @export
193 191
selections.RapResults <- function(x, y = 0) {
194 192
  if (is.null(y))
@@ -201,8 +199,6 @@
Loading
201 199
202 200
#' @rdname score
203 201
#'
204 -
#' @inheritParams score
205 -
#'
206 202
#' @export
207 203
score.RapResults <- function(x, y = 0) {
208 204
  if (is.null(y))
@@ -220,7 +216,7 @@
Loading
220 216
}
221 217
222 218
#' @rdname logging.file
223 -
#' @inheritParams logging.file
219 +
#'
224 220
#' @export
225 221
logging.file.RapResults <- function(x, y = 0) {
226 222
  if (is.null(y))

@@ -7,15 +7,15 @@
Loading
7 7
#' This class is used to store input parameters for the reliable formulation of
8 8
#' RAP.
9 9
#'
10 -
#' @slot BLM \code{numeric} boundary length modifier. Defaults to 0.
10 +
#' @slot BLM `numeric` boundary length modifier. Defaults to 0.
11 11
#'
12 -
#' @slot failure.multiplier \code{numeric} multiplier for failure planning
12 +
#' @slot failure.multiplier `numeric` multiplier for failure planning
13 13
#'   unit. Defaults to 1.1.
14 14
#'
15 -
#' @slot max.r.level \code{numeric} maximum R failure level for approximation.
15 +
#' @slot max.r.level `numeric` maximum R failure level for approximation.
16 16
#'   Defaults to 5L.
17 17
#'
18 -
#' @seealso \code{\link{RapReliableOpts}}.
18 +
#' @seealso [RapReliableOpts()].
19 19
#'
20 20
#' @name RapReliableOpts-class
21 21
#'
@@ -57,17 +57,17 @@
Loading
57 57
#'
58 58
#' This function creates a new RapReliableOpts object.
59 59
#'
60 -
#' @param BLM \code{numeric} boundary length modifier. Defaults to 0.
60 +
#' @param BLM `numeric` boundary length modifier. Defaults to 0.
61 61
#'
62 -
#' @param failure.multiplier \code{numeric} multiplier for failure planning
62 +
#' @param failure.multiplier `numeric` multiplier for failure planning
63 63
#'   unit. Defaults to 1.1.
64 64
#'
65 -
#' @param max.r.level \code{numeric} maximum R failure level for approximation.
65 +
#' @param max.r.level `numeric` maximum R failure level for approximation.
66 66
#'   Defaults to 5L.
67 67
#'
68 -
#' @return \code{RapReliableOpts} object
68 +
#' @return `RapReliableOpts` object
69 69
#'
70 -
#' @seealso \code{\link{RapReliableOpts-class}}.
70 +
#' @seealso [RapReliableOpts-class].
71 71
#'
72 72
#' @examples
73 73
#' # create RapReliableOpts using defaults

@@ -5,42 +5,42 @@
Loading
5 5
#'
6 6
#' This class is used to store Gurobi input parameters.
7 7
#'
8 -
#' @slot Threads \code{integer} number of cores to use for processing. Defaults
8 +
#' @slot Threads `integer` number of cores to use for processing. Defaults
9 9
#'   to 1L.
10 10
#'
11 -
#' @slot MIPGap \code{numeric} MIP gap specifying minimum solution quality.
11 +
#' @slot MIPGap `numeric` MIP gap specifying minimum solution quality.
12 12
#'   Defaults to 0.1.
13 13
#'
14 -
#' @slot Method \code{integer} Algorithm to use for solving model. Defaults to
14 +
#' @slot Method `integer` Algorithm to use for solving model. Defaults to
15 15
#'   0L.
16 16
#'
17 -
#' @slot Presolve \code{integer} code for level of computation in presolve.
17 +
#' @slot Presolve `integer` code for level of computation in presolve.
18 18
#'  Defaults to 2.
19 19
#'
20 -
#' @slot TimeLimit \code{integer} number of seconds to allow for solving.
20 +
#' @slot TimeLimit `integer` number of seconds to allow for solving.
21 21
#'   Defaults to NA_integer_, and so a time limit is not imposed.
22 22
#'
23 -
#' @slot NumberSolutions \code{integer} number of solutions to generate.
23 +
#' @slot NumberSolutions `integer` number of solutions to generate.
24 24
#'   Defaults to 1L.
25 25
#'
26 -
#' @slot MultipleSolutionsMethod \code{integer} name of method to obtain
27 -
#'   multiple solutions (used when \code{NumberSolutions} is greater than one).
28 -
#'   Available options are \code{"benders.cuts"}, \code{"solution.pool.0"},
29 -
#'   \code{"solution.pool.1"}, and \code{"solution.pool.2"}. The
30 -
#'   \code{"benders.cuts"} method produces a set of distinct solutions that
31 -
#'   are all within the optimality gap. The \code{"solution.pool.0"}
26 +
#' @slot MultipleSolutionsMethod `integer` name of method to obtain
27 +
#'   multiple solutions (used when `NumberSolutions` is greater than one).
28 +
#'   Available options are `"benders.cuts"`, `"solution.pool.0"`,
29 +
#'   `"solution.pool.1"`, and `"solution.pool.2"`. The
30 +
#'   `"benders.cuts"` method produces a set of distinct solutions that
31 +
#'   are all within the optimality gap. The `"solution.pool.0"`
32 32
#'   method returns all solutions identified whilst trying to find
33 33
#'   a solution that is within the specified optimality gap. The
34 -
#'   \code{"solution.pool.1"} method finds one solution within the optimality
34 +
#'   `"solution.pool.1"` method finds one solution within the optimality
35 35
#'   gap and a number of additional solutions that are of any level of quality
36 36
#'   (such that the total number of solutions is equal to
37 -
#'   \code{number_solutions}). The \code{"solution.pool.2"} finds a
37 +
#'   `number_solutions`). The `"solution.pool.2"` finds a
38 38
#'   specified number of solutions that are nearest to optimality. The
39 39
#'   search pool methods correspond to the parameters used by the Gurobi
40 -
#'   software suite (see \url{http://www.gurobi.com/documentation/8.0/refman/poolsearchmode.html#parameter:PoolSearchMode}).
41 -
#'   Defaults to \code{"benders.cuts"}.
40 +
#'   software suite (see <http://www.gurobi.com/documentation/8.0/refman/poolsearchmode.html#parameter:PoolSearchMode>).
41 +
#'   Defaults to `"benders.cuts"`.
42 42
#'
43 -
#' @seealso \code{\link{GurobiOpts}}.
43 +
#' @seealso [GurobiOpts()].
44 44
#'
45 45
#' @name GurobiOpts-class
46 46
#'
@@ -94,44 +94,44 @@
Loading
94 94
#'
95 95
#' This function creates a new GurobiOpts object.
96 96
#'
97 -
#' @param Threads \code{integer} number of cores to use for processing.
97 +
#' @param Threads `integer` number of cores to use for processing.
98 98
#'   Defaults to 1L.
99 99
#'
100 -
#' @param MIPGap \code{numeric} MIP gap specifying minimum solution quality.
100 +
#' @param MIPGap `numeric` MIP gap specifying minimum solution quality.
101 101
#'   Defaults to 0.1.
102 102
#'
103 -
#' @param Method \code{integer} Algorithm to use for solving model. Defaults to
103 +
#' @param Method `integer` Algorithm to use for solving model. Defaults to
104 104
#'   0L.
105 105
#'
106 -
#' @param Presolve \code{integer} code for level of computation in presolve
106 +
#' @param Presolve `integer` code for level of computation in presolve
107 107
#'   (lp_solve parameter). Defaults to 2.
108 108
#'
109 -
#' @param TimeLimit \code{integer} number of seconds to allow for solving.
110 -
#'   Defaults to \code{NA_integer_}, and so a time limit is not imposed.
109 +
#' @param TimeLimit `integer` number of seconds to allow for solving.
110 +
#'   Defaults to `NA_integer_`, and so a time limit is not imposed.
111 111
#'
112 -
#' @param NumberSolutions \code{integer} number of solutions to generate.
112 +
#' @param NumberSolutions `integer` number of solutions to generate.
113 113
#'   Defaults to 1L.
114 114
#'
115 -
#' @param MultipleSolutionsMethod \code{integer} name of method to obtain
116 -
#'   multiple solutions (used when \code{NumberSolutions} is greater than one).
117 -
#'   Available options are \code{"benders.cuts"}, \code{"solution.pool.0"},
118 -
#'   \code{"solution.pool.1"}, and \code{"solution.pool.2"}. The
119 -
#'   \code{"benders.cuts"} method produces a set of distinct solutions that
120 -
#'   are all within the optimality gap. The \code{"solution.pool.0"}
115 +
#' @param MultipleSolutionsMethod `integer` name of method to obtain
116 +
#'   multiple solutions (used when `NumberSolutions` is greater than one).
117 +
#'   Available options are `"benders.cuts"`, `"solution.pool.0"`,
118 +
#'   `"solution.pool.1"`, and `"solution.pool.2"`. The
119 +
#'   `"benders.cuts"` method produces a set of distinct solutions that
120 +
#'   are all within the optimality gap. The `"solution.pool.0"`
121 121
#'   method returns all solutions identified whilst trying to find
122 122
#'   a solution that is within the specified optimality gap. The
123 -
#'   \code{"solution.pool.1"} method finds one solution within the optimality
123 +
#'   `"solution.pool.1"` method finds one solution within the optimality
124 124
#'   gap and a number of additional solutions that are of any level of quality
125 125
#'   (such that the total number of solutions is equal to
126 -
#'   \code{number_solutions}). The \code{"solution.pool.2"} finds a
126 +
#'   `number_solutions`). The `"solution.pool.2"` finds a
127 127
#'   specified number of solutions that are nearest to optimality. The
128 128
#'   search pool methods correspond to the parameters used by the Gurobi
129 -
#'   software suite (see \url{http://www.gurobi.com/documentation/8.0/refman/poolsearchmode.html#parameter:PoolSearchMode}).
130 -
#'   Defaults to \code{"benders.cuts"}.
129 +
#'   software suite (see <http://www.gurobi.com/documentation/8.0/refman/poolsearchmode.html#parameter:PoolSearchMode>).
130 +
#'   Defaults to `"benders.cuts"`.
131 131
#'
132 -
#' @return \code{GurobiOpts} object
132 +
#' @return `GurobiOpts` object
133 133
#'
134 -
#' @seealso \code{\link{GurobiOpts-class}}.
134 +
#' @seealso [GurobiOpts-class].
135 135
#'
136 136
#' @examples
137 137
#' # create GurobiOpts object using default parameters

@@ -5,14 +5,14 @@
Loading
5 5
#'
6 6
#' This class is used to store RAP input data and input parameters.
7 7
#'
8 -
#' @slot opts \code{\link{RapReliableOpts}} or \code{\link{RapUnreliableOpts}}
8 +
#' @slot opts [RapReliableOpts()] or [RapUnreliableOpts()]
9 9
#'   object used to store input parameters.
10 10
#'
11 -
#' @slot data \code{\link{RapData}} object used to store input data.
11 +
#' @slot data [RapData()] object used to store input data.
12 12
#'
13 13
#'
14 -
#' @seealso  \code{\link{RapReliableOpts-class}},
15 -
#'   \code{\link{RapUnreliableOpts-class}}, \code{\link{RapData-class}}.
14 +
#' @seealso  [RapReliableOpts-class],
15 +
#'   [RapUnreliableOpts-class], [RapData-class].
16 16
#'
17 17
#' @name RapUnsolved-class
18 18
#'
@@ -24,19 +24,19 @@
Loading
24 24
25 25
#' Create a new RapUnsolved object
26 26
#'
27 -
#' This function creates a \code{\link{RapUnsolved}} object using a
28 -
#' \code{\link{GurobiOpts}}, a \code{\link{RapReliableOpts}} or
29 -
#' \code{\link{RapUnreliableOpts}} object, and a \code{\link{RapData}} object.
27 +
#' This function creates a [RapUnsolved()] object using a
28 +
#' [GurobiOpts()], a [RapReliableOpts()] or
29 +
#' [RapUnreliableOpts()] object, and a [RapData()] object.
30 30
#'
31 -
#' @param opts \code{\link{RapReliableOpts}} or \code{\link{RapUnreliableOpts}}
31 +
#' @param opts [RapReliableOpts()] or [RapUnreliableOpts()]
32 32
#'   object.
33 33
#'
34 -
#' @param data \code{\link{RapData}} object.
34 +
#' @param data [RapData()] object.
35 35
#'
36 -
#' @return \code{\link{RapUnsolved}} object.
36 +
#' @return [RapUnsolved()] object.
37 37
#'
38 -
#' @seealso \code{\link{RapReliableOpts-class}},
39 -
#'   \code{\link{RapUnreliableOpts-class}}, \code{\link{RapData-class}}.
38 +
#' @seealso [RapReliableOpts-class],
39 +
#'   [RapUnreliableOpts-class], [RapData-class].
40 40
#'
41 41
#' @examples
42 42
#' \donttest{

@@ -6,19 +6,19 @@
Loading
6 6
#' This class is used to store RAP input and output data in addition to input
7 7
#' parameters.
8 8
#'
9 -
#' @slot opts \code{\link{RapReliableOpts}} or \code{\link{RapUnreliableOpts}}
9 +
#' @slot opts [RapReliableOpts()] or [RapUnreliableOpts()]
10 10
#'   object used to store input parameters.
11 11
#'
12 -
#' @slot solver \code{\link{GurobiOpts}} or \code{\link{ManualOpts}} object
12 +
#' @slot solver [GurobiOpts()] or [ManualOpts()] object
13 13
#'   used to store solver information/parameters.
14 14
#'
15 -
#' @slot data \code{\link{RapData}} object used to store input data.
15 +
#' @slot data [RapData()] object used to store input data.
16 16
#'
17 -
#' @slot results \code{\link{RapResults}} object used to store results.
17 +
#' @slot results [RapResults()] object used to store results.
18 18
#'
19 -
#' @seealso \code{\link{RapReliableOpts-class}},
20 -
#'   \code{\link{RapUnreliableOpts-class}}, \code{\link{RapData-class}},
21 -
#'   \code{\link{RapResults-class}}.
19 +
#' @seealso [RapReliableOpts-class],
20 +
#'   [RapUnreliableOpts-class], [RapData-class],
21 +
#'   [RapResults-class].
22 22
#'
23 23
#' @name RapSolved-class
24 24
#'
@@ -34,17 +34,17 @@
Loading
34 34
35 35
#' Create new RapSolved object
36 36
#'
37 -
#' This function creates a \code{\link{RapSolved}} object.
37 +
#' This function creates a [RapSolved()] object.
38 38
#'
39 -
#' @param unsolved \code{\link{RapUnsolved}} object.
39 +
#' @param unsolved [RapUnsolved()] object.
40 40
#'
41 -
#' @param solver \code{\link{GurobiOpts}} or \code{\link{ManualOpts}} object.
41 +
#' @param solver [GurobiOpts()] or [ManualOpts()] object.
42 42
#'
43 -
#' @param results \code{\link{RapResults}} object.
43 +
#' @param results [RapResults()] object.
44 44
#'
45 -
#' @return \code{\link{RapSolved}} object.
45 +
#' @return [RapSolved()] object.
46 46
#'
47 -
#' @seealso \code{\link{RapSolved-class}}, \code{\link{RapResults-class}},
47 +
#' @seealso [RapSolved-class], [RapResults-class],
48 48
#'   \code{link{solve}}.
49 49
#'
50 50
#' @export
@@ -266,8 +266,6 @@
Loading
266 266
267 267
#' @rdname selections
268 268
#'
269 -
#' @inheritParams selections
270 -
#'
271 269
#' @export
272 270
selections.RapSolved <- function(x, y = 0) {
273 271
  selections.RapResults(x@results, y)
@@ -275,8 +273,6 @@
Loading
275 273
276 274
#' @rdname score
277 275
#'
278 -
#' @inheritParams score
279 -
#'
280 276
#' @export
281 277
score.RapSolved <- function(x, y = 0) {
282 278
  score.RapResults(x@results, y)
@@ -291,8 +287,6 @@
Loading
291 287
292 288
#' @export
293 289
#'
294 -
#' @inheritParams amount.held
295 -
#'
296 290
#' @rdname amount.held
297 291
amount.held.RapSolved <- function(x, y = 0, species = NULL) {
298 292
  # get solution numbers
@@ -314,8 +308,6 @@
Loading
314 308
315 309
#' @rdname space.held
316 310
#'
317 -
#' @inheritParams space.held
318 -
#'
319 311
#' @export
320 312
space.held.RapSolved <- function(x, y = 0, species = NULL, space = NULL) {
321 313
  # get solution numbers
@@ -359,8 +351,6 @@
Loading
359 351
360 352
#' @rdname logging.file
361 353
#'
362 -
#' @inheritParams logging.file
363 -
#'
364 354
#' @export
365 355
logging.file.RapSolved <- function(x, y = 0) {
366 356
  logging.file.RapResults(x@results, y)

@@ -7,34 +7,34 @@
Loading
7 7
#' Be aware that using polygons with overlaps will result in inaccuracies.
8 8
#' By default all polygons will be treated as having separate ids.
9 9
#'
10 -
#' @param x \code{\link[sp]{SpatialPolygons}} or
11 -
#'   \code{\link[sp]{SpatialPolygonsDataFrame}} object.
10 +
#' @param x [sp::SpatialPolygons()] or
11 +
#'   [sp::SpatialPolygonsDataFrame()] object.
12 12
#'
13 -
#' @param y \code{\link[raster]{RasterLayer-class}},
14 -
#'   \code{\link[raster]{RasterStack-class}}, or
15 -
#'   \code{\link[raster]{RasterBrick-class}} object.
13 +
#' @param y [raster::RasterLayer-class],
14 +
#'   [raster::RasterStack-class], or
15 +
#'   [raster::RasterBrick-class] object.
16 16
#'
17 -
#' @param ids \code{integer} vector of ids. Defaults to indices of layers in
18 -
#'   argument to \code{y}.
17 +
#' @param ids `integer` vector of ids. Defaults to indices of layers in
18 +
#'   argument to `y`.
19 19
#'
20 -
#' @param ncores \code{integer} number of cores to use for processing. Defaults
20 +
#' @param ncores `integer` number of cores to use for processing. Defaults
21 21
#'   to 1.
22 22
#'
23 -
#' @param gdal \code{logical} Should raster processing be performed using GDAL
24 -
#'   libraries? Defaults to \code{FALSE}.
23 +
#' @param gdal `logical` Should raster processing be performed using GDAL
24 +
#'   libraries? Defaults to `FALSE`.
25 25
#'
26 -
#' @param field \code{integer} index or \code{character} name of column with
27 -
#'   planning unit ids. Valid only when \code{x} is a
28 -
#'   \code{\link[sp]{SpatialPolygonsDataFrame}} object. Default behavior is to
26 +
#' @param field `integer` index or `character` name of column with
27 +
#'   planning unit ids. Valid only when `x` is a
28 +
#'   [sp::SpatialPolygonsDataFrame()] object. Default behavior is to
29 29
#'   treat each polygon as a different planning unit.
30 30
#'
31 31
#' @param ... not used.
32 32
#'
33 -
#' @return \code{\link[base]{data.frame}} with sum of raster values in each
33 +
#' @return [base::data.frame()] with sum of raster values in each
34 34
#'   polygon.
35 35
#'
36 -
#' @seealso \code{\link{is.gdalInstalled}}, \url{http://www.gdal.org/},
37 -
#'   \url{http://trac.osgeo.org/gdal/wiki/DownloadingGdalBinaries}.
36 +
#' @seealso [is.gdalInstalled()], <http://www.gdal.org/>,
37 +
#'   <http://trac.osgeo.org/gdal/wiki/DownloadingGdalBinaries>.
38 38
#'
39 39
#' @examples
40 40
#' # simulate data
@@ -55,27 +55,27 @@
Loading
55 55
#'
56 56
#' This function simulates species distributions for RAP.
57 57
#'
58 -
#' @param x \code{\link[raster]{RasterLayer-class}} or
59 -
#'   \code{\link[sp]{SpatialPolygons}} object delineate the spatial extent to
58 +
#' @param x [raster::RasterLayer-class] or
59 +
#'   [sp::SpatialPolygons()] object delineate the spatial extent to
60 60
#'   delineate study area.
61 61
#'
62 -
#' @param n \code{integer} number of species. Defaults to 1.
62 +
#' @param n `integer` number of species. Defaults to 1.
63 63
#'
64 -
#' @param res \code{numeric} resolution to simulate distributions. Only needed
65 -
#'   when \code{\link[sp]{SpatialPolygons}} supplied.
64 +
#' @param res `numeric` resolution to simulate distributions. Only needed
65 +
#'   when [sp::SpatialPolygons()] supplied.
66 66
#'
67 -
#' @param model \code{\link[RandomFields]{RMmodel}} model to simulate species
68 -
#'   distributions with. Defaults \code{\link[RandomFields]{RPgauss}}.
67 +
#' @param model [RandomFields::RMmodel()] model to simulate species
68 +
#'   distributions with. Defaults [RandomFields::RPgauss()].
69 69
#'
70 -
#' @param ... parameters passed to \code{\link[RandomFields]{RandomFields}}.
70 +
#' @param ... parameters passed to [RandomFields::RandomFields()].
71 71
#'
72 -
#' @details Distributions are simulated by passing \code{model} to
73 -
#'   \code{\link[RandomFields]{RFsimulate}} and converting to logistic values
74 -
#'   using \code{\link[boot]{inv.logit}}.
72 +
#' @details Distributions are simulated by passing `model` to
73 +
#'   [RandomFields::RFsimulate()] and converting to logistic values
74 +
#'   using [boot::inv.logit()].
75 75
#'
76 -
#' @return \code{RasterStack} with layers for each species.
76 +
#' @return `RasterStack` with layers for each species.
77 77
#'
78 -
#' @seealso \code{\link[RandomFields]{RFsimulate}}.
78 +
#' @seealso [RandomFields::RFsimulate()].
79 79
#'
80 80
#' @examples
81 81
#' # make polygons
@@ -113,25 +113,25 @@
Loading
113 113
#'
114 114
#' This function simulates attribute space data for RAP.
115 115
#'
116 -
#' @param x \code{RasterLayer} or \code{\link[sp]{SpatialPolygons}} object
116 +
#' @param x `RasterLayer` or [sp::SpatialPolygons()] object
117 117
#'   delineate the spatial extent to delineate study area.
118 118
#'
119 -
#' @param d \code{integer} number of dimensions. Defaults to 2.
119 +
#' @param d `integer` number of dimensions. Defaults to 2.
120 120
#'
121 -
#' @param res \code{numeric} resolution to simulate distributions. Only needed
122 -
#'   when \code{\link[sp]{SpatialPolygons}} supplied.
121 +
#' @param res `numeric` resolution to simulate distributions. Only needed
122 +
#'   when [sp::SpatialPolygons()] supplied.
123 123
#'
124 -
#' @param model \code{\link[RandomFields]{RMmodel}} model to simulate species
125 -
#'   distributions with. Defaults \code{\link[RandomFields]{RPgauss}}.
124 +
#' @param model [RandomFields::RMmodel()] model to simulate species
125 +
#'   distributions with. Defaults [RandomFields::RPgauss()].
126 126
#'
127 -
#' @param ... parameters passed to \code{\link[RandomFields]{RandomFields}}.
127 +
#' @param ... parameters passed to [RandomFields::RandomFields()].
128 128
#'
129 -
#' @details Distributions are simulated by passing \code{model} to
130 -
#'   \code{\link[RandomFields]{RFsimulate}}.
129 +
#' @details Distributions are simulated by passing `model` to
130 +
#'   [RandomFields::RFsimulate()].
131 131
#'
132 -
#' @return \code{RasterStack} with layers for each dimension of the space.
132 +
#' @return `RasterStack` with layers for each dimension of the space.
133 133
#'
134 -
#' @seealso \code{\link[RandomFields]{RFsimulate}}.
134 +
#' @seealso [RandomFields::RFsimulate()].
135 135
#'
136 136
#' @name sim.space
137 137
#'
@@ -161,28 +161,28 @@
Loading
161 161
#' Solve RAP object
162 162
#'
163 163
#' This function uses Gurobi to find prioritizations using the input parameter
164 -
#' and data stored in a \code{\link{RapUnsolved}} object, and returns a
165 -
#' \code{\link{RapSolved}} object with outputs in it.
164 +
#' and data stored in a [RapUnsolved()] object, and returns a
165 +
#' [RapSolved()] object with outputs in it.
166 166
#'
167 -
#' @param a \code{\link{RapUnsolved}} or \code{\link{RapSolved}} object.
167 +
#' @param a [RapUnsolved()] or [RapSolved()] object.
168 168
#'
169 -
#' @param b \code{missing} to generate solutions using Gurobi. Prioritizations
170 -
#'   can be specified using  \code{logical}, \code{numeric}, or
171 -
#'   \code{\link[base]{matrix}} objects. This may be useful for evaluating the
169 +
#' @param b `missing` to generate solutions using Gurobi. Prioritizations
170 +
#'   can be specified using  `logical`, `numeric`, or
171 +
#'   [base::matrix()] objects. This may be useful for evaluating the
172 172
#'   performance of solutions obtained using other software.
173 173
#'
174 -
#' @param verbose \code{logical} should messages be printed during creation of
174 +
#' @param verbose `logical` should messages be printed during creation of
175 175
#'   the initial model matrix?.
176 176
#'
177 177
#' @param ... not used.
178 178
#'
179 -
#' @return \code{\link{RapSolved}} object
179 +
#' @return [RapSolved()] object
180 180
#'
181 -
#' @note This function is used to solve a \code{\link{RapUnsolved}} object that
181 +
#' @note This function is used to solve a [RapUnsolved()] object that
182 182
#'   has all of its inputs generated. The rap function (without lower case 'r')
183 183
#'   provides a more general interface for generating inputs and outputs.
184 184
#'
185 -
#' @seealso \code{\link{RapUnsolved}}, \code{\link{RapSolved}}.
185 +
#' @seealso [RapUnsolved()], [RapSolved()].
186 186
#'
187 187
#' @examples
188 188
#' # load RapUnsolved object
@@ -213,55 +213,55 @@
Loading
213 213
214 214
#' Plot object
215 215
#'
216 -
#' This function plots the solutions contained in \code{\link{RapSolved}}
216 +
#' This function plots the solutions contained in [RapSolved()]
217 217
#' objects. It can be used to show a single solution, or the the selection
218 -
#' frequencies of planning units contained in a single \code{\link{RapSolved}}
219 -
#' object. Additionally, two \code{\link{RapSolved}} objects can be supplied to
218 +
#' frequencies of planning units contained in a single [RapSolved()]
219 +
#' object. Additionally, two [RapSolved()] objects can be supplied to
220 220
#' plot the differences between them.
221 221
#'
222 -
#' @param x \code{\link{RapSolved}} object.
222 +
#' @param x [RapSolved()] object.
223 223
#'
224 -
#' @param y Available inputs are: \code{NULL} to plot selection frequencies,
225 -
#'   \code{numeric} number to plot a specific solution,
226 -
#'   \code{0} to plot the best solution, and a \code{\link{RapSolved}}
224 +
#' @param y Available inputs are: `NULL` to plot selection frequencies,
225 +
#'   `numeric` number to plot a specific solution,
226 +
#'   `0` to plot the best solution, and a [RapSolved()]
227 227
#'   object to plot differences in solutions between objects. Defaults to
228 -
#'   \code{NULL}.
229 -
#'
230 -
#' @param i Available inputs are: \code{NULL} to plot selection frequencies.
231 -
#'   \code{numeric} to plot a specific solution, \code{0} to plot the best
232 -
#'   solution. This argument is only used when \code{y} is a
233 -
#'   \code{\link{RapSolved}} object. Defaults to \code{NULL}.
234 -
#'
235 -
#' @param j Available inputs are: \code{NULL} to plot selection frequencies.
236 -
#'   \code{numeric} to plot a specific solution, \code{0} to plot the best
237 -
#'   solution. This argument is only used when \code{y} is a
238 -
#'   \code{\link{RapSolved}} object. Defaults to argument \code{j}.
239 -
#'
240 -
#' @param basemap \code{character} object indicating the type of basemap to use
241 -
#'   (see \code{\link{basemap}}). Valid options include \code{"none"},
242 -
#'   \code{"roadmap"}, \code{"mobile"}, \code{"satellite"}, \code{"terrain"},
243 -
#'   \code{"hybrid"}, \code{"mapmaker-roadmap"}, \code{"mapmaker-hybrid"}.
244 -
#'   Defaults to \code{"none"}.
245 -
#'
246 -
#' @param pu.color.palette \code{character} name of colors or color palette
247 -
#'   (\code{\link[RColorBrewer]{brewer.pal}}) to indicate planning unit
248 -
#'   statuses. Defaults to \code{c("grey30", "green", "yellow", "black",
249 -
#'   "gray80", "red", "orange")}.
250 -
#'
251 -
#' @param alpha \code{numeric} value to indicating the transparency level for
228 +
#'   `NULL`.
229 +
#'
230 +
#' @param i Available inputs are: `NULL` to plot selection frequencies.
231 +
#'   `numeric` to plot a specific solution, `0` to plot the best
232 +
#'   solution. This argument is only used when `y` is a
233 +
#'   [RapSolved()] object. Defaults to `NULL`.
234 +
#'
235 +
#' @param j Available inputs are: `NULL` to plot selection frequencies.
236 +
#'   `numeric` to plot a specific solution, `0` to plot the best
237 +
#'   solution. This argument is only used when `y` is a
238 +
#'   [RapSolved()] object. Defaults to argument `j`.
239 +
#'
240 +
#' @param basemap `character` object indicating the type of basemap to use
241 +
#'   (see [basemap()]). Valid options include `"none"`,
242 +
#'   `"roadmap"`, `"mobile"`, `"satellite"`, `"terrain"`,
243 +
#'   `"hybrid"`, `"mapmaker-roadmap"`, `"mapmaker-hybrid"`.
244 +
#'   Defaults to `"none"`.
245 +
#'
246 +
#' @param pu.color.palette `character` name of colors or color palette
247 +
#'   ([RColorBrewer::brewer.pal()]) to indicate planning unit
248 +
#'   statuses. Defaults to `c("grey30", "green", "yellow", "black",
249 +
#'   "gray80", "red", "orange")`.
250 +
#'
251 +
#' @param alpha `numeric` value to indicating the transparency level for
252 252
#'   coloring the planning units.
253 253
#'
254 -
#' @param grayscale \code{logical} should the basemap be gray-scaled?
254 +
#' @param grayscale `logical` should the basemap be gray-scaled?
255 255
#'
256 -
#' @param main \code{character} title for the plot. Defaults to \code{NULL} and
256 +
#' @param main `character` title for the plot. Defaults to `NULL` and
257 257
#'   a default title is used.
258 258
#'
259 -
#' @param force.reset \code{logical} if basemap data has been cached, should it
259 +
#' @param force.reset `logical` if basemap data has been cached, should it
260 260
#'   be re-downloaded?
261 261
#'
262 262
#' @name plot
263 263
#'
264 -
#' @seealso \code{\link{RapSolved}}.
264 +
#' @seealso [RapSolved()].
265 265
#'
266 266
#' @examples
267 267
#' # load example data set with solutions
@@ -284,15 +284,15 @@
Loading
284 284
#'
285 285
#' This function sets or returns the species names in an object.
286 286
#'
287 -
#' @param x \code{\link{RapData}}, \code{\link{RapUnsolved}}, or
288 -
#'   \code{\link{RapSolved}} object.
287 +
#' @param x [RapData()], [RapUnsolved()], or
288 +
#'   [RapSolved()] object.
289 289
#'
290 290
#' @param value new species names.
291 291
#'
292 292
#' @name names
293 293
#'
294 -
#' @seealso \code{\link{RapData}}, \code{\link{RapUnsolved}},
295 -
#'   \code{\link{RapSolved}}.
294 +
#' @seealso [RapData()], [RapUnsolved()],
295 +
#'   [RapSolved()].
296 296
#'
297 297
#' @examples
298 298
#' # load data
@@ -313,21 +313,21 @@
Loading
313 313
#'
314 314
#' Prints objects.
315 315
#'
316 -
#' @param x \code{\link{GurobiOpts}}, \code{\link{RapUnreliableOpts}},
317 -
#'   \code{\link{RapReliableOpts}}, \code{\link{RapData}},
318 -
#'   \code{\link{RapUnsolved}}, \code{\link{RapResults}}, or
319 -
#'   \code{\link{RapSolved}} object.
316 +
#' @param x [GurobiOpts()], [RapUnreliableOpts()],
317 +
#'   [RapReliableOpts()], [RapData()],
318 +
#'   [RapUnsolved()], [RapResults()], or
319 +
#'   [RapSolved()] object.
320 320
#'
321 -
#' @param header \code{logical} should object header be included?
321 +
#' @param header `logical` should object header be included?
322 322
#'
323 323
#' @param ... not used.
324 324
#'
325 325
#' @name print
326 326
#'
327 -
#' @seealso \code{\link{GurobiOpts}}, \code{\link{RapUnreliableOpts}},
328 -
#'   \code{\link{RapReliableOpts}}, \code{\link{RapData}},
329 -
#'   \code{\link{RapUnsolved}}, \code{\link{RapResults}},
330 -
#'   \code{\link{RapSolved}}.
327 +
#' @seealso [GurobiOpts()], [RapUnreliableOpts()],
328 +
#'   [RapReliableOpts()], [RapData()],
329 +
#'   [RapUnsolved()], [RapResults()],
330 +
#'   [RapSolved()].
331 331
#'
332 332
#' @examples
333 333
#' # load data
@@ -359,17 +359,17 @@
Loading
359 359
#'
360 360
#' Shows objects.
361 361
#'
362 -
#' @param object \code{\link{GurobiOpts}}, \code{\link{RapUnreliableOpts}},
363 -
#'   \code{\link{RapReliableOpts}}, \code{\link{RapData}},
364 -
#'   \code{\link{RapUnsolved}}, \code{\link{RapResults}}, or
365 -
#'   \code{\link{RapSolved}} object.
362 +
#' @param object [GurobiOpts()], [RapUnreliableOpts()],
363 +
#'   [RapReliableOpts()], [RapData()],
364 +
#'   [RapUnsolved()], [RapResults()], or
365 +
#'   [RapSolved()] object.
366 366
#'
367 367
#' @name show
368 368
#'
369 -
#' @seealso \code{\link{GurobiOpts}}, \code{\link{RapUnreliableOpts}},
370 -
#'   \code{\link{RapReliableOpts}}, \code{\link{RapData}},
371 -
#'   \code{\link{RapUnsolved}}, \code{\link{RapResults}},
372 -
#'   \code{\link{RapSolved}}.
369 +
#' @seealso [GurobiOpts()], [RapUnreliableOpts()],
370 +
#'   [RapReliableOpts()], [RapData()],
371 +
#'   [RapUnsolved()], [RapResults()],
372 +
#'   [RapSolved()].
373 373
#'
374 374
#' @examples
375 375
#' # load data
@@ -399,21 +399,21 @@
Loading
399 399
400 400
#' Convert object to list
401 401
#'
402 -
#' Convert \code{\link{GurobiOpts}} object to list.
402 +
#' Convert [GurobiOpts()] object to list.
403 403
#'
404 -
#' @param x \code{\link{GurobiOpts}} object.
404 +
#' @param x [GurobiOpts()] object.
405 405
#'
406 406
#' @param ... not used.
407 407
#'
408 408
#' @name as.list
409 409
#'
410 -
#' @return \code{list}
410 +
#' @return `list`
411 411
#'
412 -
#' @note This function will not include the \code{NumberSolutions} slot, the
413 -
#'  \code{MultipleSolutionsMethod} slot, or the \code{TimeLimit} slot if it is
412 +
#' @note This function will not include the `NumberSolutions` slot, the
413 +
#'  `MultipleSolutionsMethod` slot, or the `TimeLimit` slot if it is
414 414
#'  not finite.
415 415
#'
416 -
#' @seealso \code{GurobiOpts}.
416 +
#' @seealso `GurobiOpts`.
417 417
#'
418 418
#' @examples
419 419
#' # make GuboriOpts object
@@ -425,20 +425,20 @@
Loading
425 425
426 426
#' Summary of solutions
427 427
#'
428 -
#' Extracts summary of solutions in a \code{\link{RapResults}} or
429 -
#' \code{\link{RapSolved}} object.
428 +
#' Extracts summary of solutions in a [RapResults()] or
429 +
#' [RapSolved()] object.
430 430
#'
431 -
#' @param object \code{\link{RapResults}}, or \code{\link{RapSolved}} object.
431 +
#' @param object [RapResults()], or [RapSolved()] object.
432 432
#'
433 433
#' @param ... not used.
434 434
#'
435 435
#' @details This table follows Marxan conventions ("summary.dat" in
436 -
#'   \url{http://marxan.net/downloads/uq_marxan_web_2/module5.html}). The
436 +
#'   <http://marxan.net/downloads/uq_marxan_web_2/module5.html>). The
437 437
#'   columns are:
438 438
#' \describe{
439 439
#' \item{Run_Number}{The index of each solution in the object.}
440 440
#' \item{Status}{The status of the solution. The values in this column
441 -
#' correspond to outputs from the Gurobi software package (\url{http://www.gurobi.com/documentation/6.5/refman/optimization_status_codes.html}).}
441 +
#' correspond to outputs from the Gurobi software package (<http://www.gurobi.com/documentation/6.5/refman/optimization_status_codes.html>).}
442 442
#' \item{Score}{The objective function for the solution.}
443 443
#' \item{Cost}{Total cost associated with a solution.}
444 444
#' \item{Planning_Units}{Number of planning units selected in a solution.}
@@ -452,17 +452,17 @@
Loading
452 452
#' \item{Connectivity_Out}{The number of shared boundary length among planning
453 453
#' units not selected in the solution.}
454 454
#' \item{Connectivity_Fraction}{The ratio of shared boundary length in the
455 -
#' solution (\code{Connectivity_In}) to the total amount of boundary length
456 -
#' (\code{Connectivity_Edge}). This ratio is an indicator of solution quality.
455 +
#' solution (`Connectivity_In`) to the total amount of boundary length
456 +
#' (`Connectivity_Edge`). This ratio is an indicator of solution quality.
457 457
#' Solutions with a lower ratio will have less planning units and will be more
458 458
#' efficient.}
459 459
#' }
460 460
#'
461 461
#' @name summary
462 462
#'
463 -
#' @return \code{data.frame}
463 +
#' @return `data.frame`
464 464
#'
465 -
#' @seealso \code{\link{RapResults}}, \code{\link{RapSolved}}.
465 +
#' @seealso [RapResults()], [RapSolved()].
466 466
#'
467 467
#' @examples
468 468
#' # load data
@@ -475,93 +475,93 @@
Loading
475 475
#' Update object
476 476
#'
477 477
#' This function updates parameters or data stored in an existing
478 -
#' \code{\link{GurobiOpts}}, \code{\link{RapUnreliableOpts}},
479 -
#' \code{\link{RapReliableOpts}}, \code{\link{RapData}},
480 -
#' \code{\link{RapUnsolved}}, or \code{\link{RapSolved}} object.
478 +
#' [GurobiOpts()], [RapUnreliableOpts()],
479 +
#' [RapReliableOpts()], [RapData()],
480 +
#' [RapUnsolved()], or [RapSolved()] object.
481 481
#'
482 -
#' @param object \code{\link{GurobiOpts}}, \code{\link{RapUnreliableOpts}},
483 -
#'   \code{\link{RapReliableOpts}}, \code{\link{RapData}},
484 -
#'   \code{\link{RapUnsolved}}, or \code{\link{RapSolved}} object.
482 +
#' @param object [GurobiOpts()], [RapUnreliableOpts()],
483 +
#'   [RapReliableOpts()], [RapData()],
484 +
#'   [RapUnsolved()], or [RapSolved()] object.
485 485
#'
486 -
#' @param Threads \code{integer} number of cores to use for processing.
486 +
#' @param Threads `integer` number of cores to use for processing.
487 487
#'
488 -
#' @param MIPGap \code{numeric} MIP gap specifying minimum solution quality.
488 +
#' @param MIPGap `numeric` MIP gap specifying minimum solution quality.
489 489
#'
490 -
#' @param Method \code{integer} Algorithm to use for solving model.
490 +
#' @param Method `integer` Algorithm to use for solving model.
491 491
#'
492 -
#' @param Presolve \code{integer} code for level of computation in presolve.
492 +
#' @param Presolve `integer` code for level of computation in presolve.
493 493
#'
494 -
#' @param TimeLimit \code{integer} number of seconds to allow for solving.
494 +
#' @param TimeLimit `integer` number of seconds to allow for solving.
495 495
#'
496 -
#' @param NumberSolutions \code{integer} number of solutions to generate.
496 +
#' @param NumberSolutions `integer` number of solutions to generate.
497 497
#'
498 -
#' @param MultipleSolutionsMethod \code{integer} name of method to obtain
499 -
#'   multiple solutions (used when \code{NumberSolutions} is greater than one).
500 -
#'   Available options are \code{"benders.cuts"}, \code{"solution.pool.0"},
501 -
#'   \code{"solution.pool.1"}, and \code{"solution.pool.2"}. The
502 -
#'   \code{"benders.cuts"} method produces a set of distinct solutions that
503 -
#'   are all within the optimality gap. The \code{"solution.pool.0"}
498 +
#' @param MultipleSolutionsMethod `integer` name of method to obtain
499 +
#'   multiple solutions (used when `NumberSolutions` is greater than one).
500 +
#'   Available options are `"benders.cuts"`, `"solution.pool.0"`,
501 +
#'   `"solution.pool.1"`, and `"solution.pool.2"`. The
502 +
#'   `"benders.cuts"` method produces a set of distinct solutions that
503 +
#'   are all within the optimality gap. The `"solution.pool.0"`
504 504
#'   method returns all solutions identified whilst trying to find
505 505
#'   a solution that is within the specified optimality gap. The
506 -
#'   \code{"solution.pool.1"} method finds one solution within the optimality
506 +
#'   `"solution.pool.1"` method finds one solution within the optimality
507 507
#'   gap and a number of additional solutions that are of any level of quality
508 508
#'   (such that the total number of solutions is equal to
509 -
#'   \code{number_solutions}). The \code{"solution.pool.2"} finds a
509 +
#'   `number_solutions`). The `"solution.pool.2"` finds a
510 510
#'   specified number of solutions that are nearest to optimality. The
511 511
#'   search pool methods correspond to the parameters used by the Gurobi
512 -
#'   software suite (see \url{http://www.gurobi.com/documentation/8.0/refman/poolsearchmode.html#parameter:PoolSearchMode}).
513 -
#'   Defaults to \code{"benders.cuts"}.
512 +
#'   software suite (see <http://www.gurobi.com/documentation/8.0/refman/poolsearchmode.html#parameter:PoolSearchMode>).
513 +
#'   Defaults to `"benders.cuts"`.
514 514
#'
515 -
#' @param BLM \code{numeric} boundary length modifier.
515 +
#' @param BLM `numeric` boundary length modifier.
516 516
#'
517 -
#' @param failure.multiplier \code{numeric} multiplier for failure planning
517 +
#' @param failure.multiplier `numeric` multiplier for failure planning
518 518
#'   unit.
519 519
#'
520 -
#' @param max.r.level \code{numeric} maximum R failure level for approximation.
520 +
#' @param max.r.level `numeric` maximum R failure level for approximation.
521 521
#'
522 -
#' @param formulation \code{character} indicating new problem formulation to
522 +
#' @param formulation `character` indicating new problem formulation to
523 523
#'   use. This can be either "unreliable" or "reliable". The default is
524 -
#'   \code{NULL} so that formulation in \code{object} is used.
524 +
#'   `NULL` so that formulation in `object` is used.
525 525
#'
526 -
#' @param species \code{integer} or \code{character} denoting species for which
526 +
#' @param species `integer` or `character` denoting species for which
527 527
#'   targets or name should be updated.
528 528
#'
529 -
#' @param space \code{integer} denoting space for which targets should be
529 +
#' @param space `integer` denoting space for which targets should be
530 530
#'   updated.
531 531
#'
532 -
#' @param name \code{character} to rename species.
532 +
#' @param name `character` to rename species.
533 533
#'
534 -
#' @param amount.target \code{numeric} vector for new area targets (\%) for the
534 +
#' @param amount.target `numeric` vector for new area targets (%) for the
535 535
#'   specified species.
536 536
#'
537 -
#' @param space.target \code{numeric} vector for new attribute space targets
538 -
#'   (\%) for the specified species and attribute spaces.
537 +
#' @param space.target `numeric` vector for new attribute space targets
538 +
#'   (%) for the specified species and attribute spaces.
539 539
#'
540 -
#' @param pu \code{integer} planning unit indices that need to be updated.
540 +
#' @param pu `integer` planning unit indices that need to be updated.
541 541
#'
542 -
#' @param status \code{integer} new statuses for specified planning units.
542 +
#' @param status `integer` new statuses for specified planning units.
543 543
#'
544 -
#' @param cost \code{numeric} new costs for specified planning units.
544 +
#' @param cost `numeric` new costs for specified planning units.
545 545
#'
546 -
#' @param ... parameters passed to \code{\link{update.RapReliableOpts}},
547 -
#'   \code{\link{update.RapUnreliableOpts}}, or \code{\link{update.RapData}}.
546 +
#' @param ... parameters passed to [update.RapReliableOpts()],
547 +
#'   [update.RapUnreliableOpts()], or [update.RapData()].
548 548
#'
549 -
#' @param solve \code{logical} should the problem be solved? This argument is
550 -
#'   only valid for \code{\link{RapUnsolved}} and \code{\link{RapSolved}}
551 -
#'   objects. Defaults to \code{TRUE}.
549 +
#' @param solve `logical` should the problem be solved? This argument is
550 +
#'   only valid for [RapUnsolved()] and [RapSolved()]
551 +
#'   objects. Defaults to `TRUE`.
552 552
#'
553 553
#' @name update
554 554
#'
555 -
#' @return \code{\link{GurobiOpts-class}},
556 -
#'   \code{\link{RapUnreliableOpts-class}},
557 -
#'   \code{\link{RapReliableOpts-class}}, \code{\link{RapData-class}},
558 -
#'   \code{\link{RapUnsolved-class}}, or \code{\link{RapSolved-class}} object
559 -
#'   depending on argument to \code{x}.
555 +
#' @return [GurobiOpts-class],
556 +
#'   [RapUnreliableOpts-class],
557 +
#'   [RapReliableOpts-class], [RapData-class],
558 +
#'   [RapUnsolved-class], or [RapSolved-class] object
559 +
#'   depending on argument to `x`.
560 560
#'
561 -
#' @seealso \code{\link{GurobiOpts-class}},
562 -
#'   \code{\link{RapUnreliableOpts-class}},
563 -
#'   \code{\link{RapReliableOpts-class}}, \code{\link{RapData-class}},
564 -
#'   \code{\link{RapUnsolved-class}}, \code{\link{RapSolved-class}}.
561 +
#' @seealso [GurobiOpts-class],
562 +
#'   [RapUnreliableOpts-class],
563 +
#'   [RapReliableOpts-class], [RapData-class],
564 +
#'   [RapUnsolved-class], [RapSolved-class].
565 565
#'
566 566
#' @examples
567 567
#' # load data
@@ -607,20 +607,20 @@
Loading
607 607
608 608
#' Subset species
609 609
#'
610 -
#' Subset species from a \code{\link{RapData}}, \code{\link{RapUnsolved}}, or
611 -
#' \code{\link{RapSolved}} object.
610 +
#' Subset species from a [RapData()], [RapUnsolved()], or
611 +
#' [RapSolved()] object.
612 612
#'
613 -
#' @param x \code{\link{RapData}}, \code{\link{RapUnsolved}}, or
614 -
#'   \code{\link{RapSolved}} object.
613 +
#' @param x [RapData()], [RapUnsolved()], or
614 +
#'   [RapSolved()] object.
615 615
#'
616 -
#' @param species \code{integer}, or \code{character} vectors to specify the
616 +
#' @param species `integer`, or `character` vectors to specify the
617 617
#'   index or species names to subset.
618 618
#'
619 -
#' @return \code{\link{RapData}} or \code{\link{RapUnsolved}} object depending
619 +
#' @return [RapData()] or [RapUnsolved()] object depending
620 620
#'   on input object.
621 621
#'
622 -
#' @seealso \code{\link{RapData}}, \code{\link{RapUnsolved}},
623 -
#'   \code{\link{RapSolved}}.
622 +
#' @seealso [RapData()], [RapUnsolved()],
623 +
#'   [RapSolved()].
624 624
#'
625 625
#' @rdname spp.subset
626 626
#'
@@ -636,20 +636,20 @@
Loading
636 636
637 637
#' Subset planning units
638 638
#'
639 -
#' Subset planning units from a \code{\link{RapData}},
640 -
#' \code{\link{RapUnsolved}}, or \code{\link{RapSolved}} object.
639 +
#' Subset planning units from a [RapData()],
640 +
#' [RapUnsolved()], or [RapSolved()] object.
641 641
#'
642 -
#' @param x \code{\link{RapData}}, \code{\link{RapUnsolved}}, or
643 -
#'   \code{\link{RapSolved}} object.
642 +
#' @param x [RapData()], [RapUnsolved()], or
643 +
#'   [RapSolved()] object.
644 644
#'
645 -
#' @param pu \code{integer} vector to specify the index of planning units to
645 +
#' @param pu `integer` vector to specify the index of planning units to
646 646
#'  subset.
647 647
#'
648 -
#' @return \code{\link{RapData}} or \code{\link{RapUnsolved}} object depending
648 +
#' @return [RapData()] or [RapUnsolved()] object depending
649 649
#'   on input object.
650 650
#'
651 -
#' @seealso \code{\link{RapData}}, \code{\link{RapUnsolved}},
652 -
#'   \code{\link{RapSolved}}.
651 +
#' @seealso [RapData()], [RapUnsolved()],
652 +
#'   [RapSolved()].
653 653
#'
654 654
#' @rdname pu.subset
655 655
#'
@@ -665,26 +665,26 @@
Loading
665 665
666 666
#' Subset demand points
667 667
#'
668 -
#' Subset demand points from a \code{\link{RapData}},
669 -
#' \code{\link{RapUnsolved}}, or \code{\link{RapSolved}} object.
668 +
#' Subset demand points from a [RapData()],
669 +
#' [RapUnsolved()], or [RapSolved()] object.
670 670
#'
671 -
#' @param x \code{\link{RapData}}, \code{\link{RapUnsolved}}, or
672 -
#'   \code{\link{RapSolved}} object.
671 +
#' @param x [RapData()], [RapUnsolved()], or
672 +
#'   [RapSolved()] object.
673 673
#'
674 -
#' @param space \code{integer} vector to specify the index of the space to
674 +
#' @param space `integer` vector to specify the index of the space to
675 675
#'   subset demand points from.
676 676
#'
677 -
#' @param species \code{integer} vector to specify the index of the species to
677 +
#' @param species `integer` vector to specify the index of the species to
678 678
#'   subset demand points from.
679 679
#'
680 -
#' @param points \code{integer} vector to specify the index of demand points to
680 +
#' @param points `integer` vector to specify the index of demand points to
681 681
#'   subset.
682 682
#'
683 -
#' @return \code{\link{RapData}} or \code{\link{RapUnsolved}} object depending
683 +
#' @return [RapData()] or [RapUnsolved()] object depending
684 684
#'   on input object.
685 685
#'
686 -
#' @seealso \code{\link{RapData}}, \code{\link{RapUnsolved}},
687 -
#'   \code{\link{RapSolved}}.
686 +
#' @seealso [RapData()], [RapUnsolved()],
687 +
#'   [RapSolved()].
688 688
#'
689 689
#' @rdname dp.subset
690 690
#'
@@ -704,19 +704,19 @@
Loading
704 704
#' threshold. It effectively sets the probability that species inhabit planning
705 705
#' units to zero if they are below the threshold.
706 706
#'
707 -
#' @param x \code{\link{RapData}}, \code{\link{RapUnsolved}}, or
708 -
#'   \code{\link{RapSolved}} object.
707 +
#' @param x [RapData()], [RapUnsolved()], or
708 +
#'   [RapSolved()] object.
709 709
#'
710 -
#' @param species \code{integer} vector specifying the index of the species to
710 +
#' @param species `integer` vector specifying the index of the species to
711 711
#'   which the threshold should be applied.
712 712
#'
713 -
#' @param threshold \code{numeric} probability to use a threshold.
713 +
#' @param threshold `numeric` probability to use a threshold.
714 714
#'
715 -
#' @return \code{\link{RapData}} or \code{\link{RapUnsolved}} object depending
715 +
#' @return [RapData()] or [RapUnsolved()] object depending
716 716
#'   on input object.
717 717
#'
718 -
#' @seealso \code{\link{RapData}}, \code{\link{RapUnsolved}},
719 -
#'   \code{\link{RapSolved}}.
718 +
#' @seealso [RapData()], [RapUnsolved()],
719 +
#'   [RapSolved()].
720 720
#'
721 721
#' @rdname prob.subset
722 722
#'
@@ -732,19 +732,19 @@
Loading
732 732
733 733
#' Solution score
734 734
#'
735 -
#' Extract solution score from \code{\link{RapResults}} or
736 -
#' \code{\link{RapSolved}} object.
735 +
#' Extract solution score from [RapResults()] or
736 +
#' [RapSolved()] object.
737 737
#'
738 -
#' @param x \code{\link{RapResults}} or \code{\link{RapSolved}} object.
738 +
#' @param x [RapResults()] or [RapSolved()] object.
739 739
#'
740 -
#' @param y Available inputs include: \code{NULL} to return all scores,
741 -
#'  \code{integer} number specifying the solution for which the score should
742 -
#'  be returned, and \code{0} to return score for the best solution.
740 +
#' @param y Available inputs include: `NULL` to return all scores,
741 +
#'  `integer` number specifying the solution for which the score should
742 +
#'  be returned, and `0` to return score for the best solution.
743 743
#'
744 -
#' @return \code{matrix} or \code{numeric} vector with solution score(s)
744 +
#' @return `matrix` or `numeric` vector with solution score(s)
745 745
#'  depending on arguments.
746 746
#'
747 -
#' @seealso \code{\link{RapResults}}, \code{\link{RapSolved}}.
747 +
#' @seealso [RapResults()], [RapSolved()].
748 748
#'
749 749
#' @examples
750 750
#' # load data
@@ -767,16 +767,16 @@
Loading
767 767
#' This function returns the Gurobi log file (*.log) associated with solving
768 768
#' an optimization problem.
769 769
#'
770 -
#' @param x \code{\link{RapResults}} or \code{\link{RapSolved}} object.
770 +
#' @param x [RapResults()] or [RapSolved()] object.
771 771
#'
772 -
#' @param y Available inputs include: \code{NULL} to return all values,
773 -
#'  \code{integer} number specifying the solution for which the log file should
774 -
#'  be returned, and \code{0} to return log file for the best solution.
772 +
#' @param y Available inputs include: `NULL` to return all values,
773 +
#'  `integer` number specifying the solution for which the log file should
774 +
#'  be returned, and `0` to return log file for the best solution.
775 775
#'
776 -
#' @note The term logging file was used due to collisions with the \code{log}
776 +
#' @note The term logging file was used due to collisions with the `log`
777 777
#'   function.
778 778
#'
779 -
#' @seealso \code{\link{RapResults}}, \code{\link{RapSolved}}.
779 +
#' @seealso [RapResults()], [RapSolved()].
780 780
#'
781 781
#' @examples
782 782
#' # load data
@@ -798,34 +798,34 @@
Loading
798 798
#'
799 799
#' This function returns the amount held for each species in a solution.
800 800
#'
801 -
#' @param x \code{\link{RapResults}} or \code{\link{RapSolved}} object.
801 +
#' @param x [RapResults()] or [RapSolved()] object.
802 802
#'
803 -
#' @param y Available inputs include: \code{NULL} to return all values,
804 -
#'  \code{integer} number specifying the solution for which the value should
805 -
#'  be returned, and \code{0} to return the value for the best solution.
803 +
#' @param y Available inputs include: `NULL` to return all values,
804 +
#'  `integer` number specifying the solution for which the value should
805 +
#'  be returned, and `0` to return the value for the best solution.
806 806
#'
807 -
#' @param species \code{NULL} for all species or \code{integer} indicating
807 +
#' @param species `NULL` for all species or `integer` indicating
808 808
#'   species.
809 809
#'
810 -
#' @return \code{\link[base]{matrix}} or \code{numeric} vector depending on
810 +
#' @return [base::matrix()] or `numeric` vector depending on
811 811
#'   arguments.
812 812
#'
813 -
#' @seealso \code{\link{RapResults}}, \code{\link{RapSolved}}.
813 +
#' @seealso [RapResults()], [RapSolved()].
814 814
#'
815 815
#' @examples
816 816
#' # load data
817 817
#' data(sim_rs)
818 818
#'
819 -
#' # amount held (\%) in best solution for each species
819 +
#' # amount held (%) in best solution for each species
820 820
#' amount.held(sim_rs, 0)
821 821
#'
822 -
#' # amount held (\%) in best solution for species 1
822 +
#' # amount held (%) in best solution for species 1
823 823
#' amount.held(sim_rs, 0, 1)
824 824
#'
825 -
#' # amount held (\%) in second solution for each species
825 +
#' # amount held (%) in second solution for each species
826 826
#' amount.held(sim_rs, 2)
827 827
#'
828 -
#' # amount held (\%) in each solution for each species
828 +
#' # amount held (%) in each solution for each species
829 829
#' amount.held(sim_rs, NULL)
830 830
#'
831 831
#' @export
@@ -835,18 +835,18 @@
Loading
835 835
#'
836 836
#' This function sets or returns the target amounts for each species.
837 837
#'
838 -
#' @param x \code{\link{RapData}}, \code{\link{RapUnsolved}}, or
839 -
#'   \code{\link{RapSolved}} object.
838 +
#' @param x [RapData()], [RapUnsolved()], or
839 +
#'   [RapSolved()] object.
840 840
#'
841 -
#' @param species \code{NULL} for all species or \code{integer} indicating
841 +
#' @param species `NULL` for all species or `integer` indicating
842 842
#'   species.
843 843
#'
844 -
#' @param value \code{numeric} new target.
844 +
#' @param value `numeric` new target.
845 845
#'
846 846
#' @return code{numeric} vector.
847 847
#'
848 -
#' @seealso \code{\link{RapData}}, \code{\link{RapResults}},
849 -
#'   \code{\link{RapSolved}}.
848 +
#' @seealso [RapData()], [RapResults()],
849 +
#'   [RapSolved()].
850 850
#'
851 851
#' @export
852 852
#'
@@ -881,33 +881,33 @@
Loading
881 881
#' This function returns the attribute space held for each species in a
882 882
#' solution.
883 883
#'
884 -
#' @param x \code{\link{RapResults}} or \code{\link{RapSolved}} object.
884 +
#' @param x [RapResults()] or [RapSolved()] object.
885 885
#'
886 -
#' @param y Available inputs include: \code{NULL} to return all values,
887 -
#'  \code{integer} number specifying the solution for which the value should
888 -
#'  be returned, and \code{0} to return the value for the best solution.
886 +
#' @param y Available inputs include: `NULL` to return all values,
887 +
#'  `integer` number specifying the solution for which the value should
888 +
#'  be returned, and `0` to return the value for the best solution.
889 889
#'
890 -
#' @param species \code{NULL} for all species or \code{integer} indicating
890 +
#' @param species `NULL` for all species or `integer` indicating
891 891
#'   species.
892 892
#'
893 -
#' @param space \code{NULL} for all spaces or \code{integer} indicating a
893 +
#' @param space `NULL` for all spaces or `integer` indicating a
894 894
#'   specific space.
895 895
#'
896 896
#' @return code{matrix} object.
897 897
#'
898 -
#' @seealso \code{\link{RapResults}}, \code{\link{RapSolved}}.
898 +
#' @seealso [RapResults()], [RapSolved()].
899 899
#'
900 900
#' @examples
901 901
#' # load data
902 902
#' data(sim_rs)
903 903
#'
904 -
#' # space held (\%) for each species in best solution
904 +
#' # space held (%) for each species in best solution
905 905
#' space.held(sim_rs, 0)
906 906
#'
907 -
#' # space held (\%) for each species in second solution
907 +
#' # space held (%) for each species in second solution
908 908
#' space.held(sim_rs, 2)
909 909
#'
910 -
#' # space held (\%) for each species in each solution
910 +
#' # space held (%) for each species in each solution
911 911
#' space.held(sim_rs)
912 912
#'
913 913
#' @export
@@ -917,21 +917,21 @@
Loading
917 917
#'
918 918
#' This function sets or returns the attribute space targets for each species.
919 919
#'
920 -
#' @param x \code{\link{RapData}}, \code{\link{RapUnsolved}}, or
921 -
#'   \code{\link{RapSolved}} object.
920 +
#' @param x [RapData()], [RapUnsolved()], or
921 +
#'   [RapSolved()] object.
922 922
#'
923 -
#' @param species \code{NULL} for all species or \code{integer} indicating
923 +
#' @param species `NULL` for all species or `integer` indicating
924 924
#'   species.
925 925
#'
926 -
#' @param space \code{NULL} for all spaces or \code{integer} indicating a
926 +
#' @param space `NULL` for all spaces or `integer` indicating a
927 927
#'   specific space.
928 928
#'
929 -
#' @param value \code{numeric} new target.
929 +
#' @param value `numeric` new target.
930 930
#'
931 -
#' @return \code{numeric matrix}.
931 +
#' @return `numeric` `matrix`.
932 932
#'
933 -
#' @seealso \code{\link{RapData}}, \code{\link{RapResults}},
934 -
#'   \code{\link{RapSolved}}.
933 +
#' @seealso [RapData()], [RapResults()],
934 +
#'   [RapSolved()].
935 935
#'
936 936
#' @name space.target
937 937
#'
@@ -962,19 +962,19 @@
Loading
962 962
963 963
#' Extract solution selections
964 964
#'
965 -
#' Extract selections for a given solution from a \code{\link{RapResults}} or
966 -
#' \code{\link{RapSolved}} object.
965 +
#' Extract selections for a given solution from a [RapResults()] or
966 +
#' [RapSolved()] object.
967 967
#'
968 -
#' @param x \code{\link{RapResults}} or \code{\link{RapSolved}} object.
968 +
#' @param x [RapResults()] or [RapSolved()] object.
969 969
#'
970 -
#' @param y \code{NULL} to return all values, \code{integer} 0 to return values
971 -
#'   for the best solution, \code{integer} value greater than 0 for \code{y}'th
970 +
#' @param y `NULL` to return all values, `integer` 0 to return values
971 +
#'   for the best solution, `integer` value greater than 0 for `y`'th
972 972
#'   solution value.
973 973
#'
974 -
#' @return \code{\link[base]{matrix}} or \code{numeric} vector depending on
974 +
#' @return [base::matrix()] or `numeric` vector depending on
975 975
#'   arguments.
976 976
#'
977 -
#' @seealso \code{\link{RapResults}}, \code{\link{RapSolved}}.
977 +
#' @seealso [RapResults()], [RapSolved()].
978 978
#'
979 979
#' @examples
980 980
#' # load data
@@ -994,26 +994,26 @@
Loading
994 994
995 995
#' Convert SpatialPolygons to PolySet data
996 996
#'
997 -
#' This function converts spatial \code{\link[sp]{SpatialPolygons}} and
998 -
#' \code{\link[sp]{SpatialPolygonsDataFrame}} objects to
999 -
#' \code{\link[PBSmapping]{PolySet}} objects.
997 +
#' This function converts spatial [sp::SpatialPolygons()] and
998 +
#' [sp::SpatialPolygonsDataFrame()] objects to
999 +
#' [PBSmapping::PolySet()] objects.
1000 1000
#'
1001 -
#' @param x \code{\link[sp]{SpatialPolygons}} or
1002 -
#'   \code{\link[sp]{SpatialPolygonsDataFrame}} object.
1001 +
#' @param x [sp::SpatialPolygons()] or
1002 +
#'   [sp::SpatialPolygonsDataFrame()] object.
1003 1003
#'
1004 -
#' @param n_preallocate \code{integer} How much memory should be preallocated
1004 +
#' @param n_preallocate `integer` How much memory should be preallocated
1005 1005
#'   for processing? Ideally, this number should equal the number of vertices
1006 -
#'   in the \code{\link[sp]{SpatialPolygons}} object. If data processing is
1006 +
#'   in the [sp::SpatialPolygons()] object. If data processing is
1007 1007
#'   taking too long consider increasing this value.
1008 1008
#'
1009 -
#' @return \code{\link[PBSmapping]{PolySet}} object.
1009 +
#' @return [PBSmapping::PolySet()] object.
1010 1010
#'
1011 1011
#' @note Be aware that this function is designed to be as fast as possible, but
1012 1012
#'   as a result it depends on C++ code and if used inappropriately this
1013 1013
#'   function will crash R.
1014 1014
#'
1015 1015
#' @seealso For a slower, more stable equivalent see
1016 -
#'   \code{maptools::SpatialPolygons2PolySet}.
1016 +
#'   `maptools::SpatialPolygons2PolySet`.
1017 1017
#'
1018 1018
#' @examples
1019 1019
#' # generate SpatialPolygons object
@@ -1030,40 +1030,40 @@
Loading
1030 1030
#'
1031 1031
#' This function plots the distribution of species across the study area.
1032 1032
#'
1033 -
#' @param x \code{\link{RapData}}, \code{\link{RapUnsolved}}, or
1034 -
#'   \code{\link{RapSolved}} object.
1033 +
#' @param x [RapData()], [RapUnsolved()], or
1034 +
#'   [RapSolved()] object.
1035 1035
#'
1036 -
#' @param species \code{character} name of species, or \code{integer} index for
1036 +
#' @param species `character` name of species, or `integer` index for
1037 1037
#'   species.
1038 1038
#'
1039 -
#' @param y \code{NULL} \code{integer} 0 to return values for the best
1040 -
#'   solution, \code{integer} value greater than 0 for \code{y}'th solution
1039 +
#' @param y `NULL` `integer` 0 to return values for the best
1040 +
#'   solution, `integer` value greater than 0 for `y`'th solution
1041 1041
#'   value.
1042 1042
#'
1043 -
#' @param prob.color.palette \code{character} name of color palette to denote
1043 +
#' @param prob.color.palette `character` name of color palette to denote
1044 1044
#'   probability of occupancy of the species in planning units (see
1045 -
#'   \code{\link[RColorBrewer]{brewer.pal}}). Defaults to \code{"YlGnBu"}.
1045 +
#'   [RColorBrewer::brewer.pal()]). Defaults to `"YlGnBu"`.
1046 1046
#'
1047 -
#' @param pu.color.palette \code{character} name of colors or color palette
1048 -
#'   (\code{\link[RColorBrewer]{brewer.pal}}) to indicate planning unit
1049 -
#'   statuses. Defaults to \code{c("grey30", "green", "black", "red")} which
1047 +
#' @param pu.color.palette `character` name of colors or color palette
1048 +
#'   ([RColorBrewer::brewer.pal()]) to indicate planning unit
1049 +
#'   statuses. Defaults to `c("grey30", "green", "black", "red")` which
1050 1050
#'   indicate non selected, selected, locked in, and locked out (respectively).
1051 1051
#'
1052 -
#' @param basemap \code{character} object indicating the type of basemap to use
1053 -
#'   (see \code{\link{basemap}}). Valid options include \code{"none"},
1054 -
#'   \code{"roadmap"}, \code{"mobile"}, \code{"satellite"}, \code{"terrain"},
1055 -
#'   \code{"hybrid"}, \code{"mapmaker-roadmap"}, \code{"mapmaker-hybrid"}.
1056 -
#'   Defaults to \code{"none"}.
1052 +
#' @param basemap `character` object indicating the type of basemap to use
1053 +
#'   (see [basemap()]). Valid options include `"none"`,
1054 +
#'   `"roadmap"`, `"mobile"`, `"satellite"`, `"terrain"`,
1055 +
#'   `"hybrid"`, `"mapmaker-roadmap"`, `"mapmaker-hybrid"`.
1056 +
#'   Defaults to `"none"`.
1057 1057
#'
1058 -
#' @param alpha \code{numeric} value to indicating the transparency level for
1058 +
#' @param alpha `numeric` value to indicating the transparency level for
1059 1059
#'   plotting the planning units.
1060 1060
#'
1061 -
#' @param grayscale \code{logical} should the basemap be gray-scaled?
1061 +
#' @param grayscale `logical` should the basemap be gray-scaled?
1062 1062
#'
1063 -
#' @param main \code{character} title for the plot. Defaults to \code{NULL} and
1063 +
#' @param main `character` title for the plot. Defaults to `NULL` and
1064 1064
#'   a default title is used.
1065 1065
#'
1066 -
#' @param force.reset \code{logical} if basemap data has been cached, should it
1066 +
#' @param force.reset `logical` if basemap data has been cached, should it
1067 1067
#'   be re-downloaded?
1068 1068
#'
1069 1069
#' @param ... not used.
@@ -1088,23 +1088,23 @@
Loading
1088 1088
#' Note that this function only works for attribute spaces with one, two, or
1089 1089
#' three dimensions.
1090 1090
#'
1091 -
#' @param x \code{\link{RapData}}, \code{\link{RapUnsolved}}, or
1092 -
#'   \code{\link{RapSolved}} object.
1091 +
#' @param x [RapData()], [RapUnsolved()], or
1092 +
#'   [RapSolved()] object.
1093 1093
#'
1094 -
#' @param species \code{character} name of species, or \code{integer} index for
1094 +
#' @param species `character` name of species, or `integer` index for
1095 1095
#'   species.
1096 1096
#'
1097 -
#' @param space \code{integer} index of attribute space.
1097 +
#' @param space `integer` index of attribute space.
1098 1098
#'
1099 -
#' @param y \code{integer} number specifying the solution to be plotted. The
1100 -
#'   value \code{0} can be used to plot the best solution.
1099 +
#' @param y `integer` number specifying the solution to be plotted. The
1100 +
#'   value `0` can be used to plot the best solution.
1101 1101
#'
1102 -
#' @param pu.color.palette \code{character} name of colors or color palette
1103 -
#'   (\code{\link[RColorBrewer]{brewer.pal}}) to indicate planning unit
1104 -
#'   statuses. Defaults to \code{c("grey30", "green", "black", "red")} which
1102 +
#' @param pu.color.palette `character` name of colors or color palette
1103 +
#'   ([RColorBrewer::brewer.pal()]) to indicate planning unit
1104 +
#'   statuses. Defaults to `c("grey30", "green", "black", "red")` which
1105 1105
#'   indicate non selected, selected, locked in, and locked out (respectively).
1106 1106
#'
1107 -
#' @param main \code{character} title for the plot. Defaults to \code{NULL} and
1107 +
#' @param main `character` title for the plot. Defaults to `NULL` and
1108 1108
#'   a default title is used.
1109 1109
#'
1110 1110
#' @param ... not used.
@@ -1124,18 +1124,18 @@
Loading
1124 1124
1125 1125
#' Maximum targets
1126 1126
#'
1127 -
#' This function accepts a \code{\link{RapUnsolved}} object and returns a
1128 -
#' \code{data.frame} containing the amount-based and space-based targets for
1127 +
#' This function accepts a [RapUnsolved()] object and returns a
1128 +
#' `data.frame` containing the amount-based and space-based targets for
1129 1129
#' each species and attribute space. These are calculated using a
1130 1130
#' prioritization that contains all the available planning units. Note that the
1131 1131
#' maximum amount-based targets are always 1.
1132 1132
#'
1133 -
#' @param x \code{\link{RapUnsolved}} or \code{\link{RapSolved}} object.
1133 +
#' @param x [RapUnsolved()] or [RapSolved()] object.
1134 1134
#'
1135 -
#' @param verbose \code{logical} should messages be printed during
1136 -
#'   calculations? Defaults to \code{FALSE}.
1135 +
#' @param verbose `logical` should messages be printed during
1136 +
#'   calculations? Defaults to `FALSE`.
1137 1137
#'
1138 -
#' @return \code{data.frame} object.
1138 +
#' @return `data.frame` object.
1139 1139
#'
1140 1140
#' @examples
1141 1141
#' # load RapSolved objects

@@ -5,11 +5,11 @@
Loading
5 5
#'
6 6
#' This class is used to store demand point information.
7 7
#'
8 -
#' @slot coords \code{\link[base]{matrix}} of coordinates for each demand point.
8 +
#' @slot coords [base::matrix()] of coordinates for each demand point.
9 9
#'
10 -
#' @slot weights \code{numeric} weights for each demand point.
10 +
#' @slot weights `numeric` weights for each demand point.
11 11
#'
12 -
#' @seealso \code{\link{DemandPoints}}.
12 +
#' @seealso [DemandPoints()].
13 13
#'
14 14
#' @name DemandPoints-class
15 15
#'
@@ -55,11 +55,11 @@
Loading
55 55
#'
56 56
#' This function creates a new DemandPoints object
57 57
#'
58 -
#' @param coords \code{\link[base]{matrix}} of coordinates for each demand
58 +
#' @param coords [base::matrix()] of coordinates for each demand
59 59
#'   point.
60 -
#' @param weights \code{numeric} weights for each demand point.
60 +
#' @param weights `numeric` weights for each demand point.
61 61
#'
62 -
#' @seealso \code{\link{DemandPoints-class}}.
62 +
#' @seealso [DemandPoints-class].
63 63
#'
64 64
#' @examples
65 65
#' # make demand points
@@ -82,38 +82,38 @@
Loading
82 82
#' This function generates demand points to characterize a distribution of
83 83
#' points.
84 84
#'
85 -
#' @param points \code{\link[base]{matrix}} object containing points.
85 +
#' @param points [base::matrix()] object containing points.
86 86
#'
87 -
#' @param n \code{integer} number of demand points to use for each attribute
88 -
#'   space for each species. Defaults to \code{100L}.
87 +
#' @param n `integer` number of demand points to use for each attribute
88 +
#'   space for each species. Defaults to `100L`.
89 89
#'
90 -
#' @param quantile \code{numeric} quantile to generate demand points within. If
90 +
#' @param quantile `numeric` quantile to generate demand points within. If
91 91
#'   0 then demand points are generated across the full range of values the
92 -
#'   \code{points} intersect. Defaults to \code{0.5}.
92 +
#'   `points` intersect. Defaults to `0.5`.
93 93
#'
94 -
#' @param kernel.method \code{character} name of kernel method to use to
95 -
#'   generate demand points. Defaults to \code{'ks'}.
94 +
#' @param kernel.method `character` name of kernel method to use to
95 +
#'   generate demand points. Defaults to `'ks'`.
96 96
#'
97 97
#' @param ... arguments passed to kernel density estimating functions
98 98
#'
99 -
#' @return \code{\link{DemandPoints}} object.
99 +
#' @return [DemandPoints()] object.
100 100
#'
101 101
#' @details Broadly speaking, demand points are generated by fitting a kernal
102 -
#'   to the input \code{points}. A shape is then fit to the extent of
102 +
#'   to the input `points`. A shape is then fit to the extent of
103 103
#'   the kernal, and then points are randomly generated inside the shape. The
104 104
#'   demand points are generated as random points inside the shape. The weights
105 105
#'   for each demand point are calculated the estimated density of input points
106 -
#'   at the demand point. By supplying 'ks' as an argument to \code{method} in
107 -
#'   \code{kernel.method}, the shape is defined using a minimum convex polygon
108 -
#'   \code{\link[adehabitatHR]{mcp}} and \code{\link[ks]{kde}} is used to fit
106 +
#'   at the demand point. By supplying 'ks' as an argument to `method` in
107 +
#'   `kernel.method`, the shape is defined using a minimum convex polygon
108 +
#'   [adehabitatHR::mcp()] and [ks::kde()] is used to fit
109 109
#'   the kernel. Note this can only be used when the data is low-dimensional (d
110 -
#'   < 3). By supplying \code{"hypervolume"} as an argument to \code{method},
111 -
#'   the \code{\link[hypervolume]{hypervolume}} function is used to create the
110 +
#'   < 3). By supplying `"hypervolume"` as an argument to `method`,
111 +
#'   the [hypervolume::hypervolume()] function is used to create the
112 112
#'   demand points. This method can be used for hyper-dimensional data
113 113
#'   (\eqn{d << 3}).
114 114
#'
115 -
#' @seealso \code{\link[hypervolume]{hypervolume}}, \code{\link[ks]{kde}},
116 -
#'   \code{\link[adehabitatHR]{mcp}}.
115 +
#' @seealso [hypervolume::hypervolume()], [ks::kde()],
116 +
#'   [adehabitatHR::mcp()].
117 117
#'
118 118
#' @examples
119 119
#' # set random number generator seed

@@ -4,22 +4,22 @@
Loading
4 4
#' variation that one set of points captures in a another set of points using
5 5
#' the reliable formulation.
6 6
#'
7 -
#' @param pu.coordinates \code{\link[base]{matrix}} of planning unit
7 +
#' @param pu.coordinates [base::matrix()] of planning unit
8 8
#'   coordinates.
9 9
#'
10 -
#' @param pu.probabilities \code{numeric} vector of planning unit probabilities.
10 +
#' @param pu.probabilities `numeric` vector of planning unit probabilities.
11 11
#'
12 -
#' @param dp.coordinates \code{\link[base]{matrix}} of demand point coordinates.
12 +
#' @param dp.coordinates [base::matrix()] of demand point coordinates.
13 13
#'
14 -
#' @param dp.weights \code{numeric} vector of demand point weights.
14 +
#' @param dp.weights `numeric` vector of demand point weights.
15 15
#'
16 -
#' @param failure.distance \code{numeric} indicating the cost of the failure
16 +
#' @param failure.distance `numeric` indicating the cost of the failure
17 17
#'   planning unit.
18 18
#'
19 -
#' @param maximum.r.level \code{integer} maximum failure (R) level to use for
19 +
#' @param maximum.r.level `integer` maximum failure (R) level to use for
20 20
#'   calculations.
21 21
#'
22 -
#' @return \code{numeric} value indicating the proportion of variation that the
22 +
#' @return `numeric` value indicating the proportion of variation that the
23 23
#'   demand points explain in the planning units
24 24
#'
25 25
#' @examples

@@ -7,7 +7,7 @@
Loading
7 7
#' This class is used to store input parameters for the unreliable RAP problem
8 8
#' formulation.
9 9
#'
10 -
#' @slot BLM \code{numeric} boundary length modifier. Defaults to 0.
10 +
#' @slot BLM `numeric` boundary length modifier. Defaults to 0.
11 11
#'
12 12
#' @name RapUnreliableOpts-class
13 13
#'
@@ -30,11 +30,11 @@
Loading
30 30
#'
31 31
#' This function creates a new RapUnreliableOpts object.
32 32
#'
33 -
#' @param BLM \code{numeric} boundary length modifier. Defaults to 0.
33 +
#' @param BLM `numeric` boundary length modifier. Defaults to 0.
34 34
#'
35 -
#' @return \code{\link{RapUnreliableOpts}} object
35 +
#' @return [RapUnreliableOpts()] object
36 36
#'
37 -
#' @seealso \code{\link{RapUnreliableOpts-class}}.
37 +
#' @seealso [RapUnreliableOpts-class].
38 38
#'
39 39
#' @examples
40 40
#' # create RapUnreliableOpts using defaults

@@ -330,10 +330,10 @@
Loading
330 330
#' Find GDAL installation location.
331 331
#'
332 332
#' @details This function is basically the same as
333 -
#'   \code{gdalUtils:::set_gdalInstallation}, it has addiitonal functionality to
333 +
#'   `gdalUtils:::set_gdalInstallation`, it has addiitonal functionality to
334 334
#'   be compatible with Ubuntu 14.04 Trusty
335 335
#'
336 -
#' @return \code{character} path.
336 +
#' @return `character` path.
337 337
#'
338 338
#' @noRd
339 339
findGdalInstallationPaths <- function(search_path = NULL, rescan = FALSE,
@@ -691,28 +691,28 @@
Loading
691 691
692 692
#' Read RAP results
693 693
#'
694 -
#' This function reads files output from Gurobi and returns a \code{RapResults}
694 +
#' This function reads files output from Gurobi and returns a `RapResults`
695 695
#' object.
696 696
#'
697 -
#' @param opts \code{RapReliableOpts} or \code{RapUnreliableOpts} object
697 +
#' @param opts `RapReliableOpts` or `RapUnreliableOpts` object
698 698
#'
699 -
#' @param data \code{RapData} object
699 +
#' @param data `RapData` object
700 700
#'
701 -
#' @param model.list \code{list} object containing Gurobi model data
701 +
#' @param model.list `list` object containing Gurobi model data
702 702
#'
703 -
#' @param logging.file \code{character} Gurobi log files.
703 +
#' @param logging.file `character` Gurobi log files.
704 704
#'
705 -
#' @param solution.list \code{list} object containing Gurobi solution data.
705 +
#' @param solution.list `list` object containing Gurobi solution data.
706 706
#'
707 -
#' @param verbose \code{logical} print progress messages? Defaults to
708 -
#'   \code{FALSE}.
707 +
#' @param verbose `logical` print progress messages? Defaults to
708 +
#'   `FALSE`.
709 709
#'
710 710
#' @keywords internal
711 711
#'
712 -
#' @return \code{RapResults} object
712 +
#' @return `RapResults` object
713 713
#'
714 -
#' @seealso \code{\link{RapReliableOpts}}, \code{\link{RapUnreliableOpts}},
715 -
#'   \code{\link{RapData}}, \code{\link{RapResults}}.
714 +
#' @seealso [RapReliableOpts()], [RapUnreliableOpts()],
715 +
#'   [RapData()], [RapResults()].
716 716
read.RapResults <- function(opts, data, model.list, logging.file,
717 717
                            solution.list, verbose = FALSE) {
718 718
  x <- rcpp_extract_model_object(opts, inherits(opts, "RapUnreliableOpts"),
@@ -726,16 +726,16 @@
Loading
726 726
#'
727 727
#' This function checks objects to see if they share the same input data.
728 728
#'
729 -
#' @param x \code{RapData}, \code{RapUnsolved}, or \code{RapSolved} object.
729 +
#' @param x `RapData`, `RapUnsolved`, or `RapSolved` object.
730 730
#'
731 -
#' @param y \code{RapData}, \code{RapUnsolved}, or \code{RapSolved} object.
731 +
#' @param y `RapData`, `RapUnsolved`, or `RapSolved` object.
732 732
#'
733 -
#' @return \code{logical} are the objects based on the same data?
733 +
#' @return `logical` are the objects based on the same data?
734 734
#'
735 735
#' @keywords internal
736 736
#'
737 -
#' @seealso \code{\link{RapData-class}}, \code{\link{RapUnsolved-class}},
738 -
#' \code{\link{RapSolved-class}}.
737 +
#' @seealso [RapData-class], [RapUnsolved-class],
738 +
#' [RapSolved-class].
739 739
#'
740 740
#' @name is.comparable
741 741
methods::setGeneric("is.comparable",
@@ -746,22 +746,22 @@
Loading
746 746
#' This function retrieves google map data for planning units. The google map
747 747
#' data is cached to provide fast plotting capabilities.
748 748
#'
749 -
#' @param x \code{RapData}, \code{RapUnsolved}, \code{RapSolved} object.
749 +
#' @param x `RapData`, `RapUnsolved`, `RapSolved` object.
750 750
#'
751 -
#' @param basemap \code{character} type of base map to display. Valid names are
752 -
#'   \code{"roadmap"}, \code{"mobile"}, \code{"satellite"}, \code{"terrain"},
753 -
#'   \code{"hybrid"}, \code{"mapmaker-roadmap"}, \code{"mapmaker-hybrid"}.
751 +
#' @param basemap `character` type of base map to display. Valid names are
752 +
#'   `"roadmap"`, `"mobile"`, `"satellite"`, `"terrain"`,
753 +
#'   `"hybrid"`, `"mapmaker-roadmap"`, `"mapmaker-hybrid"`.
754 754
#'
755 -
#' @param grayscale \code{logical} should base map be gray scale?
755 +
#' @param grayscale `logical` should base map be gray scale?
756 756
#'
757 -
#' @param force.reset \code{logical} ignore data in cache? Setting this as
757 +
#' @param force.reset `logical` ignore data in cache? Setting this as
758 758
#'   ignore will make function slower but may avoid bugs in cache system.
759 759
#'
760 -
#' @return \code{list} with google map data.
760 +
#' @return `list` with google map data.
761 761
#'
762 762
#' @keywords internal
763 763
#'
764 -
#' @seealso \code{\link[RgoogleMaps]{GetMap.bbox}}, \code{\link{plot}}.
764 +
#' @seealso [RgoogleMaps::GetMap.bbox()], [plot()].
765 765
basemap <- function(x, basemap = "hybrid", grayscale = FALSE,
766 766
                    force.reset = FALSE) UseMethod("basemap")
767 767
@@ -769,13 +769,13 @@
Loading
769 769
#'
770 770
#' Tests if hash is cached in Rap object.
771 771
#'
772 -
#' @param x \code{RapData} or \code{RapResults} object
772 +
#' @param x `RapData` or `RapResults` object
773 773
#'
774 -
#' @param name \code{character} hash.
774 +
#' @param name `character` hash.
775 775
#'
776 776
#' @note caches are implemented using environments, the hash is used as the
777 777
#'   name of the object in the environment.
778 -
#' @return \code{logical} Is it cached?
778 +
#' @return `logical` Is it cached?
779 779
#'
780 780
#' @keywords internal
781 781
#'
@@ -787,17 +787,17 @@
Loading
787 787
#'
788 788
#' Getter and setter methods for caches in RapData and RapResults object.
789 789
#'
790 -
#' @param x \code{RapData} or \code{RapResults} object
790 +
#' @param x `RapData` or `RapResults` object
791 791
#'
792 -
#' @param name \code{character} hash.
792 +
#' @param name `character` hash.
793 793
#'
794 -
#' @param y if \code{ANY} this object gets cached with name, else if
795 -
#'   \code{missing} the object hashed at name gets returned.
794 +
#' @param y if `ANY` this object gets cached with name, else if
795 +
#'   `missing` the object hashed at name gets returned.
796 796
#'
797 797
#' @note caches are implemented using environments, the hash is used as the
798 798
#'   name of the object in the environment.
799 799
#'
800 -
#' @return \code{ANY} or \code{NULL} depends on \code{y} argument.
800 +
#' @return `ANY` or `NULL` depends on `y` argument.
801 801
#'
802 802
#' @keywords internal
803 803
#'

@@ -6,11 +6,11 @@
Loading
6 6
#'
7 7
#' This class is used to planning units in an attribute space.
8 8
#'
9 -
#' @slot coords \code{\link[base]{matrix}} coordinates for each point.
9 +
#' @slot coords [base::matrix()] coordinates for each point.
10 10
#'
11 -
#' @slot ids \code{integer} planning unit ids.
11 +
#' @slot ids `integer` planning unit ids.
12 12
#'
13 -
#' @seealso \code{\link{AttributeSpace}}.
13 +
#' @seealso [AttributeSpace()].
14 14
#'
15 15
#' @name PlanningUnitPoints-class
16 16
#'
@@ -44,13 +44,13 @@
Loading
44 44
45 45
#' Create new PlanningUnitPoints object
46 46
#'
47 -
#' This function creates a new \code{PlanningUnitPoints} object.
47 +
#' This function creates a new `PlanningUnitPoints` object.
48 48
#'
49 -
#' @param coords \code{\link[base]{matrix}} coordinates for each point.
49 +
#' @param coords [base::matrix()] coordinates for each point.
50 50
#'
51 -
#' @param ids \code{integer} planning unit ids.
51 +
#' @param ids `integer` planning unit ids.
52 52
#'
53 -
#' @seealso \code{\link{AttributeSpace-class}}.
53 +
#' @seealso [AttributeSpace-class].
54 54
#'
55 55
#' @examples
56 56
#' # create PlanningUnitPoints object

@@ -4,15 +4,15 @@
Loading
4 4
#' variation that one set of points captures in a another set of points using
5 5
#' the unreliable formulation.
6 6
#'
7 -
#' @param x \code{\link[base]{matrix}} of points
7 +
#' @param x [base::matrix()] of points
8 8
#'
9 -
#' @param y \code{\link[base]{matrix}} of points
9 +
#' @param y [base::matrix()] of points
10 10
#'
11 -
#' @param y.weights \code{numeric} vector of weights for each point in
12 -
#'   \code{y}. Defaults to equal weights for all points in \code{y}.
11 +
#' @param y.weights `numeric` vector of weights for each point in
12 +
#'   `y`. Defaults to equal weights for all points in `y`.
13 13
#'
14 -
#' @return \code{numeric} value indicating the proportion of variation that
15 -
#'   \code{x} explains in \code{y}
14 +
#' @return `numeric` value indicating the proportion of variation that
15 +
#'   `x` explains in `y`
16 16
#'
17 17
#' @examples
18 18
#' urap.proportion.held(as.matrix(iris[1:2,-5]), as.matrix(iris[1:5,-5]))

@@ -6,16 +6,16 @@
Loading
6 6
#' This class is used to store planning unit points and demand points for a
7 7
#' single species in an attribute space.
8 8
#'
9 -
#' @slot planning.unit.points \code{\link{PlanningUnitPoints}} for planning
9 +
#' @slot planning.unit.points [PlanningUnitPoints()] for planning
10 10
#'   unit in the space.
11 11
#'
12 -
#' @slot demand.points \code{\link{DemandPoints}} object for the space.
12 +
#' @slot demand.points [DemandPoints()] object for the space.
13 13
#'
14 -
#' @slot species \code{integer} species id to indicate which species the space
14 +
#' @slot species `integer` species id to indicate which species the space
15 15
#'   is associated with.
16 16
#'
17 -
#' @seealso \code{\link{DemandPoints-class}},
18 -
#'   \code{\link{PlanningUnitPoints-class}}.
17 +
#' @seealso [DemandPoints-class],
18 +
#'   [PlanningUnitPoints-class].
19 19
#'
20 20
#' @name AttributeSpace-class
21 21
#'
@@ -44,18 +44,18 @@
Loading
44 44
45 45
#' Create new AttributeSpace object
46 46
#'
47 -
#' This function creates a new \code{AttributeSpace} object.
47 +
#' This function creates a new `AttributeSpace` object.
48 48
#'
49 -
#' @param planning.unit.points \code{\link{PlanningUnitPoints}} for planning
49 +
#' @param planning.unit.points [PlanningUnitPoints()] for planning
50 50
#'   unit in the space.
51 51
#'
52 -
#' @param demand.points \code{\link{DemandPoints}} object for the space.
52 +
#' @param demand.points [DemandPoints()] object for the space.
53 53
#'
54 -
#' @param species \code{integer} species id to indicate which species the space
54 +
#' @param species `integer` species id to indicate which species the space
55 55
#'   is associated with.
56 56
#'
57 -
#' @seealso \code{\link{DemandPoints-class}},
58 -
#'   \code{\link{PlanningUnitPoints-class}}.
57 +
#' @seealso [DemandPoints-class],
58 +
#'   [PlanningUnitPoints-class].
59 59
#'
60 60
#' @examples
61 61
#' space <- AttributeSpace(

@@ -4,32 +4,32 @@
Loading
4 4
#' Calculate boundary data for planning units
5 5
#'
6 6
#' This function calculates boundary length data for
7 -
#' \code{\link[PBSmapping]{PolySet}}, \code{\link[sp]{SpatialPolygons}}, and
8 -
#' \code{\link[sp]{SpatialPolygonsDataFrame}} objects. Be aware that this
7 +
#' [PBSmapping::PolySet()], [sp::SpatialPolygons()], and
8 +
#' [sp::SpatialPolygonsDataFrame()] objects. Be aware that this
9 9
#' function is designed with performance in mind, and as a consequence, if this
10 10
#' function is used improperly then it may crash R. Furthermore, multipart
11 11
#' polygons with touching edges will likely result in inaccuracies.
12 -
#' If argument set to \code{\link[sp]{SpatialPolygons}} or
13 -
#' \code{\link[sp]{SpatialPolygonsDataFrame}}, this will be converted to
12 +
#' If argument set to [sp::SpatialPolygons()] or
13 +
#' [sp::SpatialPolygonsDataFrame()], this will be converted to
14 14
#' PolySet before processing.
15 15
#'
16 -
#' @param x \code{\link[PBSmapping]{PolySet}},
17 -
#'   \code{\link[sp]{SpatialPolygons}} or
18 -
#'   \code{\link[sp]{SpatialPolygonsDataFrame}} object.
16 +
#' @param x [PBSmapping::PolySet()],
17 +
#'   [sp::SpatialPolygons()] or
18 +
#'   [sp::SpatialPolygonsDataFrame()] object.
19 19
#'
20 -
#' @param tol \code{numeric} to specify precision of calculations. In other
20 +
#' @param tol `numeric` to specify precision of calculations. In other
21 21
#'   words, how far apart vertices have to be to be considered different?
22 22
#'
23 -
#' @param length.factor \code{numeric} to scale boundary lengths.
23 +
#' @param length.factor `numeric` to scale boundary lengths.
24 24
#'
25 -
#' @param edge.factor \code{numeric} to scale boundary lengths for edges that
25 +
#' @param edge.factor `numeric` to scale boundary lengths for edges that
26 26
#'   do not have any neighbors, such as those that occur along the margins.
27 27
#'
28 -
#' @return \code{data.frame} with 'id1' (\code{integer}), 'id2'
29 -
#'   (\code{integer}), and 'amount' (\code{numeric}) columns.
28 +
#' @return `data.frame` with 'id1' (`integer`), 'id2'
29 +
#'   (`integer`), and 'amount' (`numeric`) columns.
30 30
#'
31 31
#' @seealso This function is based on the algorithm in QMARXAN
32 -
#'   \url{https://github.com/tsw-apropos/qmarxan} for calculating boundary
32 +
#'   <https://github.com/tsw-apropos/qmarxan> for calculating boundary
33 33
#'   length.
34 34
#'
35 35
#' @examples
@@ -50,8 +50,6 @@
Loading
50 50
#'
51 51
#' @method calcBoundaryData PolySet
52 52
#'
53 -
#' @inheritParams calcBoundaryData
54 -
#'
55 53
#' @export
56 54
calcBoundaryData.PolySet <- function(x, tol = 0.001, length.factor = 1.0,
57 55
                                     edge.factor = 1.0) {
@@ -72,8 +70,6 @@
Loading
72 70
#'
73 71
#' @method calcBoundaryData SpatialPolygons
74 72
#'
75 -
#' @inheritParams calcBoundaryData
76 -
#'
77 73
#' @export
78 74
calcBoundaryData.SpatialPolygons <- function(x, tol = 0.001,
79 75
                                             length.factor = 1.0,

@@ -5,24 +5,24 @@
Loading
5 5
#'
6 6
#' This function simulates planning units for RAP.
7 7
#'
8 -
#' @param n \code{integer} number of planning units. \code{sqrt(n)} must yield
8 +
#' @param n `integer` number of planning units. `sqrt(n)` must yield
9 9
#'   a valid number.
10 10
#'
11 -
#' @param xmn \code{numeric} value for minimum x-coordinate.
11 +
#' @param xmn `numeric` value for minimum x-coordinate.
12 12
#'
13 -
#' @param xmx \code{numeric} value for maximum x-coordinate.
13 +
#' @param xmx `numeric` value for maximum x-coordinate.
14 14
#'
15 -
#' @param ymn \code{numeric} value for minimum y-coordinate.
15 +
#' @param ymn `numeric` value for minimum y-coordinate.
16 16
#'
17 -
#' @param ymx \code{numeric} value for maximum y-coordinate.
17 +
#' @param ymx `numeric` value for maximum y-coordinate.
18 18
#'
19 -
#' @return \code{\link[sp]{SpatialPolygons}} with planning units.
19 +
#' @return [sp::SpatialPolygons()] with planning units.
20 20
#'
21 21
#' @details Square planning units are generated in the shape of a square.
22 22
#'   Default coordinate arguments are such that the planning units will be
23 -
#'   centered at origin. The data slot contains an "id" (\code{integer}),
24 -
#'   "cost" (\code{numeric}), "status" (\code{integer}), and "area"
25 -
#'   (\code{numeric}).
23 +
#'   centered at origin. The data slot contains an "id" (`integer`),
24 +
#'   "cost" (`numeric`), "status" (`integer`), and "area"
25 +
#'   (`numeric`).
26 26
#'
27 27
#' @examples
28 28
#' # generate 225 sqauare planning units arranged in a square

@@ -6,9 +6,9 @@
Loading
6 6
#'
7 7
#' This class is used to store parameters.
8 8
#'
9 -
#' @slot NumberSolutions \code{integer} number of solutions.
9 +
#' @slot NumberSolutions `integer` number of solutions.
10 10
#'
11 -
#' @seealso \code{\link{ManualOpts}}.
11 +
#' @seealso [ManualOpts()].
12 12
#'
13 13
#' @name ManualOpts-class
14 14
#'
@@ -31,12 +31,12 @@
Loading
31 31
#'
32 32
#' This function creates a new ManualOpts object.
33 33
#'
34 -
#' @param NumberSolutions \code{integer} number of solutions to generate.
34 +
#' @param NumberSolutions `integer` number of solutions to generate.
35 35
#'   Defaults to 1L.
36 36
#'
37 -
#' @return \code{\link{ManualOpts}} object
37 +
#' @return [ManualOpts()] object
38 38
#'
39 -
#' @seealso \code{\link{ManualOpts-class}}.
39 +
#' @seealso [ManualOpts-class].
40 40
#'
41 41
#' @examples
42 42
#' # create ManualOpts object

@@ -5,37 +5,37 @@
Loading
5 5
#'
6 6
#' This class is used to store RAP input data.
7 7
#'
8 -
#' @slot polygons \code{\link[PBSmapping]{PolySet}} planning unit spatial data
9 -
#'   or \code{NULL} if data not available.
8 +
#' @slot polygons [PBSmapping::PolySet()] planning unit spatial data
9 +
#'   or `NULL` if data not available.
10 10
#'
11 -
#' @slot pu \code{\link[base]{data.frame}} planning unit data. Columns must be
12 -
#'   "cost" (\code{numeric}), "area" (\code{numeric}), and "status"
13 -
#'   (\code{integer}).
11 +
#' @slot pu [base::data.frame()] planning unit data. Columns must be
12 +
#'   "cost" (`numeric`), "area" (`numeric`), and "status"
13 +
#'   (`integer`).
14 14
#'
15 -
#' @slot species \code{\link[base]{data.frame}} with species data. Columns must
16 -
#'   be "name" (\code{character}.
15 +
#' @slot species [base::data.frame()] with species data. Columns must
16 +
#'   be "name" (`character`.
17 17
#'
18 -
#' @slot targets \code{\link[base]{data.frame}} with species data. Columns must
19 -
#'   be "species" (\code{integer}), "target" (\code{integer}), "proportion"
20 -
#'   (\code{numeric}).
18 +
#' @slot targets [base::data.frame()] with species data. Columns must
19 +
#'   be "species" (`integer`), "target" (`integer`), "proportion"
20 +
#'   (`numeric`).
21 21
#'
22 -
#' @slot pu.species.probabilities \code{\link[base]{data.frame}} with data on
22 +
#' @slot pu.species.probabilities [base::data.frame()] with data on
23 23
#'   the probability of species in each planning unit. Columns must be "species"
24 -
#'   (\code{integer}), "pu" (\code{integer}), and "value" (\code{numeric}).
24 +
#'   (`integer`), "pu" (`integer`), and "value" (`numeric`).
25 25
#'
26 -
#' @slot attribute.spaces \code{list} of \code{AttributeSpaces} objects with
26 +
#' @slot attribute.spaces `list` of `AttributeSpaces` objects with
27 27
#'   the demand points and planning unit coordinates.
28 28
#'
29 -
#' @slot boundary \code{\link[base]{data.frame}} with data on the shared
30 -
#'   boundary length of planning units. Columns must be "id1" (\code{integer}),
31 -
#'   "id2" (\code{integer}), and "boundary" (\code{numeric}).
29 +
#' @slot boundary [base::data.frame()] with data on the shared
30 +
#'   boundary length of planning units. Columns must be "id1" (`integer`),
31 +
#'   "id2" (`integer`), and "boundary" (`numeric`).
32 32
#'
33 -
#' @slot skipchecks \code{logical} Skip data integrity checks? May improve
33 +
#' @slot skipchecks `logical` Skip data integrity checks? May improve
34 34
#'   speed for big data sets.
35 35
#'
36 -
#' @slot .cache \code{\link[base]{environment}} used to cache calculations.
36 +
#' @slot .cache [base::environment()] used to cache calculations.
37 37
#'
38 -
#' @seealso \code{\link[PBSmapping]{PolySet}}.
38 +
#' @seealso [PBSmapping::PolySet()].
39 39
#'
40 40
#' @name RapData-class
41 41
#'
@@ -237,45 +237,45 @@
Loading
237 237
#'
238 238
#' This function creates a "RapData" object using pre-processed data.
239 239
#'
240 -
#' @param polygons \code{\link[PBSmapping]{PolySet}} planning unit spatial data
241 -
#'   or \code{NULL} if data not available.
240 +
#' @param polygons [PBSmapping::PolySet()] planning unit spatial data
241 +
#'   or `NULL` if data not available.
242 242
#'
243 -
#' @param pu \code{\link[base]{data.frame}} planning unit data. Columns must be
244 -
#'   "cost" (\code{numeric}), "area" (\code{numeric}), and "status"
245 -
#'   (\code{integer}).
243 +
#' @param pu [base::data.frame()] planning unit data. Columns must be
244 +
#'   "cost" (`numeric`), "area" (`numeric`), and "status"
245 +
#'   (`integer`).
246 246
#'
247 -
#' @param species \code{\link[base]{data.frame}} with species data. Columns
248 -
#'   must be "name" (\code{character}).
247 +
#' @param species [base::data.frame()] with species data. Columns
248 +
#'   must be "name" (`character`).
249 249
#'
250 -
#' @param targets \code{\link[base]{data.frame}} with species data.
251 -
#'   Columns must be "species" (\code{integer}), "target" (\code{integer}),
252 -
#'   "proportion" (\code{numeric}).
250 +
#' @param targets [base::data.frame()] with species data.
251 +
#'   Columns must be "species" (`integer`), "target" (`integer`),
252 +
#'   "proportion" (`numeric`).
253 253
#'
254 -
#' @param pu.species.probabilities \code{\link[base]{data.frame}} with data on
254 +
#' @param pu.species.probabilities [base::data.frame()] with data on
255 255
#'   the probability of species in each planning unit. Columns must be
256 -
#'   "species", (\code{integer}), "pu" (\code{integer}), and "value"
257 -
#'   (\code{numeric}).
256 +
#'   "species", (`integer`), "pu" (`integer`), and "value"
257 +
#'   (`numeric`).
258 258
#'
259 -
#' @param attribute.spaces \code{list} of \code{\link{AttributeSpaces}} objects
259 +
#' @param attribute.spaces `list` of [AttributeSpaces()] objects
260 260
#'   with the demand points and planning unit coordinates.
261 261
#'
262 -
#' @param boundary \code{\link[base]{data.frame}} with data on the shared
262 +
#' @param boundary [base::data.frame()] with data on the shared
263 263
#'   boundary length of planning units. Columns must be "id1"
264 -
#'   (\code{integer}), "id2" (\code{integer}), and "boundary" (\code{integer}).
264 +
#'   (`integer`), "id2" (`integer`), and "boundary" (`integer`).
265 265
#'
266 -
#' @param skipchecks \code{logical} Skip data integrity checks? May improve
266 +
#' @param skipchecks `logical` Skip data integrity checks? May improve
267 267
#'   speed for big data sets.
268 268
#'
269 -
#' @param .cache \code{\link[base]{environment}} used to cache calculations.
269 +
#' @param .cache [base::environment()] used to cache calculations.
270 270
#'
271 271
#' @note Generally, users are not encouraged to change arguments to
272 -
#'   \code{.cache}.
272 +
#'   `.cache`.
273 273
#'
274 274
#' @return RapData object
275 275
#'
276 -
#' @seealso \code{\link[PBSmapping]{PolySet}}, \code{\link[sp]{SpatialPoints}},
277 -
#'   \code{\link[sp]{SpatialPointsDataFrame}}, \code{\link{make.RapData}},
278 -
#'   \code{\link{RapData-class}}.
276 +
#' @seealso [PBSmapping::PolySet()], [sp::SpatialPoints()],
277 +
#'   [sp::SpatialPointsDataFrame()], [make.RapData()],
278 +
#'   [RapData-class].
279 279
#'
280 280
#' @examples
281 281
#' # load data
@@ -359,55 +359,55 @@
Loading
359 359
#' This function prepares spatially explicit planning unit, species data, and
360 360
#' landscape data layers for RAP processing.
361 361
#'
362 -
#' @param pus \code{\link[sp]{SpatialPolygons}} with planning unit data.
362 +
#' @param pus [sp::SpatialPolygons()] with planning unit data.
363 363
#'
364 -
#' @param species \code{\link[raster]{raster}} with species probability
364 +
#' @param species [raster::raster()] with species probability
365 365
#'   distribution data.
366 366
#'
367 -
#' @param spaces \code{list} of/or \code{\link[raster]{raster}} representing
368 -
#'   projects of attribute space over geographic space. Use a \code{list} to
367 +
#' @param spaces `list` of/or [raster::raster()] representing
368 +
#'   projects of attribute space over geographic space. Use a `list` to
369 369
#'   denote separate attribute spaces.
370 370
#'
371 -
#' @param amount.target \code{numeric} vector for area targets (\%) for each
371 +
#' @param amount.target `numeric` vector for area targets (%) for each
372 372
#'   species. Defaults to 0.2 for each attribute space for each species.
373 373
#'
374 -
#' @param space.target \code{numeric} vector for attribute space targets (\%)
374 +
#' @param space.target `numeric` vector for attribute space targets (%)
375 375
#'   for each species. Defaults to 0.2 for each attribute space for each
376 376
#'   species and each space.
377 377
#'
378 -
#' @param n.demand.points \code{integer} number of demand points to use for
378 +
#' @param n.demand.points `integer` number of demand points to use for
379 379
#'   each attribute space for each species. Defaults to 100L.
380 380
#'
381 -
#' @param kernel.method \code{character} name of kernel method to use to
382 -
#'   generate demand points. Use either \code{"ks"} or \code{"hypervolume"}.
381 +
#' @param kernel.method `character` name of kernel method to use to
382 +
#'   generate demand points. Use either `"ks"` or `"hypervolume"`.
383 383
#'
384 -
#' @param quantile \code{numeric} quantile to generate demand points within. If
384 +
#' @param quantile `numeric` quantile to generate demand points within. If
385 385
#    0 then demand points are generated across the full range of values the
386 -
#'   \code{species.points} intersect. Defaults to 0.5.
386 +
#'   `species.points` intersect. Defaults to 0.5.
387 387
#'
388 -
#' @param include.geographic.space \code{logical} should the geographic space
388 +
#' @param include.geographic.space `logical` should the geographic space
389 389
#'   be considered an attribute space?
390 390
#'
391 -
#' @param species.points \code{list} of/or
392 -
#'   \code{\link[sp]{SpatialPointsDataFrame}} or
393 -
#'   \code{\link[sp]{SpatialPoints}} with species presence records. Use a
394 -
#'   \code{list} of objects to represent different species. Must have the same
395 -
#'   number of elements as \code{species}. If not supplied then use
396 -
#'   \code{n.species.points} to sample points from the species distributions.
391 +
#' @param species.points `list` of/or
392 +
#'   [sp::SpatialPointsDataFrame()] or
393 +
#'   [sp::SpatialPoints()] with species presence records. Use a
394 +
#'   `list` of objects to represent different species. Must have the same
395 +
#'   number of elements as `species`. If not supplied then use
396 +
#'   `n.species.points` to sample points from the species distributions.
397 397
#'
398 -
#' @param n.species.points \code{numeric} vector specifying the number points
398 +
#' @param n.species.points `numeric` vector specifying the number points
399 399
#'   to sample the species distributions to use to generate demand points.
400 -
#'   Defaults to 20\% of the distribution.
400 +
#'   Defaults to 20% of the distribution.
401 401
#'
402 -
#' @param verbose \code{logical} print statements during processing?
402 +
#' @param verbose `logical` print statements during processing?
403 403
#'
404 -
#' @param scale \code{logical} scale the attribute spaces to unit mean and
405 -
#'   standard deviation? This prevents overflow. Defaults to \code{TRUE}.
404 +
#' @param scale `logical` scale the attribute spaces to unit mean and
405 +
#'   standard deviation? This prevents overflow. Defaults to `TRUE`.
406 406
#'
407 -
#' @param ... additional arguments to \code{\link{calcBoundaryData}} and
408 -
#'   \code{\link{calcSpeciesAverageInPus}}.
407 +
#' @param ... additional arguments to [calcBoundaryData()] and
408 +
#'   [calcSpeciesAverageInPus()].
409 409
#'
410 -
#' @seealso \code{\link{RapData-class}}, \code{\link{RapData}}.
410 +
#' @seealso [RapData-class], [RapData()].
411 411
#'
412 412
#' @examples
413 413
#' # load data

@@ -6,36 +6,36 @@
Loading
6 6
#' This is a general function to create Rap objects from scratch and solve them
7 7
#' to generate solutions.
8 8
#'
9 -
#' @param pus \code{\link[sp]{SpatialPolygons}} object representing planning
9 +
#' @param pus [sp::SpatialPolygons()] object representing planning
10 10
#'   units.
11 11
#'
12 -
#' @param species \code{\link[raster]{raster}} object with species distribution
12 +
#' @param species [raster::raster()] object with species distribution
13 13
#'   data.
14 14
#'
15 -
#' @param spaces \code{list} of \code{\link[raster]{raster}} objects. Each
15 +
#' @param spaces `list` of [raster::raster()] objects. Each
16 16
#'   elements denotes the spatial distribution for each space. Defaults to
17 -
#'   \code{NULL}.
17 +
#'   `NULL`.
18 18
#'
19 -
#' @param formulation \code{character} to indicate if the \code{"unreliable"} or
20 -
#'   \code{"reliable"} formulation should be used to generate prioritizations.
21 -
#'   Defaults to \code{"unreliable"}.
19 +
#' @param formulation `character` to indicate if the `"unreliable"` or
20 +
#'   `"reliable"` formulation should be used to generate prioritizations.
21 +
#'   Defaults to `"unreliable"`.
22 22
#'
23 -
#' @param solve \code{logical} should solutions be generated?
23 +
#' @param solve `logical` should solutions be generated?
24 24
#'
25 -
#' @param ... arguments are passed to \code{\link{GurobiOpts}},
26 -
#'   \code{\link{make.RapData}}, and \code{\link{RapReliableOpts}} or
27 -
#'   \code{\link{RapUnreliableOpts}} functions.
25 +
#' @param ... arguments are passed to [GurobiOpts()],
26 +
#'   [make.RapData()], and [RapReliableOpts()] or
27 +
#'   [RapUnreliableOpts()] functions.
28 28
#'
29 -
#' @note Type \code{vignette("raptr")} to see the package vignette for a
29 +
#' @note Type `vignette("raptr")` to see the package vignette for a
30 30
#'   tutorial.
31 31
#'
32 -
#' @return \code{\link{RapSolved}} object if \code{solve} is \code{TRUE},
33 -
#'  otherwise an \code{\link{RapUnsolved}} is returned.
32 +
#' @return [RapSolved()] object if `solve` is `TRUE`,
33 +
#'  otherwise an [RapUnsolved()] is returned.
34 34
#'
35 -
#' @seealso \code{\link{GurobiOpts}}, \code{\link{RapReliableOpts}},
36 -
#'   \code{\link{RapUnreliableOpts}} \code{\link{RapData}},
37 -
#'   \code{\link{RapResults}}, \code{\link{RapUnsolved}},
38 -
#'   \code{\link{RapSolved}}.
35 +
#' @seealso [GurobiOpts()], [RapReliableOpts()],
36 +
#'   [RapUnreliableOpts()] [RapData()],
37 +
#'   [RapResults()], [RapUnsolved()],
38 +
#'   [RapSolved()].
39 39
#'
40 40
#' @export
41 41
rap <- function(pus, species, spaces = NULL,

@@ -7,12 +7,12 @@
Loading
7 7
#' This class is used to store a collection of attribute spaces for different
8 8
#' species.
9 9
#'
10 -
#' @slot spaces \code{list} of \code{\link{AttributeSpace}} objects for
10 +
#' @slot spaces `list` of [AttributeSpace()] objects for
11 11
#'   different species.
12 12
#'
13 -
#' @slot name \code{character} name to identify the attribute space.
13 +
#' @slot name `character` name to identify the attribute space.
14 14
#'
15 -
#' @seealso \code{\link{AttributeSpace-class}}.
15 +
#' @seealso [AttributeSpace-class].
16 16
#'
17 17
#' @name AttributeSpaces-class
18 18
#'
@@ -39,14 +39,14 @@
Loading
39 39
40 40
#' Create new AttributeSpaces object
41 41
#'
42 -
#' This function creates a new \code{AttributeSpaces} object.
42 +
#' This function creates a new `AttributeSpaces` object.
43 43
#'
44 -
#' @param spaces \code{list} of \code{\link{AttributeSpace}} objects for
44 +
#' @param spaces `list` of [AttributeSpace()] objects for
45 45
#'   different species.
46 46
#'
47 -
#' @param name \code{character} name to identify the attribute space.
47 +
#' @param name `character` name to identify the attribute space.
48 48
#'
49 -
#' @seealso \code{\link{AttributeSpace-class}}.
49 +
#' @seealso [AttributeSpace-class].
50 50
#'
51 51
#' @examples
52 52
#' space1 <- AttributeSpace(

@@ -4,13 +4,13 @@
Loading
4 4
#' Test if Gurobi is installed
5 5
#'
6 6
#' This function determines if the Gurobi R package is installed on the
7 -
#' computer and that it can be used \code{\link[base]{options}}.
7 +
#' computer and that it can be used [base::options()].
8 8
#'
9 -
#' @param verbose \code{logical} should messages be printed?
9 +
#' @param verbose `logical` should messages be printed?
10 10
#'
11 -
#' @return \code{logical} Is it installed and ready to use?
11 +
#' @return `logical` Is it installed and ready to use?
12 12
#'
13 -
#' @seealso \code{\link[base]{options}}.
13 +
#' @seealso [base::options()].
14 14
#'
15 15
#' @examples
16 16
#' \donttest{
@@ -71,11 +71,11 @@
Loading
71 71
#' Test if GDAL is installed on computer
72 72
#'
73 73
#' This function tests if GDAL is installed on the computer.
74 -
#' If not, download it here: \url{http://download.osgeo.org/gdal}.
74 +
#' If not, download it here: <http://download.osgeo.org/gdal>.
75 75
#'
76 -
#' @return \code{logical} is GDAL installed?
76 +
#' @return `logical` is GDAL installed?
77 77
#'
78 -
#' @seealso \code{\link[gdalUtils]{gdal_setInstallation}}.
78 +
#' @seealso [gdalUtils::gdal_setInstallation()].
79 79
#'
80 80
#' @examples
81 81
#' # check if gdal is installed on system
@@ -91,24 +91,24 @@
Loading
91 91
92 92
#' Rasterize polygon data using GDAL
93 93
#'
94 -
#' This function converts a \code{SpatialPolygonsDataFrame} to a
95 -
#' \code{RasterLayer} using GDAL. It is expected to be faster than
96 -
#' \code{\link[raster]{rasterize}} for large datasets. However, it will be
94 +
#' This function converts a `SpatialPolygonsDataFrame` to a
95 +
#' `RasterLayer` using GDAL. It is expected to be faster than
96 +
#' [raster::rasterize()] for large datasets. However, it will be
97 97
#' significantly slower for small datasets because the data will need to be
98 98
#' written and read from disk.
99 99
#'
100 -
#' @param x \code{\link[sp]{SpatialPolygonsDataFrame}} object.
100 +
#' @param x [sp::SpatialPolygonsDataFrame()] object.
101 101
#'
102 -
#' @param y \code{\link[raster]{raster}} with dimensions, extent, and
102 +
#' @param y [raster::raster()] with dimensions, extent, and
103 103
#'   resolution to be used as a template for new raster.
104 104
#'
105 -
#' @param field \code{character} column name with values to burn into the
105 +
#' @param field `character` column name with values to burn into the
106 106
#'   output raster. If not supplied, default behaviour is to burn polygon
107 -
#'   indices into the \code{\link[raster]{raster}}.
107 +
#'   indices into the [raster::raster()].
108 108
#'
109 -
#' @return \code{RasterLayer} object.
109 +
#' @return `RasterLayer` object.
110 110
#'
111 -
#' @seealso \code{\link[raster]{rasterize}}, \code{\link{is.gdalInstalled}}.
111 +
#' @seealso [raster::rasterize()], [is.gdalInstalled()].
112 112
#'
113 113
#' @examples
114 114
#' \donttest{
@@ -149,10 +149,10 @@
Loading
149 149
#' This functions creates a blank raster based on the spatial extent of a
150 150
#' Spatial object.
151 151
#'
152 -
#' @param x \code{\link[sp]{Spatial-class}} object.
152 +
#' @param x [sp::Spatial-class] object.
153 153
#'
154 -
#' @param res \code{numeric vector} specifying resolution of the output raster
155 -
#'   in the x and y dimensions. If \code{vector} is of length one, then the
154 +
#' @param res `numeric` `vector` specifying resolution of the output raster
155 +
#'   in the x and y dimensions. If `vector` is of length one, then the
156 156
#'   pixels are assumed to be square.
157 157
#'
158 158
#' @examples
@@ -199,7 +199,7 @@
Loading
199 199
#'
200 200
#' Object contains PolySet data.
201 201
#'
202 -
#' @seealso \code{\link[PBSmapping]{PolySet}}.
202 +
#' @seealso [PBSmapping::PolySet()].
203 203
#'
204 204
#' @name PolySet-class
205 205
#'
@@ -210,8 +210,8 @@
Loading
210 210
211 211
#' RapOpts class
212 212
#'
213 -
#' Object is either \code{\link{RapReliableOpts}} or
214 -
#' \code{\link{RapUnreliableOpts}}.
213 +
#' Object is either [RapReliableOpts()] or
214 +
#' [RapUnreliableOpts()].
215 215
#'
216 216
#' @name RapOpts-class
217 217
#'
@@ -228,7 +228,7 @@
Loading
228 228
#'
229 229
#' @name SolverOpts-class
230 230
#'
231 -
#' @seealso \code{\link{GurobiOpts}}.
231 +
#' @seealso [GurobiOpts()].
232 232
#'
233 233
#' @aliases SolverOpts
234 234
#'
@@ -237,20 +237,20 @@
Loading
237 237
238 238
#' Sample random points from a RasterLayer
239 239
#'
240 -
#' This function generates random points in a \code{\link[raster]{raster}}
240 +
#' This function generates random points in a [raster::raster()]
241 241
#' object.
242 242
#'
243 -
#' @param mask \code{\link[raster]{raster}} object
243 +
#' @param mask [raster::raster()] object
244 244
#'
245 -
#' @param n \code{integer} number of points to sample
245 +
#' @param n `integer` number of points to sample
246 246
#'
247 -
#' @param prob \code{logical} should the raster values be used as weights?
248 -
#'   Defaults to \code{FALSE}.
247 +
#' @param prob `logical` should the raster values be used as weights?
248 +
#'   Defaults to `FALSE`.
249 249
#'
250 -
#' @return \code{\link[base]{matrix}} with x-coordinates, y-coordinates, and
250 +
#' @return [base::matrix()] with x-coordinates, y-coordinates, and
251 251
#'   cell values.
252 252
#'
253 -
#' @seealso This function is similar to \code{dismo::randomPoints}.
253 +
#' @seealso This function is similar to `dismo::randomPoints`.
254 254
#'
255 255
#' @examples
256 256
#' # simulate data
Files Coverage
R 71.53%
src 84.42%
Project Totals (41 files) 76.38%
Sunburst
The inner-most circle is the entire project, moving away from the center are folders then, finally, a single file. The size and color of each slice is representing the number of statements and the coverage, respectively.
Icicle
The top section represents the entire project. Proceeding with folders and finally individual files. The size and color of each slice is representing the number of statements and the coverage, respectively.