Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
13 changes: 7 additions & 6 deletions R/direction_to_leader.R
Original file line number Diff line number Diff line change
@@ -1,10 +1,11 @@
#' Direction to group leader
#' Direction to leader in position along group direction
#'
#' `direction_to_leader` calculates the direction to the leader of each
#' spatiotemporal group. The function expects a `data.table` with relocation
#' data appended with a `rank_position_group_direction` column indicating the
#' ranked position along the group direction generated with
#' `leader_direction_group(return_rank = TRUE)`. Relocation data should be in
#' `direction_to_leader` calculates the direction to the leader in position
#' along the group direction of each spatiotemporal group. The function expects
#' a `data.table` with relocation data appended with a
#' `rank_position_group_direction` column indicating the ranked position along
#' the group direction generated with
#' `leader_direction_group(return_rank = TRUE)`. Relocation data should be in
#' two columns representing the X and Y coordinates, or in a geometry column
#' prepared by the helper function [get_geometry()].
#'
Expand Down
9 changes: 5 additions & 4 deletions R/distance_to_leader.R
Original file line number Diff line number Diff line change
@@ -1,8 +1,9 @@
#' Distance to group leader
#' Distance to leader in position along group direction
#'
#' `distance_to_leader` calculates the distance to the leader of each
#' spatiotemporal group. The function expects a `data.table` with relocation
#' data appended with a `rank_position_group_direction` column indicating the
#' `distance_to_leader` calculates the distance to the leader in position along
#' group direction of each spatiotemporal group. The function expects a
#' `data.table` with relocation data appended with a
#' `rank_position_group_direction` column indicating the
#' ranked position along the group direction generated with
#' `leader_direction_group(return_rank = TRUE)`. Relocation data should be in
#' two columns representing the X and Y coordinates, or in a geometry column
Expand Down
10 changes: 8 additions & 2 deletions R/leader_direction_group.R
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
#' Leadership along group direction
#' Leadership in position along group direction
#'
#' Given the mean direction of a group of individuals, `leader_direction_group`
#' shifts the coordinate system to a new origin at the group centroid and
Expand Down Expand Up @@ -57,12 +57,18 @@
#' @family Direction functions
#'
#' @references
#' See examples of measuring leadership along group direction (also called
#' See examples of measuring leadership in position along group direction (also called
#' forefront index):
#' * \doi{doi:10.1371/journal.pone.0036567}
#' * \doi{doi:10.1111/jfb.15315}
#' * \doi{doi:10.1098/rspb.2021.0839}
#'
#' Other methods for measuring leadership include [leader_edge_delay()] with
#' [edge_delay()], movement initiations (e.g. Quera et al. J Fish Biol 2023,
#' Bracken et al. Proceedings of the Royal Society B: Biological Sciences 2022,
#' Strandburg-Peshkin et al. Philosophical Transactions of the Royal Society B:
#' Biological Sciences 2018), and measures of dominance.
#'
#' @examples
#' # Load data.table
#' library(data.table)
Expand Down
Loading