Become an expert in R — Interactive courses, Cheat Sheets, certificates and more!
Get Started for Free

summary_sink

Prints summary and sink Output in a File


Description

Prints summary and sink output in a File

Usage

summary_sink( object, file, append=FALSE, ...)

Arguments

object

Object for which a summary method is defined

file

File name

append

Optional logical indicating whether console output should be appended to an already existing file. See argument append in base::sink.

...

Further arguments passed to summary.

See Also

Examples

#############################################################################
# EXAMPLE 1: summary_sink example for lm function
#############################################################################

#--- simulate some data
set.seed(997)
N <- 200
x <- stats::rnorm( N )
y <- .4 * x + stats::rnorm(N, sd=.5 )

#--- fit a linear model and sink summary into a file
mod1 <- stats::lm( y ~ x )

CDM::summary_sink(mod1, file="my_model")

#--- fit a second model and append it to file
mod2 <- stats::lm( y ~ x + I(x^2) )
CDM::summary_sink(mod2, file="my_model", append=TRUE )

CDM

Cognitive Diagnosis Modeling

v7.5-15
GPL (>= 2)
Authors
Alexander Robitzsch [aut, cre], Thomas Kiefer [aut], Ann Cathrice George [aut], Ali Uenlue [aut]
Initial release
2020-03-10 14:19:21

We don't support your browser anymore

Please choose more modern alternatives, such as Google Chrome or Mozilla Firefox.