print_dat: Internal Function: Print a data frame with caption/note

Description Usage Arguments See Also Examples

View source: R/prepare.R

Description

Intended for showing tables with titles & notes in logged output in doc/

Usage

1
2
print_dat(x, caption = NULL, note = NULL, digits = 1,
  big.mark = ",")

Arguments

x

data frame: data frame contents to print

caption

character: Optional caption to print

note

character: Optional note(s) to print. for multiple lines of notes

digits

number of digits for rounding

big.mark

character: separator between 1000s

See Also

Other internal helper functions: calc_churn, format_num, pct_round

Examples

1
2
3
4
5
6
7
x <- data.frame(yr = c(2005, 2006), cust = c(100000, 131000),
    sales = c(567891, 673568), churn = c(NA, 25.23), char = c("test", NA))
print_dat(x)
print_dat(x, "Customer Sales by Year")
print_dat(x, "Customer Sales by Year", "A note!")
print_dat(x, "Customer Sales by Year", big.mark = "")
print_dat(x, "Customer Sales by Year", digits = 0)

southwick-associates/salic documentation built on Nov. 5, 2019, 9:13 a.m.