<div dir="ltr">Uma forma "mais automática" de fazer usando o pacote car, supondo seus dados no dataframe <font face="monospace">dat</font>.<div><br></div><div><font face="monospace">> library(car)<br></font></div><div><font face="monospace">> sp(quantidade ~ taxadecoleta, dat, groups=dat$especie)<br></font></div><div><br></div><div>HTH</div><div>--</div><div>Cesar Rabak</div></div><br><div class="gmail_quote"><div dir="ltr" class="gmail_attr">On Sun, Jan 19, 2020 at 4:22 PM Chiara Lubich por (R-br) <<a href="mailto:r-br@listas.c3sl.ufpr.br" target="_blank">r-br@listas.c3sl.ufpr.br</a>> wrote:<br></div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex"><div dir="ltr"><div class="gmail_default" style="font-family:tahoma,sans-serif"><div class="gmail_default">Oi, gente</div><div class="gmail_default">Estou com dificuldades para realizar a junção de gráficos de linha em apenas um. </div><div class="gmail_default">Minha tabela está da seguinte forma:</div><div class="gmail_default"><table border="0" cellpadding="0" cellspacing="0" width="227" style="border-collapse:collapse;width:170pt"><colgroup><col width="99" style="width:74pt"><col width="64" span="2" style="width:48pt"></colgroup><tbody><tr height="20" style="height:15pt"><td height="20" width="99" style="font-family:Calibri,sans-serif;height:15pt;width:74pt;padding:0px;color:black;font-size:11pt;vertical-align:bottom;border:none;white-space:nowrap">taxadecoleta</td><td width="64" style="font-family:Calibri,sans-serif;width:48pt;padding:0px;color:black;font-size:11pt;vertical-align:bottom;border:none;white-space:nowrap">quantidade </td><td width="64" style="font-family:Calibri,sans-serif;width:48pt;padding:0px;color:black;font-size:11pt;vertical-align:bottom;border:none;white-space:nowrap">especie</td></tr><tr height="20" style="height:15pt"><td height="20" style="font-family:Calibri,sans-serif;height:15pt;text-align:center;vertical-align:middle;padding:0px;color:black;font-size:11pt;border:none;white-space:nowrap">0.000</td><td style="font-family:Calibri,sans-serif;text-align:center;vertical-align:middle;padding:0px;color:black;font-size:11pt;border:none;white-space:nowrap">81.873</td><td style="font-family:Calibri,sans-serif;padding:0px;color:black;font-size:11pt;vertical-align:bottom;border:none;white-space:nowrap">m</td></tr><tr height="20" style="height:15pt"><td height="20" style="font-family:Calibri,sans-serif;height:15pt;text-align:center;vertical-align:middle;padding:0px;color:black;font-size:11pt;border:none;white-space:nowrap">0.050</td><td style="font-family:Calibri,sans-serif;text-align:center;padding:0px;color:black;font-size:11pt;vertical-align:bottom;border:none;white-space:nowrap">77.880</td><td style="font-family:Calibri,sans-serif;padding:0px;color:black;font-size:11pt;vertical-align:bottom;border:none;white-space:nowrap">m</td></tr><tr height="20" style="height:15pt"><td height="20" style="font-family:Calibri,sans-serif;height:15pt;text-align:center;vertical-align:middle;padding:0px;color:black;font-size:11pt;border:none;white-space:nowrap">0.100</td><td style="font-family:Calibri,sans-serif;text-align:center;padding:0px;color:black;font-size:11pt;vertical-align:bottom;border:none;white-space:nowrap">74.082</td><td style="font-family:Calibri,sans-serif;padding:0px;color:black;font-size:11pt;vertical-align:bottom;border:none;white-space:nowrap">m</td></tr><tr height="20" style="height:15pt"><td height="20" style="font-family:Calibri,sans-serif;height:15pt;text-align:center;vertical-align:middle;padding:0px;color:black;font-size:11pt;border:none;white-space:nowrap">0.150</td><td style="font-family:Calibri,sans-serif;text-align:center;padding:0px;color:black;font-size:11pt;vertical-align:bottom;border:none;white-space:nowrap">70.469</td><td style="font-family:Calibri,sans-serif;padding:0px;color:black;font-size:11pt;vertical-align:bottom;border:none;white-space:nowrap">m</td></tr><tr height="20" style="height:15pt"><td height="20" style="font-family:Calibri,sans-serif;height:15pt;text-align:center;vertical-align:middle;padding:0px;color:black;font-size:11pt;border:none;white-space:nowrap">0.200</td><td style="font-family:Calibri,sans-serif;text-align:center;padding:0px;color:black;font-size:11pt;vertical-align:bottom;border:none;white-space:nowrap">67.032</td><td style="font-family:Calibri,sans-serif;padding:0px;color:black;font-size:11pt;vertical-align:bottom;border:none;white-space:nowrap">m</td></tr><tr height="20" style="height:15pt"><td height="20" style="font-family:Calibri,sans-serif;height:15pt;text-align:center;vertical-align:middle;padding:0px;color:black;font-size:11pt;border:none;white-space:nowrap">0.000</td><td style="font-family:Calibri,sans-serif;text-align:center;padding:0px;color:black;font-size:11pt;vertical-align:bottom;border:none;white-space:nowrap">67.032</td><td style="font-family:Calibri,sans-serif;padding:0px;color:black;font-size:11pt;vertical-align:bottom;border:none;white-space:nowrap">mo</td></tr><tr height="20" style="height:15pt"><td height="20" style="font-family:Calibri,sans-serif;height:15pt;text-align:center;vertical-align:middle;padding:0px;color:black;font-size:11pt;border:none;white-space:nowrap">0.050</td><td style="font-family:Calibri,sans-serif;text-align:center;padding:0px;color:black;font-size:11pt;vertical-align:bottom;border:none;white-space:nowrap">63.763</td><td style="font-family:Calibri,sans-serif;padding:0px;color:black;font-size:11pt;vertical-align:bottom;border:none;white-space:nowrap">mo</td></tr><tr height="20" style="height:15pt"><td height="20" style="font-family:Calibri,sans-serif;height:15pt;text-align:center;vertical-align:middle;padding:0px;color:black;font-size:11pt;border:none;white-space:nowrap">0.100</td><td style="font-family:Calibri,sans-serif;text-align:center;padding:0px;color:black;font-size:11pt;vertical-align:bottom;border:none;white-space:nowrap">60.653</td><td style="font-family:Calibri,sans-serif;padding:0px;color:black;font-size:11pt;vertical-align:bottom;border:none;white-space:nowrap">mo</td></tr><tr height="20" style="height:15pt"><td height="20" style="font-family:Calibri,sans-serif;height:15pt;text-align:center;vertical-align:middle;padding:0px;color:black;font-size:11pt;border:none;white-space:nowrap">0.150</td><td style="font-family:Calibri,sans-serif;text-align:center;padding:0px;color:black;font-size:11pt;vertical-align:bottom;border:none;white-space:nowrap">57.695</td><td style="font-family:Calibri,sans-serif;padding:0px;color:black;font-size:11pt;vertical-align:bottom;border:none;white-space:nowrap">mo</td></tr><tr height="20" style="height:15pt"><td height="20" style="font-family:Calibri,sans-serif;height:15pt;text-align:center;vertical-align:middle;padding:0px;color:black;font-size:11pt;border:none;white-space:nowrap">0.200</td><td style="font-family:Calibri,sans-serif;text-align:center;padding:0px;color:black;font-size:11pt;vertical-align:bottom;border:none;white-space:nowrap">54.881</td><td style="font-family:Calibri,sans-serif;padding:0px;color:black;font-size:11pt;vertical-align:bottom;border:none;white-space:nowrap">mo</td></tr><tr height="20" style="height:15pt"><td height="20" style="font-family:Calibri,sans-serif;height:15pt;text-align:center;vertical-align:middle;padding:0px;color:black;font-size:11pt;border:none;white-space:nowrap">0.250</td><td style="font-family:Calibri,sans-serif;text-align:center;padding:0px;color:black;font-size:11pt;vertical-align:bottom;border:none;white-space:nowrap">52.205</td><td style="font-family:Calibri,sans-serif;padding:0px;color:black;font-size:11pt;vertical-align:bottom;border:none;white-space:nowrap">mo</td></tr><tr height="20" style="height:15pt"><td height="20" style="font-family:Calibri,sans-serif;height:15pt;text-align:center;padding:0px;color:black;font-size:11pt;vertical-align:bottom;border:none;white-space:nowrap">0.300</td><td style="font-family:Calibri,sans-serif;text-align:center;padding:0px;color:black;font-size:11pt;vertical-align:bottom;border:none;white-space:nowrap">49.659</td><td style="font-family:Calibri,sans-serif;padding:0px;color:black;font-size:11pt;vertical-align:bottom;border:none;white-space:nowrap">mo</td></tr><tr height="20" style="height:15pt"><td height="20" style="font-family:Calibri,sans-serif;height:15pt;text-align:center;padding:0px;color:black;font-size:11pt;vertical-align:bottom;border:none;white-space:nowrap">0.350</td><td style="font-family:Calibri,sans-serif;text-align:center;padding:0px;color:black;font-size:11pt;vertical-align:bottom;border:none;white-space:nowrap">47.237</td><td style="font-family:Calibri,sans-serif;padding:0px;color:black;font-size:11pt;vertical-align:bottom;border:none;white-space:nowrap">mo</td></tr><tr height="20" style="height:15pt"><td height="20" style="font-family:Calibri,sans-serif;height:15pt;text-align:center;padding:0px;color:black;font-size:11pt;vertical-align:bottom;border:none;white-space:nowrap">0.400</td><td style="font-family:Calibri,sans-serif;text-align:center;padding:0px;color:black;font-size:11pt;vertical-align:bottom;border:none;white-space:nowrap">44.933</td><td style="font-family:Calibri,sans-serif;padding:0px;color:black;font-size:11pt;vertical-align:bottom;border:none;white-space:nowrap">mo</td></tr><tr height="20" style="height:15pt"><td height="20" style="font-family:Calibri,sans-serif;height:15pt;text-align:center;vertical-align:middle;padding:0px;color:black;font-size:11pt;border:none;white-space:nowrap">0.000</td><td style="font-family:Calibri,sans-serif;text-align:center;padding:0px;color:black;font-size:11pt;vertical-align:bottom;border:none;white-space:nowrap">54.881</td><td style="font-family:Calibri,sans-serif;padding:0px;color:black;font-size:11pt;vertical-align:bottom;border:none;white-space:nowrap">mor</td></tr><tr height="20" style="height:15pt"><td height="20" style="font-family:Calibri,sans-serif;height:15pt;text-align:center;vertical-align:middle;padding:0px;color:black;font-size:11pt;border:none;white-space:nowrap">0.050</td><td style="font-family:Calibri,sans-serif;text-align:center;padding:0px;color:black;font-size:11pt;vertical-align:bottom;border:none;white-space:nowrap">52.205</td><td style="font-family:Calibri,sans-serif;padding:0px;color:black;font-size:11pt;vertical-align:bottom;border:none;white-space:nowrap">mor</td></tr><tr height="20" style="height:15pt"><td height="20" style="font-family:Calibri,sans-serif;height:15pt;text-align:center;vertical-align:middle;padding:0px;color:black;font-size:11pt;border:none;white-space:nowrap">0.100</td><td style="font-family:Calibri,sans-serif;text-align:center;padding:0px;color:black;font-size:11pt;vertical-align:bottom;border:none;white-space:nowrap">49.659</td><td style="font-family:Calibri,sans-serif;padding:0px;color:black;font-size:11pt;vertical-align:bottom;border:none;white-space:nowrap">mor</td></tr><tr height="20" style="height:15pt"><td height="20" style="font-family:Calibri,sans-serif;height:15pt;text-align:center;vertical-align:middle;padding:0px;color:black;font-size:11pt;border:none;white-space:nowrap">0.150</td><td style="font-family:Calibri,sans-serif;text-align:center;padding:0px;color:black;font-size:11pt;vertical-align:bottom;border:none;white-space:nowrap">47.237</td><td style="font-family:Calibri,sans-serif;padding:0px;color:black;font-size:11pt;vertical-align:bottom;border:none;white-space:nowrap">mor</td></tr></tbody></table></div><div style="font-family:Arial,Helvetica,sans-serif"><div class="gmail_default" style="font-family:tahoma,sans-serif">Porém quando vou gerar o gráfico no r com esse comando abaixo:</div><div class="gmail_default" style="font-family:tahoma,sans-serif">> plot(taxadecoleta, quantidade, col=especie, ylim=c(0,100), t="l", xlim=c(0,4), xlab = "Coleta", ylab = "Quantidade")</div><div class="gmail_default" style="font-family:tahoma,sans-serif"><br></div><div class="gmail_default" style="font-family:tahoma,sans-serif">O gráfico não fica da forma que eu gostaria, ele fica da seguinte forma:</div><div class="gmail_default" style="font-family:tahoma,sans-serif"><b>Ele junta todas as linhas, formando uma só! :(</b></div><div class="gmail_default" style="font-family:tahoma,sans-serif"><b></b></div><div><img src="cid:ii_k5leblrk0" alt="image.png" width="404" height="367" style="outline: 0px;"><br></div><div class="gmail_default" style="font-family:tahoma,sans-serif"></div><div class="gmail_default" style="font-family:tahoma,sans-serif">O máximo que consegui foi esse gráfico de pontos abaixo, porém eu precisava que fosse em linha em diferente cores como o da figura abaixo.</div><div class="gmail_default" style="font-family:tahoma,sans-serif"><div><img src="cid:ii_k5lecpv51" alt="image.png" width="404" height="367" style="outline: 0px;"></div></div></div></div><div><div class="gmail_default" style="font-family:tahoma,sans-serif"><br></div></div><div class="gmail_default" style="font-family:tahoma,sans-serif"><font color="#000000"><span style="background-color:rgb(243,243,243)">Agradeço desde já</span></font></div><div class="gmail_default" style="font-family:tahoma,sans-serif"><font color="#000000"><span style="background-color:rgb(243,243,243)">Abraço </span></font></div><div class="gmail_default" style="font-family:tahoma,sans-serif"><font color="#000000"><span style="background-color:rgb(243,243,243)"><br></span></font></div><div class="gmail_default" style="font-family:tahoma,sans-serif"><font color="#000000"><span style="background-color:rgb(243,243,243)">Att., </span></font></div><div class="gmail_default" style="font-family:tahoma,sans-serif"><font color="#000000"><span style="background-color:rgb(243,243,243)">Chiara Lubich</span></font></div><div dir="ltr"><div dir="ltr"><div dir="ltr"><div style="line-height:21.3px"></div></div></div></div></div>
_______________________________________________<br>
R-br mailing list<br>
<a href="mailto:R-br@listas.c3sl.ufpr.br" target="_blank">R-br@listas.c3sl.ufpr.br</a><br>
<a href="https://listas.inf.ufpr.br/cgi-bin/mailman/listinfo/r-br" rel="noreferrer" target="_blank">https://listas.inf.ufpr.br/cgi-bin/mailman/listinfo/r-br</a><br>
Leia o guia de postagem (<a href="http://www.leg.ufpr.br/r-br-guia" rel="noreferrer" target="_blank">http://www.leg.ufpr.br/r-br-guia</a>) e forneça código mínimo reproduzível.<br>
</blockquote></div>