• Skip to primary navigation
  • Skip to content
  • Skip to footer
Higher Order Functions
  • Posts
  • Notes
  • About Me
  • CV

    A leave-one-out apply helper

    I had to compare how each listener differed from the mean of the other listeners, so I cooked up:

    leave_one_out_apply <- function(xs, f, ...) {
      lapply(seq_along(xs), function(i) f(xs[-i], ...) )
    }
    

    Tags: functional programming, helpers, r

    Posted: August 1, 2025

    Previous Next

    Leave a comment

    • Home
    • Follow:
    • Bluesky
    • GitHub
    • Feed
    © 2026 Tristan Mahr. Powered by Jekyll & Minimal Mistakes.