diff --git a/man/direction_to_centroid.Rd b/man/direction_to_centroid.Rd index d28dca68..e90c05eb 100644 --- a/man/direction_to_centroid.Rd +++ b/man/direction_to_centroid.Rd @@ -15,7 +15,8 @@ Note: the order is assumed X followed by Y column names.} \value{ \code{direction_to_centroid} returns the input \code{DT} appended with a \code{direction_centroid} column indicating the direction to group -centroid in radians. +centroid in radians. The direction is measured in radians in the range +of 0 to 2 * pi from the positive x-axis. A message is returned when \code{direction_centroid} column already exist in the input \code{DT}, because they will be overwritten. @@ -25,8 +26,8 @@ in the input \code{DT}, because they will be overwritten. the centroid of the spatiotemporal group identified by \code{group_pts}. The function accepts a \code{data.table} with relocation data appended with a \code{group} column from \code{group_pts} and centroid columns from -\code{centroid_group}. Relocation data should be in two columns representing -the X and Y coordinates. +\code{centroid_group}. Relocation data should be in planar coordinates +provided in two columns representing the X and Y coordinates. } \details{ The \code{DT} must be a \code{data.table}. If your data is a diff --git a/man/distance_to_centroid.Rd b/man/distance_to_centroid.Rd index fa7a43fe..3b8bcf97 100644 --- a/man/distance_to_centroid.Rd +++ b/man/distance_to_centroid.Rd @@ -42,8 +42,8 @@ because they will be overwritten. centroid of the spatiotemporal group identified by \code{group_pts}. The function accepts a \code{data.table} with relocation data appended with a \code{group} column from \code{group_pts} and centroid columns from -\code{centroid_group}. Relocation data should be in two columns representing -the X and Y coordinates. +\code{centroid_group}. Relocation data should be in planar coordinates +provided in two columns representing the X and Y coordinates. } \details{ The \code{DT} must be a \code{data.table}. If your data is a @@ -83,7 +83,12 @@ group_pts(DT, threshold = 5, id = 'ID', centroid_group(DT, coords = c('X', 'Y'), group = 'group', na.rm = TRUE) # Calculate distance to group centroid -distance_to_centroid(DT, coords = c('X', 'Y'), group = 'group', return_rank = TRUE) +distance_to_centroid( + DT, + coords = c('X', 'Y'), + group = 'group', + return_rank = TRUE +) } \references{ See examples of using distance to group centroid: