tap: Executes a callback function on an object before passing the...

Description Usage Arguments Details Value

View source: R/tap.R

Description

This is inspired by Ruby's Object#tap method which allows chaining calls like: 'something.tap |o| puts o .method'

Usage

1
tap(thing, callback)

Arguments

thing

The object to pass to the callback and then return

callback

The function that receives the object and does something with it

Details

The idea is to use this function, or it's derivatives in a pipeline like: 'df

Value

The object passed in to allow for method chaining


aguynamedryan/helpRs documentation built on Dec. 18, 2021, 11:23 p.m.