pprint: Pipe friendly printing

Description Usage Arguments Examples

View source: R/06_pprint.R

Description

pprint makes it easy to print information about the pipe chain's status.

Usage

1
pprint(.data, .fun, ...)

Arguments

.data

An object

.fun

An expression or a function to apply on .data so the output can be printed, supports formula notation through purrr::as_mapper.

...

Additional parameters passed to .fun

Examples

1
2
3
4
5
6
7
8
iris %>%
pprint(~"hello")           %>%
pprint("hi")               %>% # simple expressions work as well
head(2)                    %>%
transform(Species = NULL)  %>%
pprint(rowSums,na.rm=TRUE) %>%
pprint(~dplyr::rename_all(.[1:2],toupper)) %>%
pprint(dim)

moodymudskipper/mmpipe documentation built on May 17, 2019, 10:39 a.m.