snip: Prep for Snipping or Copy/Pasting out of R

Description Usage Arguments Examples

View source: R/snip.R

Description

Calls kable and kable_styling as appropriate based on class of input object and creates object ready to snip or copy/paste out of R. Currently works for data frames, matrices, and tables.

Usage

1
snip(x)

Arguments

x

Object to snip

Examples

1
2
3
4
5
6
7
8
# Print 4-cylinder cars
data(mtcars)
mtcars %>%
  dplyr::filter(cyl == 4) %>%
  snip()

# Crosstab of gears and cylinder using mtcars dataset
snip(table(mtcars$cyl, mtcars$gear))

vandomed/dvmisc documentation built on Oct. 2, 2020, 9:50 p.m.