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

    The pipe placeholder works better now

    Andrew Heiss pointed out to me that the placeholder since 4.3.0 is a lot better.

    quote(
      model |> _$coef |> _[1]
    ) 
    #> model$coef[1]
    

    Previously, I had been circumventing these functions with things like getElement() or making my own pipe-friendly wrapper functions.

    Tags: language, piping, r

    Posted: January 1, 2024

    Previous Next

    Leave a comment

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