Using matplot in R whenever certain column changes
<p>Sorry in advance because I am new at asking questions here and don't know how to input this table properly.</p>

<p>Say I have a data frame in R constructed like:</p>

<pre><code>team = c("A", "A", "A", "B", "B", "B", "C", "C", "C") 

value = c(1, 2, 3, 4, 5, 6, 7, 8, 9)

m = cbind(team, value)
</code></pre>

<p>I want to create a plot that will give me 3 lines graphing the values for teams <code>A, B, and C.</code> I believe I can do this inputting the matrix m into <code>matplot</code> somehow, but I'm not sure how.</p>

<p>EDIT: I've gotten a lot closer to solving my problem. However I've realized that for some reason, with the code I have, "Value" is a list of 745 which matches the number of rows in my dataframe m. However when I unlist(Value) it turns into a numeric of length 894. Any ideas on why this would happen?</p>