| ind_plots_sample | R Documentation |
A wrapper around ind_plots that first draws a
sample of n individuals (9 by default, enough to fill a 3x3 page)
rather than plotting every individual in the dataset. If stratify is
provided, the sample is drawn proportionally from each level (or
combination of levels) of the tidyselect-ed column(s), so the sample
remains as representative as the data and n allow.
ind_plots_sample(
xpdb,
n = 9,
stratify = NULL,
seed = NULL,
facets,
.problem,
quiet,
...
)
xpdb |
< |
n |
< |
stratify |
< |
seed |
< |
facets |
As in |
.problem |
< |
quiet |
< |
... |
Passed on to |
When stratify is used, the stratifying column(s) are appended to the
facet formula (in addition to the id column that ind_plots
already facets by), so that the stratum each sampled individual belongs
to is visible in the plot.
Stratified sample sizes are allocated proportionally to stratum size
using the largest-remainder method, so the total sampled always equals
min(n, sum(individuals available across all strata)).
The desired plot
ind_roc()
xpdb_x %>% ind_plots_sample(n = 6)
xpdb_x %>% ind_plots_sample(n = 6, stratify = SEX)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.