Skip to content

Commit

Permalink
reflow
Browse files Browse the repository at this point in the history
  • Loading branch information
robitalec committed Oct 3, 2024
1 parent 57c7532 commit cb3a855
Showing 1 changed file with 9 additions and 11 deletions.
20 changes: 9 additions & 11 deletions R/centroid_group.R
Original file line number Diff line number Diff line change
@@ -1,22 +1,20 @@
#' Group centroid
#'
#' \code{centroid_group} calculates the centroid (mean location) of
#' all individuals in each 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}. Relocation data should be
#' in two columns representing the X and Y coordinates.
#' \code{centroid_group} calculates the centroid (mean location) of all
#' individuals in each 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}. Relocation data should be in two
#' columns representing the X and Y coordinates.
#'
#' The \code{DT} must be a \code{data.table}. If your data is a
#' \code{data.frame}, you can convert it by reference using
#' \code{\link[data.table:setDT]{data.table::setDT}} or by reassigning using
#' \code{\link[data.table:data.table]{data.table::data.table}}.
#'
#' The \code{coords} and \code{group}
#' arguments expect the names of a column in \code{DT} which correspond to the
#' X and Y coordinates and group columns. The \code{na.rm} argument is passed
#' to the \code{mean} function to control if NA values are removed before
#' calculation.
#' The \code{coords} and \code{group} arguments expect the names of a column in
#' \code{DT} which correspond to the X and Y coordinates and group columns. The
#' \code{na.rm} argument is passed to the \code{mean} function to control if NA
#' values are removed before calculation.
#'
#' @param DT input data.table with group column generated with \code{group_pts}
#' @inheritParams group_pts
Expand Down

0 comments on commit cb3a855

Please sign in to comment.