Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Lazy version of the pipe #120

@hadley

Description

@hadley

It would be nice to have a general way to transform expressions of the form:

tryCatch(stop("!"), error = function(e) "An error")

The obvious transformation:

stop("!") %>% 
   tryCatch(error = function(e) "An error")

doesn't work because arguments in a pipeline are evaluated in sequence.

I no longer understand how the internals of magrittr work, but I wonder if it might be possible to use delayedAssign() to overcome this problem.

Metadata

Metadata

Assignees

No one assigned

    Labels

    featurea feature request or enhancement

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions