tag_set_map | R Documentation |
map
of a tag
objectThis function adds to tag
the parameters defining the 3D grid of the map. The spatial
parameters (extent
and scale
) define the geographical dimensions of the map, and the
temporal dimension is defined based on the stationary periods built using the labels.
include_stap_id
and include_min_duration
can be used to limit which stationary periods are
computed and modelled in the analysis. By default, all stationary periods are included.
In addition, tag
offers the possibility to define known
locations (e.g., equipment or
retrieval site). These can only be defined at the level of a stationary period (i.e., assuming
constant position during the whole stationary period) but you can define as many known stationary
periods as you wish. Because the index of the last stationary period is generally unknown, you
can use negative indexing in known
, i.e., known$stap_id = -1
will be converted to
nrow(tag$stap)
.
By default, no likelihood map will be computed for these stationary periods and the trajectory
model will be more constrained, saving significant computational time. You can change this
using the compute_known
parameter in geopressure_map()
.
tag_set_map(
tag,
extent,
scale = 10,
known = data.frame(stap_id = integer(), known_lat = double(), known_lon = double()),
include_stap_id = NULL,
include_min_duration = 0
)
tag |
a GeoPressureR |
extent |
geographical extent of the map on which the likelihood and graph model will be
computed. Vector of length 4 |
scale |
number of pixels per 1° latitude-longitude. For instance, |
known |
data.frame containing the known positions of the bird (e.g., equipment or retrieval
site) with columns |
include_stap_id |
vector of |
include_min_duration |
minimum duration threshold of stationary periods to include (in hours). |
A GeoPressureR tag
object with:
stap
: Data.frame of all stationary periods with three new columns: known_lat
and
known_lon
define the known position during these stationary periods, and include
defines
whether the likelihood map of this stationary period should be computed and later used in the
graph.
extent
same as input parameter extent
scale
same as input parameter scale
Other tag:
print.tag()
,
tag_create()
withr::with_dir(system.file("extdata", package = "GeoPressureR"), {
tag <- tag_create("18LX", quiet = TRUE) |> tag_label(quiet = TRUE)
})
# Default tag
tag_default <- tag_set_map(tag, c(-16, 23, 0, 50))
print(tag_default)
# Customized tag, with coarse grid scale, known position for the first stationary
# period and considering only the stationary periods lasting more than 20hours.
tag_custom <- tag_set_map(tag,
extent = c(-16, 23, 0, 50),
scale = 1,
include_min_duration = 20,
known = data.frame(
stap_id = 1,
known_lon = 17.05,
known_lat = 48.9
)
)
print(tag_custom)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.