Estimate transmitters remaining in the system
Source:R/remaining_transmitters.R
remaining_transmitters.Rd
This function estimates the transmitters remaining in the system by finding the last date of detection for each transmitter and summing all available transmitters in a given day. This is a very coarse measure and likely to be very inaccurate with sparse data or short time scales.
Examples
if (FALSE) { # \dontrun{
#' # Set up example data
td <- file.path(tempdir(), "otndo_example")
dir.create(td)
# For tag data
download.file(
paste0(
"https://members.oceantrack.org/data/repository/",
"pbsm/detection-extracts/pbsm_matched_detections_2018.zip/@download/file"
),
destfile = file.path(td, "pbsm_matched_detections_2018.zip")
)
unzip(file.path(td, "pbsm_matched_detections_2018.zip"),
exdir = td
)
matched <- read.csv(file.path(
td,
"pbsm_matched_detections_2018.csv"
))
# Run remaining_transmitters()
remaining_transmitters(matched_dets, data.frame(date = as.Date("2020-01-01")))
} # }