Skip to content

Commit

Permalink
fix line length
Browse files Browse the repository at this point in the history
  • Loading branch information
robitalec committed Oct 31, 2024
1 parent 6756721 commit 08871cc
Showing 1 changed file with 5 additions and 3 deletions.
8 changes: 5 additions & 3 deletions R/leader_direction_group.R
Original file line number Diff line number Diff line change
Expand Up @@ -159,9 +159,10 @@ leader_direction_group <- function(
.SDcols = c(group_direction, xcol, ycol, centroid_xcol, centroid_ycol)]

if (return_rank) {
if ('rank_position_group_direction' %in% colnames(DT)) {
rank_col <- 'rank_position_group_direction'
if (rank_col %in% colnames(DT)) {
message(
'rank_position_group_direction column will be overwritten by this function'
paste0(rank_col, ' column will be overwritten by this function')
)
data.table::set(DT, j = 'rank_position_group_direction', value = NULL)
}
Expand All @@ -175,7 +176,8 @@ leader_direction_group <- function(
}

DT[, rank_position_group_direction :=
data.table::frank(-position_group_direction, ties.method = ties.method),
data.table::frank(-position_group_direction,
ties.method = ties.method),
by = c(group)]
}

Expand Down

0 comments on commit 08871cc

Please sign in to comment.