<html>
<head>
<meta content="text/html; charset=utf-8" http-equiv="Content-Type">
</head>
<body bgcolor="#FFFFFF" text="#000000">
Caro<br>
<br>
Segue sugestões<br>
<br>
library(reshape2)<br>
ATO$id = 1:7 ##acrescenta uma coluna de controle para o melt<br>
##remodelando sua tabela<br>
ATOMelt = melt(ATO, id="id", variable.name="ATO_n",
value.name="ART")<br>
<br>
##usando dplyr<br>
library(dplyr)<br>
ATOMelt %>% count(ART)<br>
<br>
##usando o poderoso data.table<br>
library(data.table)<br>
setDT(ATOMelt) ##converte para data.table<br>
##contando<br>
ATOMelt[, .N, by = .(ART)]<br>
<br>
saudações<br>
<br>
<div class="moz-cite-prefix">Em 26/05/2016 16:28, Amiko Bh escreveu:<br>
</div>
<blockquote
cite="mid:CAMgS91x0j-HBLKaESco0Qh-M25c7nCr_2ZDXWmP29xP-3nLnYg@mail.gmail.com"
type="cite">
<div dir="ltr">
<div>Pessoal,</div>
<div><br>
</div>
<div>Dado o banco:</div>
<div><br>
</div>
<div>
<table style="border:medium;border-collapse:collapse"
cellpadding="0" cellspacing="0" border="1">
<tbody>
<tr style="height:14.3pt">
<td style="padding:0cm 5.4pt;border:1pt solid
windowtext;width:53pt;height:14.3pt;background-color:transparent"
valign="top" width="71">
<p style="margin:0cm 0cm
0pt;text-align:center;line-height:normal"
align="center"><b
style="mso-bidi-font-weight:normal"><span
style="font-size:14pt"><font color="#000000"
face="Calibri">ATO_1</font></span></b></p>
</td>
<td style="border-width:1pt 1pt 1pt
0px;border-style:solid solid solid
none;border-color:windowtext windowtext windowtext
rgb(0,0,0);padding:0cm
5.4pt;width:53pt;height:14.3pt;background-color:transparent"
valign="top" width="71">
<p style="margin:0cm 0cm
0pt;text-align:center;line-height:normal"
align="center"><b
style="mso-bidi-font-weight:normal"><span
style="font-size:14pt"><font color="#000000"
face="Calibri">ATO_2</font></span></b></p>
</td>
<td style="border-width:1pt 1pt 1pt
0px;border-style:solid solid solid
none;border-color:windowtext windowtext windowtext
rgb(0,0,0);padding:0cm
5.4pt;width:53pt;height:14.3pt;background-color:transparent"
valign="top" width="71">
<p style="margin:0cm 0cm
0pt;text-align:center;line-height:normal"
align="center"><b
style="mso-bidi-font-weight:normal"><span
style="font-size:14pt"><font color="#000000"
face="Calibri">ATO_3</font></span></b></p>
</td>
</tr>
<tr style="height:13.9pt">
<td style="border-width:0px 1pt 1pt;border-style:none
solid solid;border-color:rgb(0,0,0) windowtext
windowtext;padding:0cm
5.4pt;width:53pt;height:13.9pt;background-color:transparent"
valign="top" width="71">
<p style="margin:0cm 0cm 0pt;line-height:normal"><font
color="#000000" face="Calibri">ART 121</font></p>
</td>
<td style="border-width:0px 1pt 1pt
0px;border-style:none solid solid
none;border-color:rgb(0,0,0) windowtext windowtext
rgb(0,0,0);padding:0cm
5.4pt;width:53pt;height:13.9pt;background-color:transparent"
valign="top" width="71">
<p style="margin:0cm 0cm 0pt;line-height:normal"><font
color="#000000" face="Calibri">ART 155</font></p>
</td>
<td style="border-width:0px 1pt 1pt
0px;border-style:none solid solid
none;border-color:rgb(0,0,0) windowtext windowtext
rgb(0,0,0);padding:0cm
5.4pt;width:53pt;height:13.9pt;background-color:transparent"
valign="top" width="71">
<p style="margin:0cm 0cm 0pt;line-height:normal"><font
color="#000000" face="Calibri">ART 180</font></p>
</td>
</tr>
<tr style="height:13.9pt">
<td style="border-width:0px 1pt 1pt;border-style:none
solid solid;border-color:rgb(0,0,0) windowtext
windowtext;padding:0cm
5.4pt;width:53pt;height:13.9pt;background-color:transparent"
valign="top" width="71">
<p style="margin:0cm 0cm 0pt;line-height:normal"><font
color="#000000" face="Calibri">ART 33</font></p>
</td>
<td style="border-width:0px 1pt 1pt
0px;border-style:none solid solid
none;border-color:rgb(0,0,0) windowtext windowtext
rgb(0,0,0);padding:0cm
5.4pt;width:53pt;height:13.9pt;background-color:transparent"
valign="top" width="71">
<p style="margin:0cm 0cm 0pt;line-height:normal"><font
color="#000000" face="Calibri">ART 28</font></p>
</td>
<td style="border-width:0px 1pt 1pt
0px;border-style:none solid solid
none;border-color:rgb(0,0,0) windowtext windowtext
rgb(0,0,0);padding:0cm
5.4pt;width:53pt;height:13.9pt;background-color:transparent"
valign="top" width="71">
<p style="margin:0cm 0cm 0pt;line-height:normal"><font
color="#000000" face="Calibri">ART 10</font></p>
</td>
</tr>
<tr style="height:13.9pt">
<td style="border-width:0px 1pt 1pt;border-style:none
solid solid;border-color:rgb(0,0,0) windowtext
windowtext;padding:0cm
5.4pt;width:53pt;height:13.9pt;background-color:transparent"
valign="top" width="71">
<p style="margin:0cm 0cm 0pt;line-height:normal"><font
color="#000000" face="Calibri">ART 121</font></p>
</td>
<td style="border-width:0px 1pt 1pt
0px;border-style:none solid solid
none;border-color:rgb(0,0,0) windowtext windowtext
rgb(0,0,0);padding:0cm
5.4pt;width:53pt;height:13.9pt;background-color:transparent"
valign="top" width="71">
<p style="margin:0cm 0cm 0pt;line-height:normal"><font
color="#000000" face="Calibri">ART 15</font></p>
</td>
<td style="border-width:0px 1pt 1pt
0px;border-style:none solid solid
none;border-color:rgb(0,0,0) windowtext windowtext
rgb(0,0,0);padding:0cm
5.4pt;width:53pt;height:13.9pt;background-color:transparent"
valign="top" width="71">
<p style="margin:0cm 0cm 0pt;line-height:normal"><font
color="#000000" face="Calibri">ART 155</font></p>
</td>
</tr>
<tr style="height:13.9pt">
<td style="border-width:0px 1pt 1pt;border-style:none
solid solid;border-color:rgb(0,0,0) windowtext
windowtext;padding:0cm
5.4pt;width:53pt;height:13.9pt;background-color:transparent"
valign="top" width="71">
<p style="margin:0cm 0cm 0pt;line-height:normal"><font
color="#000000" face="Calibri">ART 155</font></p>
</td>
<td style="border-width:0px 1pt 1pt
0px;border-style:none solid solid
none;border-color:rgb(0,0,0) windowtext windowtext
rgb(0,0,0);padding:0cm
5.4pt;width:53pt;height:13.9pt;background-color:transparent"
valign="top" width="71">
<p style="margin:0cm 0cm 0pt;line-height:normal"><font
color="#000000" face="Calibri">ART 33</font></p>
</td>
<td style="border-width:0px 1pt 1pt
0px;border-style:none solid solid
none;border-color:rgb(0,0,0) windowtext windowtext
rgb(0,0,0);padding:0cm
5.4pt;width:53pt;height:13.9pt;background-color:transparent"
valign="top" width="71">
<p style="margin:0cm 0cm 0pt;line-height:normal"><font
color="#000000" face="Calibri">ART 121</font></p>
</td>
</tr>
<tr style="height:13.9pt">
<td style="border-width:0px 1pt 1pt;border-style:none
solid solid;border-color:rgb(0,0,0) windowtext
windowtext;padding:0cm
5.4pt;width:53pt;height:13.9pt;background-color:transparent"
valign="top" width="71">
<p style="margin:0cm 0cm 0pt;line-height:normal"><font
color="#000000" face="Calibri">ART 28</font></p>
</td>
<td style="border-width:0px 1pt 1pt
0px;border-style:none solid solid
none;border-color:rgb(0,0,0) windowtext windowtext
rgb(0,0,0);padding:0cm
5.4pt;width:53pt;height:13.9pt;background-color:transparent"
valign="top" width="71">
<p style="margin:0cm 0cm 0pt;line-height:normal"><font
color="#000000" face="Calibri">ART 33</font></p>
</td>
<td style="border-width:0px 1pt 1pt
0px;border-style:none solid solid
none;border-color:rgb(0,0,0) windowtext windowtext
rgb(0,0,0);padding:0cm
5.4pt;width:53pt;height:13.9pt;background-color:transparent"
valign="top" width="71">
<p style="margin:0cm 0cm 0pt;line-height:normal"><font
color="#000000" face="Calibri">ART 33</font></p>
</td>
</tr>
<tr style="height:13.9pt">
<td style="border-width:0px 1pt 1pt;border-style:none
solid solid;border-color:rgb(0,0,0) windowtext
windowtext;padding:0cm
5.4pt;width:53pt;height:13.9pt;background-color:transparent"
valign="top" width="71">
<p style="margin:0cm 0cm 0pt;line-height:normal"><font
color="#000000" face="Calibri">ART 121</font></p>
</td>
<td style="border-width:0px 1pt 1pt
0px;border-style:none solid solid
none;border-color:rgb(0,0,0) windowtext windowtext
rgb(0,0,0);padding:0cm
5.4pt;width:53pt;height:13.9pt;background-color:transparent"
valign="top" width="71">
<p style="margin:0cm 0cm 0pt;line-height:normal"><font
color="#000000" face="Calibri">ART 121</font></p>
</td>
<td style="border-width:0px 1pt 1pt
0px;border-style:none solid solid
none;border-color:rgb(0,0,0) windowtext windowtext
rgb(0,0,0);padding:0cm
5.4pt;width:53pt;height:13.9pt;background-color:transparent"
valign="top" width="71">
<p style="margin:0cm 0cm 0pt;line-height:normal"><font
color="#000000" face="Calibri">ART 121</font></p>
</td>
</tr>
<tr style="height:13.9pt">
<td style="border-width:0px 1pt 1pt;border-style:none
solid solid;border-color:rgb(0,0,0) windowtext
windowtext;padding:0cm
5.4pt;width:53pt;height:13.9pt;background-color:transparent"
valign="top" width="71">
<p style="margin:0cm 0cm 0pt;line-height:normal"><font
color="#000000" face="Calibri">ART 15</font></p>
</td>
<td style="border-width:0px 1pt 1pt
0px;border-style:none solid solid
none;border-color:rgb(0,0,0) windowtext windowtext
rgb(0,0,0);padding:0cm
5.4pt;width:53pt;height:13.9pt;background-color:transparent"
valign="top" width="71">
<p style="margin:0cm 0cm 0pt;line-height:normal"><font
color="#000000" face="Calibri">ART 121</font></p>
</td>
<td style="border-width:0px 1pt 1pt
0px;border-style:none solid solid
none;border-color:rgb(0,0,0) windowtext windowtext
rgb(0,0,0);padding:0cm
5.4pt;width:53pt;height:13.9pt;background-color:transparent"
valign="top" width="71">
<p style="margin:0cm 0cm 0pt;line-height:normal"><font
color="#000000" face="Calibri">ART 180</font></p>
</td>
</tr>
</tbody>
</table>
</div>
<div><br>
</div>
<div><br>
</div>
<div>a) Preciso contar cada elemento em cada variável, para que
vislumbre o seguinte resultado:</div>
<div><br>
</div>
<div><span style="font-size:14pt"><font color="#000000"
face="Calibri"><b>ATO_1</b></font></span></div>
<div><br>
</div>
<div>ART 121 = 3</div>
<div>ART 33 = 1</div>
<div>ART 155= 1</div>
<div>ART 28= 1</div>
<div>ART 15 = 1</div>
<div><br>
</div>
<div>e assim com <span style="font-size:14pt"><font
color="#000000" face="Calibri"><b>ATO_2 e </b><span
style="font-size:14pt"><font color="#000000"
face="Calibri"><b>ATO_3.</b></font></span></font></span></div>
<div><br>
</div>
<div>b) preciso saber o total de cada elemento em todos as
colunas, assim:</div>
<div><br>
</div>
<div>
<div>ART 121 = 7</div>
<div>ART 33 = 4</div>
<div>ART 155= 3</div>
<div>ART 28= 2</div>
<div>ART 15 = 2</div>
<div>ART 180=2</div>
<div>ART 10=1</div>
<div><br>
</div>
<div>Muito obrigado.</div>
</div>
<div><br>
</div>
</div>
<br>
<fieldset class="mimeAttachmentHeader"></fieldset>
<br>
<pre wrap="">_______________________________________________
R-br mailing list
<a class="moz-txt-link-abbreviated" href="mailto:R-br@listas.c3sl.ufpr.br">R-br@listas.c3sl.ufpr.br</a>
<a class="moz-txt-link-freetext" href="https://listas.inf.ufpr.br/cgi-bin/mailman/listinfo/r-br">https://listas.inf.ufpr.br/cgi-bin/mailman/listinfo/r-br</a>
Leia o guia de postagem (<a class="moz-txt-link-freetext" href="http://www.leg.ufpr.br/r-br-guia">http://www.leg.ufpr.br/r-br-guia</a>) e forne�a c�digo m�nimo reproduz�vel.</pre>
</blockquote>
<br>
</body>
</html>