search for: worksace

Displaying 3 results from an estimated 3 matches for "worksace".

Did you mean: workspace
2019 Oct 05
4
should base R have a piping operator ?
...the Bizzaro pipe comes with many flaws though : * It's not a single operator * It has a different precedence * It cannot be used in a subcall * The variable assigned to must be on the right * It doesn't trigger indentation when going to the line * It creates/overwrite a `.` variable in the worksace. And it doesn't deal gracefully with some lazy evaluation edge cases such as : compose <- function(f, g) { function(x) g(f(x)) } plus1 <- function(x) x + 1 plus2 <- plus1 %.% compose(.,plus1) plus2(5) #> [1] 7 plus1 ->.; compose(.,plus1) -> .; . -> plus2 plus2(5) #&gt...
2019 Oct 05
0
should base R have a piping operator ?
...any flaws though : > * It's not a single operator > * It has a different precedence > * It cannot be used in a subcall > * The variable assigned to must be on the right > * It doesn't trigger indentation when going to the line > * It creates/overwrite a `.` variable in the worksace. > > And it doesn't deal gracefully with some lazy evaluation edge cases such as > : > > compose <- function(f, g) { function(x) g(f(x)) } > plus1 <- function(x) x + 1 > > plus2 <- plus1 %.% compose(.,plus1) > plus2(5) > #> [1] 7 > > plus1 -...
2019 Oct 05
6
should base R have a piping operator ?
Dear R-devel, The most popular piping operator sits in the package `magrittr` and is used by a huge amount of users, and imported /reexported by more and more packages too. Many workflows don't even make much sense without pipes nowadays, so the examples in the doc will use pipes, as do the README, vignettes etc. I believe base R could have a piping operator so packages can use a pipe in