From 3e1415d918dce1994ce67d15b89dd320a82ba955 Mon Sep 17 00:00:00 2001 From: "Alec L. Robitaille" Date: Thu, 31 Oct 2024 19:36:31 -0300 Subject: [PATCH] fix arg defaults --- R/distance_to_leader.R | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/R/distance_to_leader.R b/R/distance_to_leader.R index e48024e4..5eb2a741 100644 --- a/R/distance_to_leader.R +++ b/R/distance_to_leader.R @@ -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))