Vizualizing longitudinal data
plot_data(
data,
x_name = "age",
y_name = "y",
group_by = "id",
facet_by = NULL,
color_by = NULL,
highlight = NULL,
main = NULL,
sub = NULL
)
A data frame.
Name of x-axis variable.
Name of the y-axis variable.
Name of grouping variable (must be a factor).
Name of the faceting variable (must be a factor).
Name of coloring variable (must be a factor).
Value of category of the group_by
variable
that is highlighted. Can only be used if color_by
is NULL
.
main plot title
plot subtitle
a ggplot
object