From 9933e15de336923ad6f7ff3b671a89e52239bd19 Mon Sep 17 00:00:00 2001 From: Aleksander Chlebowski Date: Thu, 19 Dec 2024 17:37:50 +0100 Subject: [PATCH] tweak syntax --- R/delayed_choices.R | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/R/delayed_choices.R b/R/delayed_choices.R index 04abf809..18282e28 100644 --- a/R/delayed_choices.R +++ b/R/delayed_choices.R @@ -76,7 +76,7 @@ last_choice <- function() { return(x[length(x)]) } x$subset <- function(data) { - modifier <- function(x) rev(x)[1L] + modifier <- function(x) x[length(x)] Reduce(function(f, ...) f(...), c(x$subset, modifier), init = data, right = TRUE) } x