<div>Ivan, </div><div><br></div><div>Talvez não tenha ficado claro. O problema não é de formatação: veja que onde deveria dar 0 (zero), a minha sequência está retornando <span style>1.110223e-16! </span></div><div><span style><br>
</span></div><span class="Apple-style-span" style="border-collapse:separate;font-family:Arial;border-spacing:0px;font-size:medium"><span class="Apple-style-span" style="font-family:'Lucida Console';font-size:13px;line-height:15px;text-align:-webkit-left;white-space:pre-wrap"><pre tabindex="0" class="GJWPQFQDK4" style="font-family:'Lucida Console';font-size:10pt!important;outline:none;border-style:none;white-space:pre-wrap!important;margin-top:0px;margin-bottom:0px;line-height:1.2">
<span class="GJWPQFQDN4 ace_keyword" style="white-space:pre;color:blue">> </span><span class="GJWPQFQDB4 ace_keyword" style="color:blue">seq(-.6,.8,by=.2)
</span>[1] -6.000000e-01 -4.000000e-01 -2.000000e-01  1.110223e-16  2.000000e-01 </pre></span></span><div><span style="font-family:'Lucida Console';font-size:10pt;line-height:1.2;white-space:pre-wrap;text-align:-webkit-left">[6]  4.000000e-01  6.000000e-01  8.000000e-01</span></div>
<div><span style><br></span></div><div><span style>Aliás, formatando a sequência com scientific = FALSE, veja que resultado "curioso":</span></div><div><span style><br></span></div><span class="Apple-style-span" style="border-collapse:separate;font-family:Arial;border-spacing:0px;font-size:medium"><span class="Apple-style-span" style="font-family:'Lucida Console';font-size:13px;line-height:15px;text-align:-webkit-left;white-space:pre-wrap"><pre tabindex="0" class="GJWPQFQDK4" style="font-family:'Lucida Console';font-size:10pt!important;outline:none;border-style:none;white-space:pre-wrap!important;margin-top:0px;margin-bottom:0px;line-height:1.2">
<span class="GJWPQFQDN4 ace_keyword" style="white-space:pre;color:blue">> </span><span class="GJWPQFQDB4 ace_keyword" style="color:blue">format(seq(-.6,.8,by=.2),scientific=FALSE)
</span>[1] "-0.5999999999999999777955" "-0.3999999999999999666933"
[3] "-0.1999999999999999555911" " 0.0000000000000001110223"
[5] " 0.2000000000000000666134" " 0.4000000000000000222045" </pre></span></span><div><span style="font-family:'Lucida Console';font-size:10pt;line-height:1.2;white-space:pre-wrap;text-align:-webkit-left">[7] " 0.6000000000000001998401" " 0.8000000000000000444089"</span></div>
<div><span style><br></span></div><div><span style>Imagino que isso seja um problema de alguma configuração do meu sistema/máquina. Ou alguém tem o mesmo problema?</span></div><div><span style><br></span></div><div><span style>Saudações,</span></div>
<div><span style><br></span></div><div><span style>Alexandre</span></div><div><span style><br></span></div><div><span style><br></span></div><div><span style><br></span></div><div><font color="#222222" face="arial, sans-serif"><br>
</font></div><div><font color="#222222" face="arial, sans-serif"><br></font></div><div><br></div><div><br></div><span style>From: Ivan Bezerra Allaman <</span><a href="mailto:ivanalaman@yahoo.com.br" style>ivanalaman@yahoo.com.br</a><span style>></span><br style>
<span style>To: R Brasil <</span><a href="mailto:r-br@listas.c3sl.ufpr.br" style>r-br@listas.c3sl.ufpr.br</a><span style>></span><br style><span style>Subject: Re: [R-br] problemas com função "seq"</span><br style>
<span style>Message-ID:</span><br style><span style>       <</span><a href="mailto:1337965493.37364.YahooMailNeo@web161806.mail.bf1.yahoo.com" style>1337965493.37364.YahooMailNeo@web161806.mail.bf1.yahoo.com</a><span style>></span><br style>
<span style>Content-Type: text/plain; charset="iso-8859-1"</span><br style><br style><span style>Não há nada de errado! Para retornar exatamente o que você quer existem várias opções. Dentre elas,</span><br style>
<div><span style><br></span></div><div><span style>Não há nada de errado! Para retornar exatamente o que você quer existem várias opções. Dentre elas,</span><br style><br style><span style>a <- seq(-.6,.8,by=.2)</span><br style>
<span style>round(a,2)</span><br style><span style>format(a,scientific=TRUE)</span><br style><span style>format(a,scientific=FALSE)</span><br style><span style>format(a,digits=3,scientific=</span><span style>FALSE)</span><br style>
<span style>formatC(a,format='f',digits=2,</span><span style>drop0trailing=TRUE)</span><br style><span style>formatC(a,format='f',decimal.</span><span style>mark=',')</span><br style><span style>as.numeric(formatC(a,format='</span><span style>f',decimal.mark='.'))</span><br style>
<br style><span style>(S,f,P)</span><br style><span style>Allaman</span>
</div>