Closed daranzolin closed 4 years ago
Interestingly though, it works with the %->%
operator from zeallot:
library(zeallot)
library(nakedpipe)
suppressPackageStartupMessages(library(dplyr))
iris %.% {
filter(Sepal.Length > 5)
~~ count(., Species) %->% species_count
} -> iris_subset
species_count
#> # A tibble: 3 x 2
#> Species n
#> <fct> <int>
#> 1 setosa 22
#> 2 versicolor 47
#> 3 virginica 49
Created on 2020-03-26 by the reprex package (v0.3.0)
It's because ~
has lower precedence than %->%
but higher than <-
so <-
needs adhoc magic. Seems I forgot to support ->
when implementing this magic but I believe it's an easy fix. Thanks for reporting!
now fixed!
This old thread has been automatically locked. If you think you have found something related to this, please open a new issue and link to this old issue if necessary.
It looks like right arrow assignment doesn't work after
~~
. The first example using left arrow assignment works, but not the second. Reprex below:Created on 2020-03-26 by the reprex package (v0.3.0)