Learn R Programming

performance (version 0.8.0)

display.performance_model: Print tables in different output formats

Description

Prints tables (i.e. data frame) in different output formats. print_md() is a alias for display(format = "markdown").

Usage

# S3 method for performance_model
display(object, format = "markdown", digits = 2, ...)

# S3 method for performance_model print_md(x, digits = 2, ...)

Arguments

object, x

An object returned by model_performance() or compare_performance(). or its summary.

format

String, indicating the output format. Currently, only "markdown" is supported.

digits

Number of decimal places.

...

Currently not used.

Value

A character vector. If format = "markdown", the return value will be a character vector in markdown-table format.

Details

display() is useful when the table-output from functions, which is usually printed as formatted text-table to console, should be formatted for pretty table-rendering in markdown documents, or if knitted from rmarkdown to PDF or Word files. See vignette for examples.

Examples

Run this code
# NOT RUN {
model <- lm(mpg ~ wt + cyl, data = mtcars)
mp <- model_performance(model)
display(mp)
# }

Run the code above in your browser using DataLab