<div dir="ltr"><div><div><div>O modelo está reclamando que não existe uma variável categorica no seu data.frame. pelo o que me parece esta seria a M, correto?<br><br></div>neste caso você pode converter A$M usando a rotina factor ou as.factor:<br><br></div>A$M <- as.factor(A$M)<br><br></div><div>Att.,<br></div><div><br></div>Dani<br></div><br><div class="gmail_quote"><div dir="ltr">Em ter, 28 de jun de 2016 às 10:44, Pedro Campelo via R-br <<a href="mailto:r-br@listas.c3sl.ufpr.br">r-br@listas.c3sl.ufpr.br</a>> escreveu:<br></div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div dir="ltr"><div class="gmail_default"><div class="gmail_default"><font face="monospace, monospace">Paulo, segue o código.</font></div><div class="gmail_default"><font face="monospace, monospace"><br></font></div><div class="gmail_default"><font face="monospace, monospace">Os dados estão no data.frame anterior</font></div><div class="gmail_default"><font face="monospace, monospace"><br></font></div><div class="gmail_default"><font face="monospace, monospace"><br></font></div><div class="gmail_default"><font face="monospace, monospace">#<b><i> Abrir pacote estatístico</i></b></font></div><div class="gmail_default"><font face="monospace, monospace"><b><i>require(agricolae)</i></b></font></div><div class="gmail_default"><font face="monospace, monospace"><b><i>require(ScottKnott)</i></b></font></div><div class="gmail_default"><font face="monospace, monospace"><b><i>require("ggplot2")</i></b></font></div><div class="gmail_default"><font face="monospace, monospace"><b><i>require("grid")</i></b></font></div><div class="gmail_default"><font face="monospace, monospace"><b><i>require("plyr")</i></b></font></div><div class="gmail_default"><font face="monospace, monospace"><b><i>require(reshape)</i></b></font></div><div class="gmail_default"><font face="monospace, monospace"><b><i>#Ler Dados</i></b></font></div><div class="gmail_default"><font face="monospace, monospace"><b><i>setwd("C:/Users/Pedro Campelo/Desktop")</i></b></font></div><div class="gmail_default"><font face="monospace, monospace"><b><i>A <- read.csv("C:/Users/Pedro Campelo/Desktop/A.csv", sep=";")</i></b></font></div><div class="gmail_default"><font face="monospace, monospace"><b><i><br></i></b></font></div><div class="gmail_default"><font face="monospace, monospace"><b><i>data.frame(A)</i></b></font></div></div></div><div dir="ltr"><div class="gmail_default"><div class="gmail_default"><font face="monospace, monospace"><b><i><br></i></b></font></div><div class="gmail_default"><font face="monospace, monospace"><b><i>#ANOVA One Way</i></b></font></div><div class="gmail_default"><font face="monospace, monospace"><b><i>av<-aov(R ~ M, data.frame(A))</i></b></font></div><div class="gmail_default"><font face="monospace, monospace"><b><i>summary(av)</i></b></font></div><div class="gmail_default"><font face="monospace, monospace"><b><i><br></i></b></font></div></div></div><div dir="ltr"><div class="gmail_default"><div class="gmail_default"><font face="monospace, monospace"><b><i>#Plotar boxplot</i></b></font></div><div class="gmail_default"><font face="monospace, monospace"><b><i>par(font.axis=2)</i></b></font></div><div class="gmail_default"><font face="monospace, monospace"><b><i>boxplot(R~M,data.frame(A), xlab=expression(bold("Material")), ylab=expression(bold("Value(%)")), col="lightgray")</i></b></font></div><div class="gmail_default"><font face="monospace, monospace"><b><i><br></i></b></font></div><div class="gmail_default"><font face="monospace, monospace"><b><i>#Teste de Duncan</i></b></font></div><div class="gmail_default"><font face="monospace, monospace"><b><i>comparison <- duncan.test(av, 'M')</i></b></font></div><div class="gmail_default"><font face="monospace, monospace"><b><i>duncan.test(av, 'M', alpha = 0.05, console = TRUE)</i></b></font></div></div></div><div dir="ltr"><div class="gmail_default"><div class="gmail_default"><font face="monospace, monospace"><b><i><br></i></b></font></div><div class="gmail_default"><font face="monospace, monospace"><b><i>#Teste de Scott Knott</i></b></font></div><div class="gmail_default"><font face="monospace, monospace"><b><i>sk <- SK(x=av, y=A$R, model='y~x', which='x', dispersion='se')</i></b></font></div><div class="gmail_default"><font face="monospace, monospace"><b><i><br></i></b></font></div><div class="gmail_default"><font face="monospace, monospace"><b><i>summary(sk)</i></b></font></div><div style="font-family:monospace,monospace"><br></div></div></div><div class="gmail_extra"><br clear="all"><div><div data-smartmail="gmail_signature"><div dir="ltr"><div><div dir="ltr"><div><div dir="ltr"><div><div dir="ltr"><div dir="ltr"><div dir="ltr"><div><b>----</b></div><b><div><b><br></b></div><font face="monospace, monospace">Pedro Henrique Campelo Felix</font></b><div><i><font face="monospace, monospace">Bachelor of Food Engineering (UNI-BH)</font></i></div><div><i><font face="monospace, monospace">Msc. Chemical Engineering (UFMG)</font></i></div><div><i><font face="monospace, monospace">PhD Student of Food Science (UFLA)</font></i></div><div><font face="monospace, monospace"><br></font></div><div><b><font face="monospace, monospace">+55 (31) 97560-1545 (TIM)</font></b><font size="1"><i><font face="monospace, monospace"><br></font></i><font size="2"><i><font face="monospace, monospace">"</font></i><span style="color:rgb(0,0,0);font-variant:normal;font-weight:normal;letter-spacing:normal;line-height:normal;text-indent:0px;text-transform:none;white-space:normal;word-spacing:0px;float:none;display:inline!important;background-color:rgb(255,255,255)"><i><font face="monospace, monospace">Nós somos aquilo que fazemos repetidamente. Excelência, então, não é um modo de agir, mas um hábito." Aristóteles</font></i><br></span></font></font></div></div></div></div></div></div></div></div></div></div></div></div>
<br></div><div class="gmail_extra"><div class="gmail_quote">Em 28 de junho de 2016 10:40, Paulo Dick <span dir="ltr"><<a href="mailto:paulopcdick@gmail.com" target="_blank">paulopcdick@gmail.com</a>></span> escreveu:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div dir="ltr">Pedro,<div>Forneça um código mais reproduzível para podermos auxiliar, incluindo libraries<br></div></div><div class="gmail_extra"><br clear="all"><div><div data-smartmail="gmail_signature"><div dir="ltr"><div><div dir="ltr"><div><div dir="ltr"><div><div dir="ltr"><b><br></b></div><div dir="ltr"><b>Paulo Dick</b><div>Estatístico</div><div>Mestre em Epidemiologia em Saúde Pública</div><div>Tel.: (55 21) 99591-2716</div></div></div></div></div></div></div></div></div></div>
<br><div class="gmail_quote"><div><div>2016-06-28 10:17 GMT-03:00 Pedro Campelo via R-br <span dir="ltr"><<a href="mailto:r-br@listas.c3sl.ufpr.br" target="_blank">r-br@listas.c3sl.ufpr.br</a>></span>:<br></div></div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div><div><div dir="ltr"><div class="gmail_default"><div class="gmail_default" style="font-family:monospace,monospace">Pessoal, </div><div class="gmail_default" style="font-family:monospace,monospace"><br></div><div class="gmail_default" style="font-family:monospace,monospace">Preciso de uma ajuda na execução desse script abaixo:</div><div class="gmail_default" style="font-family:monospace,monospace"><br></div><div class="gmail_default" style="font-family:monospace,monospace"><br></div><div class="gmail_default" style="font-family:monospace,monospace"><b><i>#Data.Frame</i></b></div><div class="gmail_default" style="font-family:monospace,monospace"><b><i><br></i></b></div><div class="gmail_default" style="font-family:monospace,monospace"><div class="gmail_default"><b><i>> data.frame(A)</i></b></div><div class="gmail_default"><b><i> M R</i></b></div><div class="gmail_default"><b><i>1 1 0.150</i></b></div><div class="gmail_default"><b><i>2 1 0.117</i></b></div><div class="gmail_default"><b><i>3 1 0.125</i></b></div><div class="gmail_default"><b><i>4 2 0.312</i></b></div><div class="gmail_default"><b><i>5 2 0.288</i></b></div><div class="gmail_default"><b><i>6 2 0.262</i></b></div><div class="gmail_default"><b><i>7 3 0.318</i></b></div><div class="gmail_default"><b><i>8 3 0.315</i></b></div><div class="gmail_default"><b><i>9 3 0.299</i></b></div><div class="gmail_default"><b><i>10 4 0.395</i></b></div><div class="gmail_default"><b><i>11 4 0.312</i></b></div><div class="gmail_default"><b><i>12 4 0.365</i></b></div></div><div class="gmail_default" style="font-family:monospace,monospace"><br></div><div class="gmail_default" style="font-family:monospace,monospace"><b><i>#ANOVA One Way</i></b></div><div class="gmail_default" style="font-family:monospace,monospace"><b><i>av<-aov(R ~ M, data.frame(A))</i></b></div><div class="gmail_default" style="font-family:monospace,monospace"><b><i>summary(av)</i></b></div><div class="gmail_default" style="font-family:monospace,monospace"><b><i><br></i></b></div><div class="gmail_default"><div class="gmail_default"><font face="monospace, monospace"><b><i>#Teste de Scott Knott</i></b></font></div><div class="gmail_default"><font face="monospace, monospace"><b><i>sk <- SK(x=av, y=A$R, model='y~x', which='x', dispersion='se')</i></b></font></div><div class="gmail_default"><font face="monospace, monospace"><b><i><br></i></b></font></div><div class="gmail_default"><font face="monospace, monospace"><b><i>summary(sk)</i></b></font></div><div class="gmail_default"><font face="monospace, monospace"><br></font></div><div class="gmail_default"><font face="monospace, monospace">Quando vou executar a rotina, aparece esta mensagem:</font></div><div class="gmail_default"><font face="monospace, monospace"><br></font></div><div class="gmail_default"><font face="monospace, monospace"><div class="gmail_default"><b><i>> sk <- SK(x=av, y=A$R, model='y~x', which='x', dispersion='se')</i></b></div><div class="gmail_default"><b><i>Error in SK.aov(x = av, y = A$R, model = "y~x", which = "x", dispersion = "se") : </i></b></div><div class="gmail_default"><b><i> No factors in the fitted model!</i></b></div><div class="gmail_default"><b><i>In addition: Warning message:</i></b></div><div class="gmail_default"><b><i>In replications(paste("~", xx), data = mf) : non-factors ignored: M</i></b></div><div class="gmail_default"><br></div><div class="gmail_default"><br></div></font></div><div class="gmail_default"><font face="monospace, monospace">Como poderia resolver isto?</font></div><div class="gmail_default"><font face="monospace, monospace"><br></font></div><div class="gmail_default"><font face="monospace, monospace">Obrigado</font></div><div class="gmail_default"><font face="monospace, monospace"><br></font></div></div></div><div><div data-smartmail="gmail_signature"><div dir="ltr"><div><div dir="ltr"><div><div dir="ltr"><div><div dir="ltr"><div dir="ltr"><div dir="ltr"><div><b>----</b></div><b><div><b><br></b></div><font face="monospace, monospace">Pedro Henrique Campelo Felix</font></b><div><i><font face="monospace, monospace">Bachelor of Food Engineering (UNI-BH)</font></i></div><div><i><font face="monospace, monospace">Msc. Chemical Engineering (UFMG)</font></i></div><div><i><font face="monospace, monospace">PhD Student of Food Science (UFLA)</font></i></div><div><font face="monospace, monospace"><br></font></div><div><b><font face="monospace, monospace"><a href="tel:%2B55%20%2831%29%2097560-1545" value="+5531975601545" target="_blank">+55 (31) 97560-1545</a> (TIM)</font></b><font size="1"><i><font face="monospace, monospace"><br></font></i><font size="2"><i><font face="monospace, monospace">"</font></i><span style="color:rgb(0,0,0);font-variant:normal;font-weight:normal;letter-spacing:normal;line-height:normal;text-indent:0px;text-transform:none;white-space:normal;word-spacing:0px;float:none;display:inline!important;background-color:rgb(255,255,255)"><i><font face="monospace, monospace">Nós somos aquilo que fazemos repetidamente. Excelência, então, não é um modo de agir, mas um hábito." Aristóteles</font></i><br></span></font></font></div></div></div></div></div></div></div></div></div></div></div></div>
</div>
<br></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><br></div>
</blockquote></div><br></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.</blockquote></div>