report: Automatic reporting of R objects

View source: R/report.R

reportR Documentation

Automatic reporting of R objects

Description

Create reports of different objects. See the documentation for your object's class:

Usage

report(x, ...)

Arguments

x

The R object that you want to report (see list of of supported objects above).

...

Arguments passed to or from other methods.

Details

  • System and packages (sessionInfo)

  • Dataframes and vectors

  • Correlations and t-tests (htest)

  • ANOVAs (⁠aov, anova, aovlist, ...⁠)

  • Regression models (⁠glm, lm, ...⁠)

  • Mixed models (⁠glmer, lmer, glmmTMB, ...⁠)

  • Bayesian models (⁠stanreg, brms...⁠)

  • Bayes factors (from bayestestR)

  • Structural Equation Models (SEM) (from lavaan)

  • Model comparison (from performance())

Most of the time, the object created by the report() function can be further transformed, for instance summarized (using summary()), or converted to a table (using as.data.frame()).

Organization

report_table and report_text are the two distal representations of a report, and are the two provided in report(). However, intermediate steps are accessible (depending on the object) via specific functions (e.g., report_parameters).

Output

The report() function generates a report-object that contain in itself different representations (e.g., text, tables, plots). These different representations can be accessed via several functions, such as:

  • as.report_text(r): Detailed text.

  • as.report_text(r, summary=TRUE): Minimal text giving the minimal information.

  • as.report_table(r): Comprehensive table including most available indices.

  • as.report_table(r, summary=TRUE): Minimal table.

Note that for some report objects, some of these representations might be identical.

Value

A list-object of class report, which contains further list-objects with a short and long description of the model summary, as well as a short and long table of parameters and fit indices.

See Also

Specific components of reports (especially for stats models):

  • report_table()

  • report_parameters()

  • report_statistics()

  • report_effectsize()

  • report_model()

  • report_priors()

  • report_random()

  • report_performance()

  • report_info()

  • report_text()

Other types of reports:

  • report_system()

  • report_packages()

  • report_participants()

  • report_sample()

  • report_date()

Methods:

  • as.report()

Template file for supporting new models:

  • report.default()

Examples


library(report)

model <- t.test(mtcars$mpg ~ mtcars$am)
r <- report(model)

# Text
r
summary(r)

# Tables
as.data.frame(r)
summary(as.data.frame(r))


report documentation built on Sept. 11, 2024, 8:47 p.m.