1
Hello, I’m new in R and I’m getting beaten to solve this problem. I have a spreadsheet that I called base
and has 2573 observations of 103 variables.
I created an auxiliary column named after reclamacoes.titulo
. I need to check where the 1 is in each row and return, in the column reclamacoes.titulo
, or the name of the corresponding column or its index.
I was able to write a code that returns the indexes of the rows where each one is. For example, the indexes of the rows that have 1 in the column periculosidade
is:
> dic.busca.indice.periculosidade
[1] 81 84 85 91 92 516 575 576 577 578 579 636 637 638 639 640 641 643 742 743 744 745 746 747 969
[26] 970 971 972 1389 1390 1391 1392 1393 1394 1395 1396 1397 1398 1411 1412 1415 1416 1417 1418 1419 1420 1421 1422 1423 1424
[51] 1425 1426 1531 1532 1533 1534 1535 1694 1695 1979
In that case, my column reclamacoes.titulo
was supposed to have the following face:
Justiça Gratuita
Justiça Gratuita
Perdas e Danos
Perdas e Danos
Perdas e Danos
Perdas e Danos
Perdas e Danos
Prescrição
Perdas e Danos
Justiça Gratuita
Perdas e Danos