Learn R Programming

pubprint (version 0.2.1)

pprint: Prints an object in a publishable manner

Description

pprint formats the output of the given object in a specified way

Usage

pprint(x, format, ..., concat = TRUE, mmode = pp_opts$get("mmode"), separator = pp_opts$get("separator"), toClip = FALSE)

Arguments

x
object which output should be printed. Can be a list to deliver additional information to internal style functions.
format
optional format specifier. Character vector, see details.
...
optional arguments passed to internal style functions. See their help files for more information.
concat
logical, whether returned result is in a single character or a character vector with parts of the statistical output.
mmode
logical indicating if the returned result should be set in math mode (depends on output format).
separator
character string specifying the surrounding characters.
toClip
logcial, whether returned result should be printed to clipboard (see toClipboard).

Value

Simply the unmodified object x in a list if format is "object", else a character vector.

Details

This function calls internal style functions to convert the output of the object into the specified publication style. It offers options to put a math mode and surrounding characters around the (concatenated) output.

If argument format is missing, a function tries to determine a default format specifier. Can be specified to simple return the input object ("object"). It is possible to set it to any internal style function, the selected style supports.

See Also

See pp_opts_style for setting publication style and pp_opts_out for setting output format.

Examples

Run this code
pprint(t.test(1:30))
pprint(t.test(1:30, 2:31))
pprint(t.test(1:30, 2:31), format = "object")
pprint(t.test(1:30, 2:31), mmode = FALSE, separator = NULL)
pprint(list(t.test(1:30), .843))

Run the code above in your browser using DataLab