This function constructs a formula from the columns of a dataframe.
By default, only numeric columns are included. The arguments
numeric
, character
, logical
, factor
, complex
and raw
control the inclusion of columns of the corresponding types.
The argument other
controls inclusion of any other columns.
If these arguments are TRUE
, such columns will be included in
the formula.
If a function (or the name of a function given as a character string)
is passed, such columns will be transformed by the function before
inclusion. For example, All(df, factor=as.character)
will
convert all factor columns into their character representation for
inclusion.
In other cases, the columns will be skipped.