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.
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.
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)