Quantcast
Channel: Use pipe without feeding first argument - Stack Overflow
Browsing all 4 articles
Browse latest View live

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 Article



Answer 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 Article

Answer 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 Article

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? Say I want to...

View Article
Browsing all 4 articles
Browse latest View live




Latest Images