Learn R Programming

report (version 0.6.0)

report_text: Report a textual description of an object

Description

Creates text containing a description of the parameters of R objects (see list of supported objects in report()).

Usage

report_text(x, table = NULL, ...)

Value

An object of class report_text().

Arguments

x

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

table

A table obtained via report_table(). If not provided, will run it.

...

Arguments passed to or from other methods.

Examples

Run this code
library(report)

# Miscellaneous
r <- report_text(sessionInfo())
r
summary(r)

# Data
report_text(iris$Sepal.Length)
report_text(as.character(round(iris$Sepal.Length, 1)))
report_text(iris$Species)
report_text(iris)

# h-tests
report_text(t.test(iris$Sepal.Width, iris$Sepal.Length))

# ANOVA
r <- report_text(aov(Sepal.Length ~ Species, data = iris))
r
summary(r)

# GLMs
r <- report_text(lm(Sepal.Length ~ Petal.Length * Species, data = iris))
r
summary(r)

# \donttest{
library(lme4)
model <- lme4::lmer(Sepal.Length ~ Petal.Length + (1 | Species), data = iris)
r <- report_text(model)
r
summary(r)
# }
if (FALSE) { # requireNamespace("rstanarm", quietly = TRUE)
# \donttest{
# Bayesian models
library(rstanarm)
model <- suppressWarnings(stan_glm(mpg ~ cyl + wt, data = mtcars, refresh = 0, iter = 600))
r <- report_text(model)
r
summary(r)
# }
}

Run the code above in your browser using DataLab