Skip to content

Commit

Permalink
fix: remove order from filter_events()
Browse files Browse the repository at this point in the history
  • Loading branch information
ahasverus committed Mar 29, 2024
1 parent 7d2cdf4 commit 2322b80
Showing 1 changed file with 3 additions and 6 deletions.
9 changes: 3 additions & 6 deletions R/filter_events.R
Original file line number Diff line number Diff line change
Expand Up @@ -137,14 +137,11 @@ filter_events <- function(data, year = format(Sys.Date(), "%Y"),
}


## Order events by category (need to be improved) ----
## Order events by category ----

if (nrow(events) > 0) {

events$"order" <- ifelse(events$"category" == "Course", 1,
ifelse(events$"category" == "Group", 2, 3))

events <- events[with(events, order(from, order, event)), ]

events <- events[with(events, order(from, to, event)), ]

rownames(events) <- NULL
}
Expand Down

0 comments on commit 2322b80

Please sign in to comment.