similar to: should base R have a piping operator ?

Displaying 20 results from an estimated 3000 matches similar to: "should base R have a piping operator ?"

2019 Oct 05
4
should base R have a piping operator ?
Hi John, Thanks, but 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
2019 Oct 05
0
should base R have a piping operator ?
Hello, R is a functional language, pipes are not. There are even higher order functions such as [1] and [2]. Besides, packages are part of R, R couldn't live without them. I find pipes a good idea but I also find it better not to have them as part of base R. If you want to use them, load a package, if you don't, don't. This simple. As for your example, compose, there is a
2019 Oct 05
0
should base R have a piping operator ?
Actually, base R already has a pipe fairly close to the one you describe: ->.; iris ->.; head(.) ->.; dim(.) # [1] 6 5 I've called it the Bizarro pipe ( http://www.win-vector.com/blog/2016/12/magrittrs-doppelganger/ <http://www.win-vector.com/blog/2016/12/magrittrs-doppelganger/> ), and for some reason we chickened out and didn't spend time on it in the dot pipe paper (
2019 Oct 05
5
should base R have a piping operator ?
Yes but this exageration precisely misses the point. Concerning your examples: * I love fread but I think it makes a lot of subjective choices that are best associated with a package. I think it changed a lot with time and can still change, and we have great developers willing to maintain it and be reactive regarding feature requests or bug reports *.group_by() adds a class that works only (or
2019 Oct 06
1
should base R have a piping operator ?
On 05/10/2019 7:50 p.m., Gabriel Becker wrote: > Hi all, > > I think there's some nuance here that makes makes me agree partially with > each "side". > > The pipe is inarguably extremely popular. Many probably think of it as a > core feature of R, along with the tidyverse that (as was pointed out) > largely surrounds it and drives its popularity. Whether its
2019 Oct 07
4
should base R have a piping operator ?
Hi Gabe, > There is another way the pipe could go into base R that could not be > done in package space and has the potential to mitigate some pretty > serious downsides to the pipes relating to debugging I assume you're thinking about the large stack trace of the magrittr pipe? You don't need a parser transformation to solve this problem though, the pipe could be implemented as
2019 Oct 05
0
should base R have a piping operator ?
How is your argument different to, say, "Should dplyr or data.table be part of base R as they are the most popular data science packages and they are used by a large number of users?" Kind regards On Sat, Oct 5, 2019 at 4:34 PM Ant F <antoine.fabri at gmail.com> wrote: > Dear R-devel, > > The most popular piping operator sits in the package `magrittr` and is used >
2020 Jun 27
1
roxygen2 / documentation of reexports
Dear colleagues, preparing a release of my package ?polmineR? I encountered the following issue with a new warning issued when running R CMD check with the --as-cran option on Debian with R-devel. To reexport the magrittr pipe operator %>%, my package adopted I snippet you?d see in the dplyr package, for instance: #' @importFrom magrittr %>% #' @export magrittr::`%>%` The
2019 Oct 06
1
should base R have a piping operator ?
I'm largely with Gabriel Becker on this one: if pipes enter base R, they should be a well thought out and integrated part of the language. I do see merit though in providing a pipe in base R. Reason is mainly that right now there's not a single pipe. A pipe function exists in different packages, and it's not impossible that at one point piping operators might behave slightly different
2019 Oct 05
3
should base R have a piping operator ?
On Sat, 5 Oct 2019 at 17:15, Hugh Marera <hugh.marera at gmail.com> wrote: > > How is your argument different to, say, "Should dplyr or data.table be > part of base R as they are the most popular data science packages and they > are used by a large number of users?" Two packages with many features, dozens of functions and under heavy development to fix bugs, add new
2020 Aug 28
2
utils::isS3stdGeneric chokes on primitives and identity
Trace adds something to the body of the function, so it does make sense that it doesn't. Whether traced functions still technically meet the definition of standard s3 generic or not is, I suppose, up for debate, but I would say that they should, I think. As before, if desired I can work on a patch for this if desired, or someone on R-core can just take care of it if that is easier. Best, ~G
2020 Aug 26
2
trace creates object in base namespace if called on function argument
Please note that this is documented in ?trace. "fun" is matched to what, it is a _name_ of the function to be traced, which is traced in the top-level environment. I don't know why it was designed this way, but it is documented in detail, and hence the expected behavior. Debugging is often, and also in R, implemented in the core. Tracing is implemented on top without specific
2019 Oct 07
2
should base R have a piping operator ?
> > On 7 Oct 2019, at 13:47, Duncan Murdoch <murdoch.duncan at gmail.com> wrote: > > On 07/10/2019 4:22 a.m., Lionel Henry wrote: >> Hi Gabe, >>> There is another way the pipe could go into base R that could not be >>> done in package space and has the potential to mitigate some pretty >>> serious downsides to the pipes relating to debugging
2020 Aug 20
2
utils::isS3stdGeneric chokes on primitives and identity
>>>>> Gabriel Becker writes: > I added that so I can look at the proposed fix and put it or something > similar in bugzilla for review final review. > Apologies for the oversight. Fixed now with - while(as.character(bdexpr[[1L]]) == "{") + while(is.call(bdexpr) && (as.character(bdexpr[[1L]]) == "{")) (the suggested fix does not work on
2024 Mar 29
1
declare and validate options
> > I think there are too many packages that would need changes under this > scheme. There would be zero if the registration of options is not required for packages first uploaded on CRAN before the feature is implemented. If an option is not registered no validation is triggered and nothing breaks even if we opt in the behavior. > If those functions could be made simple enough and
2020 Aug 25
2
trace creates object in base namespace if called on function argument
Dear R-devel, I don't think this is expected : foo <- function() "hello" trace2 <- function(fun) trace(fun, quote(print("!!!"))) base::fun # Object with tracing code, class "functionWithTrace" # Original definition: # function() "hello" # # ## (to see the tracing code, look at body(object)) `untrace()` has the same behavior. This is
2020 Sep 02
3
sys.call() 's srcref doesn't match the language
Dear R-devel, I found this behavior disturbing, if `1 + f()` is called, `sys.call()` called inside of `f` will return a quoted `f()` with a "srcref" that prints "1 + f()". I don't know which one is good but I don't think they can be correct at the same time. Here's a reproducible example: f <- function(){ sc <- sys.call() print(sc) attr(sc,
2019 Oct 07
1
[External] Re: should base R have a piping operator ?
IMHO, if base R were to include a pipe operator, I think it should be much simpler than the magrittr pipe. It should satisfy the property that: x |> f(...) is equivalent to f(x, ...) Except, perhaps, in terms of when the promise for 'x' gets forced. We shouldn't need to mess with bindings in environments to make that work. My understanding is that the '.'
2020 Aug 19
2
utils::isS3stdGeneric chokes on primitives and identity
Dear R-devel, utils::isS3stdGeneric tries to subset the body of the function it's fed, primitives don't like that because they don't have a body, identity doesn't like it either because it's body is a symbol. According to the doc, any function is a legal input. See below: identity #> function (x) #> x #> <bytecode: 0x0000000013d6da28> #> <environment:
2019 Oct 07
0
should base R have a piping operator ?
On 07/10/2019 4:22 a.m., Lionel Henry wrote: > Hi Gabe, > >> There is another way the pipe could go into base R that could not be >> done in package space and has the potential to mitigate some pretty >> serious downsides to the pipes relating to debugging > > I assume you're thinking about the large stack trace of the magrittr > pipe? You don't need a