This constructs a formula object for all the columns of a dataframe.
1 2 3
The dataframe in which to find the columns.
Whether to include columns of specified types. See the Details below.
Whether to include columns that match none of the previous types.
Whether to escape LaTeX special characters in column names.
This function constructs a formula from the columns of a dataframe.
By default, only numeric columns are included. The arguments
raw control the inclusion of columns of the corresponding types.
other controls inclusion of any other columns.
If these arguments are
TRUE, such columns will be included in
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
In other cases, the columns will be skipped.
Language to insert into the table formula to achieve the desired table.
1 2 3
Loading required package: Hmisc Loading required package: lattice Loading required package: survival Loading required package: Formula Loading required package: ggplot2 Attaching package: 'Hmisc' The following objects are masked from 'package:base': format.pval, units Sepal.Length Sepal.Width Petal.Length Species mean sd mean sd mean sd setosa 5.006 0.3525 3.428 0.3791 1.462 0.1737 versicolor 5.936 0.5162 2.770 0.3138 4.260 0.4699 virginica 6.588 0.6359 2.974 0.3225 5.552 0.5519 Petal.Width mean sd 0.246 0.1054 1.326 0.1978 2.026 0.2747
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.