print2file: Print Object to File

View source: R/print2file.R

print2fileR Documentation

Print Object to File

Description

A thin wrapper around the sink() function to print the corresponding object to a file connection.

Usage

print2file(..., file, width = 250)

Arguments

...

Object(s) to be printed to file as standard output.

file

File name for the output.

width

Numeric. Controls the maximum number of columns on a line used in printing vectors, matrices and arrays, and when filling by cat(). See also getOption("width").

Author(s)

Stu Field

See Also

sink()

Examples

tab <- cross_tabulate(mtcars, cyl, carb)
print2file(tab, file = "table_file.txt")

stufield/stuRpkg documentation built on April 2, 2022, 2:05 p.m.