Make a dataframe colorful
1 2 3
a data frame or similar object, e.g. tibble, data.table or any object for which as.data.frame call returns a data frame
Which theme to use
further arguments are passed to
These functions turn any data frame like object (i.e. object which inherits the data.frame class, such as a tibble or a data table).
Apart from adding the S3 class "colorDF", the
.style attribute (and
.coltp attribute), the only thing that really changes is
the print method (see
print_colorDF()). In other words, the behavior
of the object does not change (e.g., a
base::data.frame() will by the default
drop dimensions if one column is selected, while a
not). colorDF is just for visualization, never truly manipulation.
Several color themes come with the package; see
When creating a colorful data frame, a theme might be directly selected;
getOption("colorDF_theme") is consulted and if NULL, a
default theme will be selected. The theme associated with an object
becomes a style and can be further manipulated (see
colorDF(); this function is only here for
a colorful data frame – identical object but with the
attribute set and class "colorDF" added.
Introduction to the package;
df_style() on how to modify style of the colorful data frame;
col_type() on how to change column types;
colorDF_themes() to list all themes;
to view all themes.
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.