fslaborg / fslaborg/RProvider

Support for piping the first argument of R functions

Open
#276 0 comments 0 reactions 0 assignees View on GitHub
Status: Available Type: Enhancement
Dominant language
F#
Stars
245
Forks
68
PR merge metrics
No merged PRs in 30d

Description

**Is your feature request related to a problem? Please describe.**
A key part of tidy workflows in R is using the %>% operator to pipe the first argument to a function. This is the opposite of F# piping, which works on the last argument.

**Describe the solution you'd like**
For typed arguments, one solution would be to generate an additional overload for each R function that took a piped value as inserted behind the scenes as the first parameter to R, then only exposed the rest of the arguments to the user.

**Describe alternatives you've considered**
It is possible to make an operator to pipe through a specific named parameter when using the [ string * obj ] overload of an R function, but this is not ideal because for example in dplyr it means hard-coding _data as the item to be passed.

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.