-
Notifications
You must be signed in to change notification settings - Fork 39
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Add support of question mark as binary operator #62
Comments
It seems a little redundant with cat() string as:
By the way, will it be possible to support it as ternary operator?
|
@yanlinlin82 I thought about supporting the commonly used |
The main consideration to support pipeline({
mtcars
? nrow(.)
subset(mpg >= quantile(mpg, 0.05) & mpg <= quantile(mpg, 0.95))
? nrow(.)
lm(formula = mpg ~ wt + cyl)
summary
? .$r.squared
coef
})
The output answers the same question in different context but user may not well distinguish the answers clearly. So a customizable label of question can be useful here. pipeline({
mtcars
"Total number of records" ? nrow(.)
subset(mpg >= quantile(mpg, 0.05) & mpg <= quantile(mpg, 0.95))
"Qualified number of records" ? nrow(.)
lm(formula = mpg ~ wt + cyl)
summary
"R Squared" ? .$r.squared
coef
})
The output is clearer in its own. |
Whether to support question mark as ternary operator deserves another issue. I'll open one for that. |
Love this idea Alex Bresler ASBC LLLC [email protected]
|
The current implementation only supports interpreting question mark as unary operator. For example,
Add support of question mark as binary operator so that user can customize the text in the question.
The question can be written like a mutated string.
The text was updated successfully, but these errors were encountered: