TB: Wrap text in text boxes.

Description Usage Arguments Value Examples

Description

TB - Generates an HTML text box tag.

TB2 - Generates an HTML writable text box tag.

Usage

1
2
3
4
5
6
TB(text = "clipboard", ..., col = "white", border = "black",
  padding = 10, lty = "solid", lwd = 1, bor.rad = 5, bold = FALSE,
  font.col = "black", copy2clip = interactive(), print = FALSE)

TB2(text = "clipboard", width = nchar(text), text_align = "center",
  box_align = "left", copy2clip = interactive(), print = FALSE)

Arguments

text

A character vector or text copied to the clipboard. Default is to read from the clipboard.

col

The color(s) to fill or shade the rectangle with.

border

The color for rectangle border(s).

padding

The distance (in px) between the text and the border.

lty

The line type for borders (either "solid" or "dashed").

lwd

The line width (in px) for borders and shading.

bor.rad

The degree (in px) to which the corners are rounded; 0 results in square corners.

bold

logical. If TRUE the font will be boldfaced.

font.col

The color of the font.

copy2clip

logical. If TRUE attempts to copy the output to the clipboard.

print

logical. If TRUE cat prints the output to the console. If FALSE returns to the console.

width

The width, in characters, to make the box.

text_align

Alingment of text in the box; takes the values c("left", "right", "top", "middle", "bottom").

box_align

Alingment of textbox; takes the values c("left", "right", "top", "middle", "bottom").

...

Other arguments passed to style in the HTML div tag.

Value

Returns a character vector of an HTML text box tag.

Examples

1
2
3
4
5
TB("I like ice cream!", print=TRUE)
TB("Free cookies for a year!", col = "red", font.col="white", print=TRUE)
TB("Bad Robot!", "font-style:italic", print=TRUE)
TB2("I like ice cream!", print=TRUE)
TB2("Free cookies for a year!", print=TRUE)

trinker/reports documentation built on May 31, 2019, 9:51 p.m.