I have a data frame that shows a column of US states that I merged from 2 other data frames. Some of the states are duplicated and I want to remove the duplicates. However, when I use the code duplicated(df)
it shows false for the whole list. All of the names that are duplicated are spelled the same way. What could be causing this error?
there is only one column in the data frame.
state
<chr>
Alabama
Alabama
Alaska
Arizona
Arizona
Arkansas
California
California
Colorado
Connecticut
This just returns all of the rows
n = m[duplicated((m$state))]