Learn R Programming

mStats (version 3.2.2)

printText: Display functions for mStats

Description

Printing Functions to format and display outputs from mStats package

printText, an old version of printText2 which produces a better output.

printText2() can print data.frame in a well-formatted style. This added printLines for better visualization.

printLines() produces lines as strings for specified length.

printMsg() produces any text withint two round brackets.

getnPrintLabel() extract labels and printMsg().

wrapText() add next line to strings. This is used with cat().

Usage

printText(.x, .txt, .split = NULL, .printDF = FALSE)

printText2(.x, .txt, .split = NULL, .printDF = FALSE)

printLines(.x = "=", .width = 80)

printMsg(.txt = NULL)

getnPrintLabel(.data, .var.name)

wrapText(.txt, .width = 70, .sep = "\n")

Arguments

.x

vector, matrix, dataframe or separator (in case of printLines)

.txt

texts

.split

separator for printText

.printDF

If yes, print as Data.frame

.width

desired character length to display

.data

Dataset

.var.name

Variable name to retrieve label

.sep

separator for line break

Functions

  • printText2: example

  • printLines: example

  • printMsg: example

  • getnPrintLabel: example

  • wrapText: example