Skip to content

Commit

Permalink
fix arg defaults
Browse files Browse the repository at this point in the history
  • Loading branch information
robitalec committed Oct 31, 2024
1 parent 1d0c7c4 commit 3e1415d
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion R/distance_to_leader.R
Original file line number Diff line number Diff line change
Expand Up @@ -75,7 +75,10 @@
#'
#' # Calculate distance to leader
#' distance_to_leader(DT, coords = c('X', 'Y'))
distance_to_leader <- function(DT, coords = c('x', 'y'), group = 'group') {
distance_to_leader <- function(
DT = NULL,
coords = NULL,
group = NULL) {
stopifnot(first(coords) %in% colnames(DT))
stopifnot(last(coords) %in% colnames(DT))
stopifnot(group %in% colnames(DT))
Expand Down

0 comments on commit 3e1415d

Please sign in to comment.