graft {taber}R Documentation

Graft

Description

Graft one dataset onto another

Usage

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

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


[Package taber version 0.1.2 Index]