Answer by Santos for Use pipe without feeding first argument
please check pipeR package. This packages defines %>>% operator so that you can inpute your lhs object as . argument in the rhs function.For example, suppose lst is a list of matrix, and you want...
View ArticleAnswer by Julien for Use pipe without feeding first argument
One can use an anonymous functionmagrittr pipelibrary(magrittr)iris %>% (\(.) cor(x = .$Sepal.Length, y = .$Sepal.Width))# [1] -0.1175698base pipeiris |> (\(.) cor(x = .$Sepal.Length, y =...
View ArticleAnswer by Konrad Rudolph for Use pipe without feeding first argument
Is the %>% pipe operator always feeding the left-hand side (LHS) to the first argument of the right-hand side (RHS)? Even if the first argument is specified again in the RHS call?No. You’ve noticed...
View ArticleUse pipe without feeding first argument
Is the %>% pipe operator always feeding the left-hand side (LHS) to the first argument of the right-hand side (RHS)? Even if the first argument is specified again in the RHS call? Say I want to...
View Article
More Pages to Explore .....