Learn R Programming

dprint (version 0.0.4)

style: Style Sheet

Description

Control the mark up and formats for different sections of table

Usage

style(frmt.bdy = NULL, frmt.col = NULL, frmt.colh = NULL,
  frmt.grp = NULL, frmt.lbl = NULL, frmt.main = NULL, frmt.tbl = NULL,
  frmt.ftn = NULL, justify = "center", indent = 2, tbl.buf = 0.25,
  cex = 1)

Arguments

frmt.bdy

format settings for body of table

frmt.col

format settings for column heading of table

frmt.colh

Only used for borders around column spanning in hiearchy, "o" boxes entrie column, "_" puts line under hiarchy

frmt.grp

format settings for row group labels

frmt.lbl

format settings for row labels

frmt.main

format settings for table title

frmt.tbl

format settings for entire table, currently only for the box around entire table (Except table title)

frmt.ftn

format settings for footnote

justify

justification of text, applies to column heading and body

indent

number of characters ("A") to indent the labels underneath the grouping variable

tbl.buf

The space (vertical) between multiple tables

cex

character expansion

Examples

Run this code
# NOT RUN {
# My Style
# Default, this is what is used in dprint if style parameter is not defined
style()
# Save style sheet formats in object to pass to multiple calls
CBs <- style(frmt.bdy=frmt(fontfamily="HersheySans"), frmt.tbl=frmt(bty="o", lwd=1),
            frmt.col=frmt(fontfamily="HersheySans", bg="khaki", fontface="bold",lwd=2,bty="_"),
            frmt.grp=frmt(fontfamily="HersheySans",bg="khaki", fontface="bold"),
            frmt.main=frmt(fontfamily="HersheySans", fontface="bold", fontsize=12),
            frmt.ftn=frmt(fontfamily="HersheySans"),
            justify="right")
# }

Run the code above in your browser using DataLab