Would LOVE a video walking through your development environment! The anonymous function shorthand introduced in 4.1 alongside |> solves the issue of missing the 'dot' functionality that %>% has. Your second example works as follows: mtcars |> dplyr::mutate(mpg2 = 2*mpg) |> { \(x) if(filter_check) { dplyr::filter(x, mpg == 21) } else{ dplyr::filter(x, mpg != 21) } }() |> dplyr::select(mpg,mpg2)
Cool thanks for the tip. The syntax looks kind of weird but I guess it gets the job done. I’m thinking about starting a series writing an app from scratch, that would be a good moment to show my development environment
Interesting since the base pipe seems to replacing the magrittr pipe in all the presentations I have seen in the last six months or so. Therefore the issues the base pipe had/has are resolved?
He keeps saying empty cars. Anyway, he's not comparing apples to apples. He says base r pipe |> doesn't work in his example and then goes on to show %>% does work, but he added , df = . in the expression with %>% but did not in the expression with |>. How's that a proper comparison??? I cannot understand that kind of illogical teaching.
nice. It is extremely rare seeing someone use R without Rstudio. Cheers and good video
Would LOVE a video walking through your development environment!
The anonymous function shorthand introduced in 4.1 alongside |> solves the issue of missing the 'dot' functionality that %>% has. Your second example works as follows:
mtcars |>
dplyr::mutate(mpg2 = 2*mpg) |>
{ \(x)
if(filter_check) {
dplyr::filter(x, mpg == 21)
} else{
dplyr::filter(x, mpg != 21)
}
}() |>
dplyr::select(mpg,mpg2)
Cool thanks for the tip. The syntax looks kind of weird but I guess it gets the job done.
I’m thinking about starting a series writing an app from scratch, that would be a good moment to show my development environment
@@AndyQuinteroM awesome I'm looking forward. This is great stuff, looking forward to seeing you grow.
Interesting since the base pipe seems to replacing the magrittr pipe in all the presentations I have seen in the last six months or so. Therefore the issues the base pipe had/has are resolved?
you can use the _ in place of the . when using the base R pipe.
Yeah. I am a Vim user put is it hard not to use RStudio. It is simply embedded in my soul by now.
He keeps saying empty cars.
Anyway, he's not comparing apples to apples. He says base r pipe |> doesn't work in his example and then goes on to show %>% does work, but he added , df = . in the expression with %>% but did not in the expression with |>. How's that a proper comparison???
I cannot understand that kind of illogical teaching.