pprint: Prints an object in a publishable manner

Description Usage Arguments Details Value See Also Examples

View source: R/io.R

Description

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

Usage

1
2
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).

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.

Value

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

See Also

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

Examples

1
2
3
4
5
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))

pubprint documentation built on May 29, 2017, 2:55 p.m.