The hardware and bandwidth for this mirror is donated by METANET, the Webhosting and Full Service-Cloud Provider.
If you wish to report a bug, or if you are interested in having us mirror your free-software or open-source project, please feel free to contact us at mirror[@]metanet.ch.

Convenience Functions

2024-06-13

Convenience Functions

The formats() function

The formats associated with a data frame can be easily extracted or assigned with the formats() function. This function returns or accepts a named list of formatting objects. The names of the list items correspond to the names of the columns in the data frame. This function is useful when you want to assign formats to many columns.

The fattr() function

The fattr() function helps assign formatting attributes to a vector or data frame column. The fattr() function can assign the format, label, description, width, and justify attributes all at once. These attributes are passed in as arguments to the fattr() function, instead of as properties on a call to attr().

Other convenience functions

The fmtr package contains several other functions for setting attributes easily. These include the descriptions(), widths() and justification() functions to set columns descriptions, column widths, and column justification on an entire data frame. The package also includes class testing functions like is.format() and is.flist().

NOTE: In version 1.5.8 of fmtr the labels() function was moved to the common package. If you wish to use this function, please include the common package instead.

Next: Helper Functions

These binaries (installable software) and packages are in development.
They may not be fully stable and should be used with caution. We make no claims about them.