plot_sequences | R Documentation |
Create a Sequence Index Plot or a Distribution Plot
plot_sequences(x, ...)
## S3 method for class 'tna'
plot_sequences(
x,
group,
type = "index",
scale = "proportion",
geom = "bar",
include_na = FALSE,
na_color = "white",
sort_by,
show_n = TRUE,
border,
title,
legend_title,
xlab,
ylab,
tick = 5,
ncol = 2L,
...
)
## S3 method for class 'tna_data'
plot_sequences(
x,
group,
type = "index",
scale = "proportion",
geom = "bar",
include_na = FALSE,
colors,
na_color = "white",
sort_by,
show_n = TRUE,
border,
title,
legend_title,
xlab,
ylab,
tick = 5,
ncol = 2L,
...
)
## Default S3 method:
plot_sequences(
x,
cols,
group,
type = "index",
scale = "proportion",
geom = "bar",
include_na = FALSE,
colors,
na_color = "white",
sort_by,
show_n = TRUE,
border,
title,
legend_title,
xlab,
ylab,
tick = 5,
ncol = 2L,
...
)
## S3 method for class 'group_tna'
plot_sequences(
x,
type = "index",
scale = "proportion",
geom = "bar",
include_na = FALSE,
na_color = "white",
sort_by,
show_n = TRUE,
border,
title,
legend_title,
xlab,
ylab,
tick = 1,
ncol = 2L,
...
)
x |
A |
... |
Ignored. |
group |
A vector indicating the group assignment of each
row of the data. Must have the same length as the
number of rows of |
type |
A |
scale |
A |
geom |
A |
include_na |
A |
na_color |
A |
sort_by |
Either a |
show_n |
A |
border |
A |
title |
An optional |
legend_title |
An optional |
xlab |
A |
ylab |
A |
tick |
An |
ncol |
Number of columns to use for the facets. The default is 2. |
colors |
A named |
cols |
A |
# Sequence index plot (default)
plot_sequences(
group_regulation,
group = rep(1:2, each = 1000),
)
# State distribution plot
plot_sequences(
group_regulation,
group = rep(1:2, each = 1000),
type = "distribution",
)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.