Creates base ggplot2 object to be used by ggplot or ggiraph
Source:R/cas_show_barchart.R
cas_show_gg_base.Rd
Creates base ggplot2 object to be used by ggplot or ggiraph
Usage
cas_show_gg_base(
count_df,
group_by = date,
n_column_name = n,
pattern_column_name = pattern,
group_as_factor = FALSE,
font_base_size = 14
)
Arguments
- group_by
Defaults to NULL. If given, the unquoted name of the column to be used for grouping (e.g. date, or doc_id, or source, etc.)
- n_column_name
Defaults to 'n'. The unquoted name of the column to be used for the count in the output.
- pattern_column_name
Defaults to 'pattern'. The unquoted name of the column to be used for the word in the output.
- group_as_factor
Defaults to FALSE. If TRUE, the grouping column is forced into a factor, otherwise it is kept in its current format (e.g. date, or numeric).
Examples
cas_count(corpus = tifkremlinen::kremlin_en,
pattern = c("putin", "medvedev")) |>
cas_summarise(period = "year") |>
cas_show_gg_base() |>
cas_show_barchart_ggplot2(position = "dodge")