1

So I have created a dataframe with data coming from a loop that runs several migration rates over a period of time and outputs number of people in several categories. However when I try plotting this the output is read as a single line instead of several seperate ones for different migration rates. What would be the easiest way to seperate these out?

Thanks!

Lisa
  • 11
  • 1
  • 2
    can you provide some sample data and a code snippet showing what you currently have? ([this post](https://stackoverflow.com/questions/5963269/how-to-make-a-great-r-reproducible-example) has some nice tips) – lefft Jul 06 '18 at 15:14
  • I'd create an 'indicator' or 'counter' column for your data that specifies which migration rate you're on. Then, when you plot it out in `ggplot2`, you can color by that indicator column. – A Duv Jul 06 '18 at 16:10

0 Answers0