print_df: display tibble conditional on output format

Description Usage Arguments Value Examples

View source: R/utility_functions.R

Description

utility function that displays a dataframe as pandoc.table or datatable

Usage

1
2
3
4
5
print_df(df, output = "default", caption = NULL, colnames,
  page_length = 10, col_select_enable = FALSE, longtable = TRUE,
  align = NULL, latex_options = c("striped", "hold_position",
  "repeat_header"), full_width = TRUE, modify_these_columns,
  column_widths)

Arguments

df

tibble to be printed

output

char: pdf/default

caption

caption for table

colnames

colnames to be displayed

page_length

nr. of rows to display

col_select_enable

logical: enable col-select-button

longtable

logical defaults to TRUE

align

alignment of columns

latex_options

char-vector: passed to kableStyling

full_width

table spans full width if true

modify_these_columns

char-vector of col-names to be modified

column_widths

width of the columns [cm] in pdf output

Value

markup for pandoc

Examples

1
2
library(tidyverse)
datasets::mtcars %>% print_df(caption = "mtcars", output = "pdf")

stephanGit/reporters documentation built on May 22, 2019, 6:34 p.m.