Apply Fixed-width Formatting to a Data Frame

Share:

Description

Generic, with a method for data.frame that right-justifies headers and columns, padding with spaces.

Usage

1
2
## S3 method for class 'data.frame'
fixedwidth(x, ...)

Arguments

x

a data.frame

...

extra arguments, ignored

Details

There does not seem to be a way to get write.table to produce fixed-width output. fixedwidth.data.frame gives essentially the same result as print.data.frame. Columns and headers are padded, suitable for output to a file using the defaults for write.table (sep=' ').

Value

data.frame; all columns are character

Author(s)

Tim Bergsma

References

http://metrumrg.googlecode.com

See Also

  • write.table

Examples

1

Want to suggest features or report bugs for rdrr.io? Use the GitHub issue tracker.