How to delete repeated values in a text column in R?

2

I have a data.frame that has a column with names, but these names repeat a few times. I need to create a new column in a new data.frame with all names, but no repeats.

    
asked by anonymous 01.06.2017 / 20:17

1 answer

4

Assuming your data frame is named dados and the column with these names is called nomes , do

unique(dados$nomes)

If you want to know the number of times each name appears, do

table(dados$nomes)
    
01.06.2017 / 20:22