plot_sample | R Documentation |
Takes the output from generate()
or long_format()
, and plots distributions on numeric variables used in the generate pipeline (i.e. indepdent variables, controls), collapsed across conditions, relative to the underlying distribution. Alternatively, distributions of any specific numeric variables in the original dataframe can be queried.
plot_sample(df, include = "design", force = TRUE, id_col = "string")
df |
Output from |
include |
A character vector indicating which variables to include in the plot. This can be those specified by |
force |
Logical, should the function be forced to try and work if attributes are missing (default is |
id_col |
A character vector specifying the column identifying unique observations (e.g. in |
A ggplot object showing how conditions differ in independent variables, and are matched for in controls.
stim <- lexops |>
dplyr::filter(PK.Brysbaert >= .75) |>
split_by(BG.SUBTLEX_UK, 0.001:0.003 ~ 0.009:0.011) |>
split_by(CNC.Brysbaert, 1:2 ~ 4:5) |>
control_for(Zipf.SUBTLEX_UK, -0.2:0.2) |>
control_for(Length) |>
generate(n = 50, match_null = "balanced")
plot_sample(stim)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.