Creates an Rmarkdown report plotting each column of a dataset. Categorical columns are plotted in bar plots, and numerical columns are plotted in box plots. If 'by_column' is provided, these plots will be grouped by the values of that column
report_columns(
dt,
by_column = NULL,
filename = NULL,
output_format = "rmdformats",
title = NULL,
author = NULL,
plot_palette = NULL,
plot_palette_generator = "plasma",
horizontal_bars = TRUE,
sort_bars_value = TRUE,
sort_bars_decreasingly = TRUE,
rmdformats_theme = "downcute",
prettydoc_theme = "leonids",
number_sections = TRUE,
table_of_content = TRUE,
table_of_content_depth = 1,
fig_width = 9,
fig_height = 4,
directory = getwd(),
keep_rmd = FALSE,
render_reports = TRUE
)
Table to be studied.
Name of the column to use as groups for all the other plots. Default is NULL.
Name of the output file. If not supplied, a generic name will be created.
The format of the R Markdown output. Default is 'rmdformats'.
Title of the report. If NULL (default), no title will be added.
Author of the report. Default is NULL.
Character vector of hex codes to use on plots.
Palette from the viridis package used in case plot_palette is unspecified (or insufficient for the number of colors required.) Default value is 'plasma', and possible values are 'viridis', 'inferno', 'magma', 'plasma', 'cividis'.
Plot bars for categorical variables horizontally. Default is FALSE
Sort the bars by value. Default is FALSE.
Sort the bars decreasingly. Default is TRUE.
The theme to be used for [rmdformats](https://github.com/juba/rmdformats) outputs. Default is "downcute", and possible values are "downcute", "robobook", "material", "readthedown", "html_clean", "html_docco".
Name of the theme used on prettydoc. Default is leonids.
Whether or not to number the sections and subsections fo the report.
Whether or not to include a table fo content at the beginning of the report.
The depth of sections and subsections to be displayed on the table of content.
Set the global figure width or the rmarkdown file.
Set the global figure height or the rmarkdown file.
The directory in which to render the .html report
Whether or not to keep the .Rmd file. Default is false.
Whether or not to render the reports. Default is TRUE. Set render_reports = FALSE and keep_rmd = TRUE to only build the R Markdown files
Creates an HTML file with a plot for each column on the given table: a box plot for each numerical variable, and a bar plot for each categorical variable.
# NOT RUN {
# chronicle::report_columns(dt = iris,
# by_column = 'Species',
# horizontal_bars = TRUE,
# keep_rmd = TRUE)
# }
Run the code above in your browser using DataLab