Description Usage Arguments Value Examples
View source: R/getBestLocations.R
The best location is considered to be the location where the highest power detection occurred. The best location will be flagged if there are fewer than n_thresh detections within a distance of dist_max m from the best detection during the detection period. The best location will also be flagged if a negative linear relationship does not exist between the signal strength and the distance to the highest powered detection for all detections within dist_max km from the best signal in the detection period.
1 2 3 4 5 6 7 8 | get_best_locations(
detects,
date_bins = NA,
bin_by = 1,
n_thresh = 5,
dist_max = 10000,
remove_flagged = F
)
|
detects |
The output of |
date_bins |
A matrix of two columns manually specifying the detection periods. The first column represents the detection period start dates whereas the second column represents the detection period end dates. The dates should be in string format "d/m/y." If the date_bins argument is specified, bin_by will be ignored. The function |
bin_by |
Specifies the length (in days) of the detection periods. If bin_by=2, the best location will be found for each fish in two day bins. |
n_thresh |
See description. |
dist_max |
See description. |
remove_flagged |
If remove_flagged=T, all flagged detections will be removed. |
Returns a list containing two data.frames. $all_detects adds some useful to all_data:
$all_detects$BestSignal is the signal with the highest power in a detection period
$all_detects$Dist is the Euclidean distance (in km) between the detection location and the associated highest power detection
$all_detects$FlightNum is the detection period
$all_detects$Records is number of times that a fish was detected in a detection period
$best_detects contains the highest power detections only:
$best_detects$Flag indicates if a detection has been flagged as erroneous
1 2 3 4 5 6 |
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.