Leandro tente, <div>table(cut(x, c(-Inf, 2, 6, 8, 9, Inf), labels = sprintf("Tipo %s", 1:5)))<br><div><br><div class="gmail_quote">2011/8/24 Leandro Marino <span dir="ltr"><<a href="mailto:leandro@cesgranrio.org.br">leandro@cesgranrio.org.br</a>></span><br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex;">
<u></u>
<u></u>
<div bgcolor="white" background="cid:image001.jpg@01CC624C.D019CC90" lang="PT-BR" link="blue" vlink="purple" style="margin-left:37.5pt;margin-top:15.0pt">
<img src="cid:image001.jpg@01CC624C.D019CC90" width="0" height="0" style="width:0;min-height:0">
<div>
<p class="MsoNormal"><span style="font-size:10.0pt;color:#006666">Caros,<u></u><u></u></span></p>
<p class="MsoNormal"><span style="font-size:10.0pt;color:#006666">Em algum ponto do tempo houve uma mudança na função factor.<u></u><u></u></span></p>
<p class="MsoNormal" style="margin:0cm;margin-bottom:.0001pt"><span style="font-size:10.0pt;font-family:Consolas;color:#006666">### no passado:<u></u><u></u></span></p>
<p class="MsoNormal" style="margin:0cm;margin-bottom:.0001pt"><b><span style="font-size:10.0pt;font-family:Consolas;color:#548DD4">R.version<u></u><u></u></span></b></p>
<p class="MsoNormal" style="margin:0cm;margin-bottom:.0001pt"><span lang="EN-US" style="font-size:10.0pt;font-family:Consolas;color:#006666">#</span><span style="font-size:10.0pt;font-family:Consolas;color:#006666">
_ <u></u><u></u></span></p>
<p class="MsoNormal" style="margin:0cm;margin-bottom:.0001pt"><span lang="EN-US" style="font-size:10.0pt;font-family:Consolas;color:#006666">#platform
i386-pc-mingw32 <u></u><u></u></span></p>
<p class="MsoNormal" style="margin:0cm;margin-bottom:.0001pt"><span lang="EN-US" style="font-size:10.0pt;font-family:Consolas;color:#006666">#arch
i386 <u></u><u></u></span></p>
<p class="MsoNormal" style="margin:0cm;margin-bottom:.0001pt"><span lang="EN-US" style="font-size:10.0pt;font-family:Consolas;color:#006666">#os
mingw32 <u></u><u></u></span></p>
<p class="MsoNormal" style="margin:0cm;margin-bottom:.0001pt"><span lang="EN-US" style="font-size:10.0pt;font-family:Consolas;color:#006666">#system
i386, mingw32 <u></u><u></u></span></p>
<p class="MsoNormal" style="margin:0cm;margin-bottom:.0001pt"><span lang="EN-US" style="font-size:10.0pt;font-family:Consolas;color:#006666">#status
<u></u><u></u></span></p>
<p class="MsoNormal" style="margin:0cm;margin-bottom:.0001pt"><span lang="EN-US" style="font-size:10.0pt;font-family:Consolas;color:#006666">#major
2 <u></u><u></u></span></p>
<p class="MsoNormal" style="margin:0cm;margin-bottom:.0001pt"><span lang="EN-US" style="font-size:10.0pt;font-family:Consolas;color:#006666">#minor
9.0 <u></u><u></u></span></p>
<p class="MsoNormal" style="margin:0cm;margin-bottom:.0001pt"><span lang="EN-US" style="font-size:10.0pt;font-family:Consolas;color:#006666">#year
2009 <u></u><u></u></span></p>
<p class="MsoNormal" style="margin:0cm;margin-bottom:.0001pt"><span lang="EN-US" style="font-size:10.0pt;font-family:Consolas;color:#006666">#month
04 <u></u><u></u></span></p>
<p class="MsoNormal" style="margin:0cm;margin-bottom:.0001pt"><span lang="EN-US" style="font-size:10.0pt;font-family:Consolas;color:#006666">#day
17 <u></u><u></u></span></p>
<p class="MsoNormal" style="margin:0cm;margin-bottom:.0001pt"><span lang="EN-US" style="font-size:10.0pt;font-family:Consolas;color:#006666">#svn rev
48333 <u></u><u></u></span></p>
<p class="MsoNormal" style="margin:0cm;margin-bottom:.0001pt"><span lang="EN-US" style="font-size:10.0pt;font-family:Consolas;color:#006666">#language
R <u></u><u></u></span></p>
<p class="MsoNormal" style="margin:0cm;margin-bottom:.0001pt"><span lang="EN-US" style="font-size:10.0pt;font-family:Consolas;color:#006666">#version.string R
version 2.9.0 (2009-04-17)<u></u><u></u></span></p>
<p class="MsoNormal" style="margin:0cm;margin-bottom:.0001pt"><b><span lang="EN-US" style="font-size:10.0pt;font-family:Consolas;color:#548DD4">set.seed(1)<u></u><u></u></span></b></p>
<p class="MsoNormal" style="margin:0cm;margin-bottom:.0001pt"><b><span lang="EN-US" style="font-size:10.0pt;font-family:Consolas;color:#548DD4">x <-
round(runif(150,0,10),0)<u></u><u></u></span></b></p>
<p class="MsoNormal" style="margin:0cm;margin-bottom:.0001pt"><b><span lang="EN-US" style="font-size:10.0pt;font-family:Consolas;color:#548DD4">table(x)<u></u><u></u></span></b></p>
<p class="MsoNormal" style="margin:0cm;margin-bottom:.0001pt"><span lang="EN-US" style="font-size:10.0pt;font-family:Consolas;color:#006666">#x<u></u><u></u></span></p>
<p class="MsoNormal" style="margin:0cm;margin-bottom:.0001pt"><span lang="EN-US" style="font-size:10.0pt;font-family:Consolas;color:#006666"># 0 1 2 3 4 5
6 7 8 9 10 <u></u><u></u></span></p>
<p class="MsoNormal" style="margin:0cm;margin-bottom:.0001pt"><span lang="EN-US" style="font-size:10.0pt;font-family:Consolas;color:#006666"># 4 14 15 13 16 19
16 18 15 14 6 <u></u><u></u></span></p>
<p class="MsoNormal" style="margin:0cm;margin-bottom:.0001pt"><b><span lang="EN-US" style="font-size:10.0pt;font-family:Consolas;color:#548DD4">table(as.character(factor(x,levels=c(0:10),labels=c(rep('Tipo
1',3),<u></u><u></u></span></b></p>
<p class="MsoNormal" style="margin:0cm;margin-bottom:.0001pt"><b><span style="font-size:10.0pt;font-family:Consolas;color:#548DD4"> rep('Tipo
2',4),rep('Tipo 3',2),'Tipo 4','Tipo 5'))))<u></u><u></u></span></b></p>
<p class="MsoNormal" style="margin:0cm;margin-bottom:.0001pt"><span style="font-size:10.0pt;font-family:Consolas;color:#006666">#Tipo 1 Tipo 2 Tipo
3 Tipo 4 Tipo 5 <u></u><u></u></span></p>
<p class="MsoNormal" style="margin:0cm;margin-bottom:.0001pt"><span lang="EN-US" style="font-size:10.0pt;font-family:Consolas;color:#006666"># 33 64
33 14 6</span><span lang="EN-US" style="font-size:11.0pt;font-family:Consolas;color:#404040"><u></u><u></u></span></p>
<p class="MsoNormal" style="margin:0cm;margin-bottom:.0001pt;text-align:justify"><span lang="EN-US" style="font-size:11.0pt;font-family:Consolas;color:#404040"><u></u> <u></u></span></p>
<p class="MsoNormal" style="margin:0cm;margin-bottom:.0001pt;text-align:justify"><span lang="EN-US" style="font-size:11.0pt;font-family:Consolas;color:#404040">R.version<u></u><u></u></span></p>
<p class="MsoNormal" style="margin:0cm;margin-bottom:.0001pt;text-align:justify"><span lang="EN-US" style="font-size:11.0pt;font-family:Consolas;color:#404040">#
_ <u></u><u></u></span></p>
<p class="MsoNormal" style="margin:0cm;margin-bottom:.0001pt;text-align:justify"><span lang="EN-US" style="font-size:11.0pt;font-family:Consolas;color:#404040">#platform
i386-pc-mingw32 <u></u><u></u></span></p>
<p class="MsoNormal" style="margin:0cm;margin-bottom:.0001pt;text-align:justify"><span lang="EN-US" style="font-size:11.0pt;font-family:Consolas;color:#404040">#arch
i386 <u></u><u></u></span></p>
<p class="MsoNormal" style="margin:0cm;margin-bottom:.0001pt;text-align:justify"><span lang="EN-US" style="font-size:11.0pt;font-family:Consolas;color:#404040">#os
mingw32 <u></u><u></u></span></p>
<p class="MsoNormal" style="margin:0cm;margin-bottom:.0001pt;text-align:justify"><span lang="EN-US" style="font-size:11.0pt;font-family:Consolas;color:#404040">#system
i386, mingw32 <u></u><u></u></span></p>
<p class="MsoNormal" style="margin:0cm;margin-bottom:.0001pt;text-align:justify"><span lang="EN-US" style="font-size:11.0pt;font-family:Consolas;color:#404040">#status
<u></u><u></u></span></p>
<p class="MsoNormal" style="margin:0cm;margin-bottom:.0001pt;text-align:justify"><span lang="EN-US" style="font-size:11.0pt;font-family:Consolas;color:#404040">#major
2 <u></u><u></u></span></p>
<p class="MsoNormal" style="margin:0cm;margin-bottom:.0001pt;text-align:justify"><span lang="EN-US" style="font-size:11.0pt;font-family:Consolas;color:#404040">#minor
13.1 <u></u><u></u></span></p>
<p class="MsoNormal" style="margin:0cm;margin-bottom:.0001pt;text-align:justify"><span lang="EN-US" style="font-size:11.0pt;font-family:Consolas;color:#404040">#year
2011 <u></u><u></u></span></p>
<p class="MsoNormal" style="margin:0cm;margin-bottom:.0001pt;text-align:justify"><span lang="EN-US" style="font-size:11.0pt;font-family:Consolas;color:#404040">#month
07 <u></u><u></u></span></p>
<p class="MsoNormal" style="margin:0cm;margin-bottom:.0001pt;text-align:justify"><span lang="EN-US" style="font-size:11.0pt;font-family:Consolas;color:#404040">#day
08 <u></u><u></u></span></p>
<p class="MsoNormal" style="margin:0cm;margin-bottom:.0001pt;text-align:justify"><span lang="EN-US" style="font-size:11.0pt;font-family:Consolas;color:#404040">#svn
rev 56322 <u></u><u></u></span></p>
<p class="MsoNormal" style="margin:0cm;margin-bottom:.0001pt;text-align:justify"><span lang="EN-US" style="font-size:11.0pt;font-family:Consolas;color:#404040">#language
R <u></u><u></u></span></p>
<p class="MsoNormal" style="margin:0cm;margin-bottom:.0001pt;text-align:justify"><span lang="EN-US" style="font-size:11.0pt;font-family:Consolas;color:#404040">#version.string
R version 2.13.1 (2011-07-08)<u></u><u></u></span></p>
<p class="MsoNormal" style="margin:0cm;margin-bottom:.0001pt;text-align:justify"><span lang="EN-US" style="font-size:11.0pt;font-family:Consolas;color:#404040">set.seed(1)<u></u><u></u></span></p>
<p class="MsoNormal" style="margin:0cm;margin-bottom:.0001pt;text-align:justify"><span lang="EN-US" style="font-size:11.0pt;font-family:Consolas;color:#404040">x <-
round(runif(150,0,10),0)<u></u><u></u></span></p>
<p class="MsoNormal" style="margin:0cm;margin-bottom:.0001pt;text-align:justify"><span lang="EN-US" style="font-size:11.0pt;font-family:Consolas;color:#404040">table(x)<u></u><u></u></span></p>
<p class="MsoNormal" style="margin:0cm;margin-bottom:.0001pt;text-align:justify"><span lang="EN-US" style="font-size:11.0pt;font-family:Consolas;color:#404040">#x<u></u><u></u></span></p>
<p class="MsoNormal" style="margin:0cm;margin-bottom:.0001pt;text-align:justify"><span lang="EN-US" style="font-size:11.0pt;font-family:Consolas;color:#404040"># 0 1
2 3 4 5 6 7 8 9 10 <u></u><u></u></span></p>
<p class="MsoNormal" style="margin:0cm;margin-bottom:.0001pt;text-align:justify"><span lang="EN-US" style="font-size:11.0pt;font-family:Consolas;color:#404040"># 4 14
15 13 16 19 16 18 15 14 6 <u></u><u></u></span></p>
<p class="MsoNormal" style="margin:0cm;margin-bottom:.0001pt;text-align:justify"><span lang="EN-US" style="font-size:11.0pt;font-family:Consolas;color:#404040">table(as.character(factor(x,levels=c(0:10),labels=c(rep('Tipo
1',3),<u></u><u></u></span></p>
<p class="MsoNormal" style="margin:0cm;margin-bottom:.0001pt;text-align:justify"><span style="font-size:11.0pt;font-family:Consolas;color:#404040"> rep('Tipo
2',4),rep('Tipo 3',2),'Tipo 4','Tipo 5'))))<u></u><u></u></span></p>
<p class="MsoNormal" style="margin:0cm;margin-bottom:.0001pt;text-align:justify"><span style="font-size:11.0pt;font-family:Consolas;color:#404040">#<u></u><u></u></span></p>
<p class="MsoNormal" style="margin:0cm;margin-bottom:.0001pt;text-align:justify"><span style="font-size:11.0pt;font-family:Consolas;color:#404040">#Tipo 1 Tipo 2 Tipo
3 Tipo 4 Tipo 5 <u></u><u></u></span></p>
<p class="MsoNormal" style="margin:0cm;margin-bottom:.0001pt;text-align:justify"><span style="font-size:11.0pt;font-family:Consolas;color:#404040"># 33 64
33 14 6 <u></u><u></u></span></p>
<p class="MsoNormal" style="margin:0cm;margin-bottom:.0001pt;text-align:justify"><span style="font-size:11.0pt;font-family:Consolas;color:#404040">#Mensagens de aviso
perdidas:<u></u><u></u></span></p>
<p class="MsoNormal" style="margin:0cm;margin-bottom:.0001pt;text-align:justify"><span style="font-size:11.0pt;font-family:Consolas;color:#404040">#In
`levels<-`(`*tmp*`, value = c("Tipo 1", "Tipo 1",
"Tipo 1", "Tipo 2", :<u></u><u></u></span></p>
<p class="MsoNormal" style="margin:0cm;margin-bottom:.0001pt;text-align:justify"><span style="font-size:11.0pt;font-family:Consolas;color:#404040"># não se permite
mais níveis duplicados em fatores<u></u><u></u></span></p>
<div>
<p class="MsoNormal"><span style="color:black">Ele até faz mas com mensagem de erro. Como poderia fazer isto sem
ter o erro!?<u></u><u></u></span></p>
<p class="MsoNormal"><span style="color:black"><u></u> <u></u></span></p>
<p class="MsoNormal"><span style="color:black"> <u></u><u></u></span></p>
<p class="MsoNormal"><span style="color:black">Atenciosamente,<br>
</span><b><span style="font-size:11.0pt;color:#000040">Leandro Lins Marino</span></b><b><span style="font-size:10.0pt;color:#000040"><br>
</span></b><i><span style="font-size:10.0pt;color:gray">Centro de Avaliação</span></i><i><span style="font-size:10.0pt;color:gray"><br>
</span></i><i><span style="font-size:10.0pt;color:gray">Fundação CESGRANRIO</span></i><i><span style="font-size:10.0pt;color:gray"><br>
</span></i><i><span style="font-size:10.0pt;color:gray">Rua Santa Alexandrina, 1011 - 2º andar</span></i><i><span style="font-size:10.0pt;color:gray"><br>
</span></i><i><span style="font-size:10.0pt;color:gray">Rio de Janeiro, RJ - CEP: 20261-903</span></i><i><span style="font-size:10.0pt;color:gray"><br>
</span></i><i><span style="font-size:10.0pt;font-family:Wingdings;color:gray">(</span></i><i><span style="font-size:10.0pt;color:gray"> </span></i><i><span style="font-size:10.0pt;color:gray">(21)
2103-9600 R.:236 </span></i><i><span style="font-size:10.0pt;color:gray"><br>
</span></i><i><span style="font-size:11.0pt;font-family:Wingdings;color:gray">*</span></i><i><span style="font-size:11.0pt;color:gray"> <a href="mailto:leandro@cesgranrio.org.br" target="_blank"><span style="color:blue">leandro@cesgranrio.org.br</span></a><u></u><u></u></span></i></p>
<p class="MsoNormal" style="margin:0cm;margin-bottom:.0001pt"><span style="font-size:10.0pt;color:#006666"><u></u> <u></u></span></p>
<p class="MsoNormal" style="margin:0cm;margin-bottom:.0001pt"><span style="font-size:18.0pt;font-family:Webdings;color:#76923C">P</span><b><span style="font-size:7.5pt;font-family:"Palatino Linotype","serif";color:#76923C">
</span></b><b><span style="font-size:9.0pt;color:#76923C">Antes de imprimir</span></b><span style="font-size:9.0pt;color:#76923C"> </span><b><span style="font-size:9.0pt;color:#76923C">pense
em sua responsabilidade e compromisso com o</span></b><span style="font-size:9.0pt;color:#76923C"> <b>MEIO AMBIENTE</b></span><span style="font-size:10.0pt;color:#006666"> <u></u><u></u></span></p>
<p class="MsoNormal" style="margin:0cm;margin-bottom:.0001pt"><span style="font-size:10.0pt;color:#006666"><u></u> <u></u></span></p>
<p class="MsoNormal" style="margin:0cm;margin-bottom:.0001pt"><span style="font-size:10.5pt;font-family:Consolas;color:#404040">Esta mensagem,
incluindo seus anexos, pode conter informacoes privilegiadas e/ou de carater
confidencial, nao podendo ser retransmitida sem autorizacao do remetente. Se
voce nao e o destinatario ou pessoa autorizada a recebe-la, informamos que o
seu uso, divulgacao, copia ou arquivamento sao proibidos. <u></u><u></u></span></p>
<p class="MsoNormal" style="margin:0cm;margin-bottom:.0001pt"><span style="font-size:10.5pt;font-family:Consolas;color:#404040">Portanto, se você
recebeu esta mensagem por engano, por favor, nos informe respondendo
imediatamente a este e-mail e em seguida apague-a.<u></u><u></u></span></p>
</div>
<p><span style="font-size:10.0pt;color:#006666"><u></u> <u></u></span></p>
</div>
</div>
<br>_______________________________________________<br>
R-br mailing list<br>
<a href="mailto:R-br@listas.c3sl.ufpr.br">R-br@listas.c3sl.ufpr.br</a><br>
<a href="https://listas.inf.ufpr.br/cgi-bin/mailman/listinfo/r-br" 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" target="_blank">http://www.leg.ufpr.br/r-br-guia</a>) e forneça código mínimo reproduzível.<br></blockquote></div><br><br clear="all"><div><br></div>-- <br>
Henrique Dallazuanna<br>Curitiba-Paraná-Brasil<br>25° 25' 40" S 49° 16' 22" O<br>
</div></div>