autoplot_exp | R Documentation |
Plot experience study results
## S3 method for class 'exp_df'
autoplot(
object,
...,
x = NULL,
y = NULL,
color = NULL,
mapping,
second_axis = FALSE,
second_y = NULL,
scales = "fixed",
geoms = c("lines", "bars", "points"),
y_labels = scales::label_percent(accuracy = 0.1),
second_y_labels = scales::label_comma(accuracy = 1),
y_log10 = FALSE,
conf_int_bars = FALSE
)
## S3 method for class 'trx_df'
autoplot(
object,
...,
x = NULL,
y = NULL,
color = NULL,
mapping,
second_axis = FALSE,
second_y = NULL,
scales = "fixed",
geoms = c("lines", "bars", "points"),
y_labels = scales::label_percent(accuracy = 0.1),
second_y_labels = scales::label_comma(accuracy = 1),
y_log10 = FALSE,
conf_int_bars = FALSE
)
object |
An object of class |
... |
Faceting variables passed to |
x |
An unquoted column name in |
y |
An unquoted column name in |
color |
An unquoted column name in |
mapping |
Aesthetic mapping passed to |
second_axis |
Logical. If |
second_y |
An unquoted column name in |
scales |
The |
geoms |
Type of geometry. If "lines" is passed, the plot will display lines and points. If "bars", the plot will display bars. If "points", the plot will display points only. |
y_labels |
Label function passed to |
second_y_labels |
Same as |
y_log10 |
If |
conf_int_bars |
If |
If no aesthetic map is supplied, the plot will use the first
grouping variable in object
on the x axis and q_obs
on the y
axis. In addition, the second grouping variable in object
will be
used for color and fill.
If no faceting variables are supplied, the plot will use grouping
variables 3 and up as facets. These variables are passed into
ggplot2::facet_wrap()
. Specific to trx_df
objects, transaction
type (trx_type
) will also be added as a faceting variable.
a ggplot
object
plot_termination_rates()
, plot_actual_to_expected()
study_py <- expose_py(census_dat, "2019-12-31", target_status = "Surrender")
study_py <- study_py |>
add_transactions(withdrawals)
exp_res <- study_py |> group_by(pol_yr) |> exp_stats()
autoplot(exp_res)
trx_res <- study_py |> group_by(pol_yr) |> trx_stats()
autoplot(trx_res)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.