0

Trying to make a spaghetti plot with each subject having its own panel. Ex- if you have 10 ids in longitudinal data, your output will print 10 separate panels.

Tried referring to this https://rpubs.com/dgrtwo/spaghetti-ggplot2 , but I have 30 subjects so the blue observations would get overlapped by the other subjects. I'd prefer to have one single subject on each panel.

stat
  • 11
  • 4
    Welcome to SO, courtney! Questions on SO (especially in R) do much better if they are reproducible and self-contained. By that I mean including sample representative data (perhaps via `dput(head(x))` or building data programmatically (e.g., `data.frame(...)`), possibly stochastically), perhaps actual output (with verbatim errors/warnings) versus intended output. Refs: https://stackoverflow.com/q/5963269, [mcve], and https://stackoverflow.com/tags/r/info. – r2evans Feb 24 '23 at 19:20

0 Answers0