plot.sim_results {rangr} | R Documentation |
Plot sim_results
Object
Description
Plots abundances obtained during simulation.
Usage
## S3 method for class 'sim_results'
plot(x, template = NULL, time_points = NULL, range, type, ...)
Arguments
x |
|
template |
|
time_points |
numeric vector; specifies points in time from which plots will be generated |
range |
numeric vector of length 2; range of values to be used for the
legend (if |
type |
character vector of length 1; type of map: "continuous" (default), "classes" or "interval" (case-sensitive) |
... |
further arguments passed to |
Value
SpatRaster
object with as many layers
as the length of time_points
parameter
Examples
library(terra)
n1_small <- rast(system.file("input_maps/n1_small.tif", package = "rangr"))
K_small <- rast(system.file("input_maps/K_small.tif", package = "rangr"))
sim_data <- initialise(
n1_map = n1_small,
K_map = K_small,
r = log(2),
rate = 1 / 1e3
)
sim_res <- sim(sim_data, time = 10)
plot(sim_res)
plot(sim_res, template = n1_small, time_points = c(1, 10))
# plot specific area
plot(sim_res, xlim = c(4, 10), ylim = c(0, 10))
plot(sim_res, ext = c(4, 10, 0, 10))
plot(sim_res, template = n1_small, ext = c(274000, 280000, 610000, 620000))
[Package rangr version 1.0.7 Index]