Function reference
-
plot_figure()
- Plot RUB figure
-
rub_plot_type_1()
- Plot vertical stacked bar chart (figure type 1)
-
rub_plot_type_1_and_4()
- Plot grouped line chart on top of vertical stacked bar chart (combination chart of figure types 1 and 4)
-
rub_plot_type_2()
- Plot vertical stacked bar charts that are scaled to 100% (figure type 2)
-
rub_plot_type_3()
- Plot horizontal stacked bar charts that are scaled to 100% (figure type 3)
-
rub_plot_type_4()
- Plot grouped line chart (figure type 4)
-
get_legend_columns()
- Gets appropriate number of legend columns based on the plot, font and active graphics device
-
scale_color_rub()
- Color scale constructor for RUB colors
-
scale_fill_rub()
- Fill scale constructor for RUB colors
Colors and palettes
Functions for retrieving the palettes and colors of the RUB corporate design, see the vignette on Using RUB colors
for details.
-
get_RUB_colors()
- Function to extract RUB palette colors as hex codes
-
get_RUB_palettes()
- Return function to interpolate a RUB color palette
-
RUB_colors
- RUB colors
-
RUB_palettes
- RUB color palette
Reporting functions
Functions for creating the parametric reports and associated helper functions, such as filter and file path functions.
-
get_file_path()
- Get file path for automatic report generation
-
get_report_nr_by_id()
- Get all unique values of
report_nr
for areport_type_id
-
filter_report()
- Filter data frame based on
report_nr
-
render_report()
render_report_safely()
- Render a single parametric report as Word file
Templating Functions
Functions for creating the code chunks required for the figures and the dynamic placement of headings.
-
get_figure_chunk_df()
- Get code chunks for plotting all figures
-
get_figure_chunk_text()
- Turn data frame obtained by
get_figure_chunk_df
into character vector of code chunks
-
tpl_get_figure_df()
- Returns a character vector for the code chunk to retrieve the figure data frame
-
tpl_heading()
- Returns a character vector for the code chunk to insert a heading
-
tpl_subheading()
- Returns a character vector for the code chunk to insert a subheading
-
tpl_plot_figure()
- Returns a character vector for the code chunk to plot a figure
-
rub_style_flextable()
- Applies RUB theme to flextable object
-
theme_rub()
- Add RUB theme to ggplot object
-
rub_format_mixed()
- Format flextable mixed type columns (integer, percentages, NAs)
-
rub_format_percent()
- Format flextable columns with percentages (percentages, NAs)
-
rub_table_ab()
- Get formatted flextable of response rates for the Absolvent:innenbefragung
-
rub_table_eb()
- Get formatted flextable of response rates for the Eingangsbefragung
-
rub_table_excluded_programs()
- Get formatted flextable of excluded programs
-
rub_table_included_programs()
- Get formatted flextable of included programs
-
rub_table_item()
- Get formatted flextable of items with largest deviation from comparison group
-
rub_table_metrics()
- Get formatted flextable of metrics
-
rub_table_programs()
- Get formatted flextable of funded projects
-
rub_table_stg()
- Get formatted flextable of student cases
-
rub_table_vb()
- Get formatted flextable of response rates for the Verlaufsbefragung
Font functions
These functions load the RUB corporate design fonts RUB Flama and RUB Scala TZ. The package showtext
is used to make the fonts available to ggplot2
.
-
get_fallback_font_df()
- Get system dependent fallback font if a given font is not available
-
get_font_df()
- Get data frame of font information for a font file
-
register_font_df()
- Register font using
sysfonts::font_add
andsystemfonts::register_font
-
register_font_flama()
- Registers RUB Flama font to be used with the
showtext
andsystemfonts
packages
-
register_font_scala()
- Registers RUB Scala TZ font to be used with
showtext
andsystemfonts
packages
Data
Two data sets: df_example
containing algorithmically generated data to produce varying numbers of figures for each report and to place headings and subheadings dynamically. df_report
containing the meta data for each report, such as the file name or the report author.
-
df_example
- Example data set illustrating the use of the RUBer parameterized reporting package, containing the data to generate all figures.
-
df_report
- Example data set illustrating the use of the RUBer parameterized reporting package, containing the metadata for each report.