graft: Graft

Description Usage Arguments Details Value Author(s) Examples

View source: R/tabe.R

Description

Graft one dataset onto another

Usage

1
graft(.data, combine_fun, data2)

Arguments

.data

A tbl or something that can be coerced into one

combine_fun

optional, A function that will combine two tbls such as full_join or bind_rows

data2

A tbl or something that can be coerced into one

Details

Graft requires two data objects. The first must be provided by the user. The second can either be passed in or automatically pulled off of the package's internal stack of scions. These will be combined accoring to the following rules in order:

Value

A single tbl object

Author(s)

Seth Wenchel

Examples

1
2
3
4
library(dplyr)
aframe <- data.frame(zed = runif(100))
set_to_zero <- . %>% mutate(zed = 0)
aframe %>% scion(zed >0.5, false_fun=set_to_zero) %>% mutate(zed=1) %>% graft

taber documentation built on Oct. 23, 2020, 6:43 p.m.

Related to graft in taber...