This internal helper function is used to format the columns of a data frame
for printing, specifically for use within the `print.anova.lcc` function. It
applies special formatting rules based on the column name, such as rounding
and special handling of small p-values.
Usage
formatColumn(column, colName)
Value
A vector with the same length as `column`, where each element has been
formatted according to the column-specific rules.
Arguments
column
A vector representing a column from a data frame.
colName
A string indicating the name of the column, which determines
the formatting rules to be applied.
Details
The function specifically handles the following columns:
- "p-value": Rounds the values to four decimal places, and represents
values less than 0.0001 as "<.0001".
- "AIC", "BIC", "logLik", "L.Ratio": Applies `zapsmall` for formatting.
Other columns are returned without changes.