Last data update: 2014.03.03

R: Wrapper function around 'print.summarytools' to facilitate...
viewR Documentation

Wrapper function around print.summarytools to facilitate generation of html files.

Description

Takes a summarytools object as argument and calls its print method using method="viewer" by default. This generates an html file in the session's temporary directory and displays this file in RStudio's Viewer pane, falling back to default browser when used outside RStudio.

Usage

  view(x, method = "viewer", ...)

Arguments

x

A summarytools object created with one of freq, descr and dfSummary.

method

One of the 3 following: “viewer” (default), “browser”, “pander”. Note: To display x without any formatting at all, simply use as.table(x)

...

Not used for now.

Details

This function makes it more practical to generate html files with a single line of code, such as in view(freq(iris$Species)).

Value

For method=="pander", nothing (NULL) is returned. With the two other methods (“viewer” and “browser”), returns the html file's absolute path.

Author(s)

Dominic Comtois <dominic.comtois@gmail.com>

Examples

  data(iris)
  ## Not run: view(dfSummary(iris))
  ## Not run: view(descr(iris,transpose=TRUE), "browser")
  view(freq(iris$Species), "pander")

Results