I am trying to filter distinct values of a column in a dataframe using dplyr, but I keep getting "Evaluation error: no applicable method for 'distinct_' applied to an object of class "factor"."
I've tried changing the class of the column I'm trying to filter on to character and factor, but both cause the error.
Example:
testFrame<-c("a","b","c","c"))
testFrame<-as.data.frame(testFrame)
testFrame %>% filter(distinct(testFrame, .keep_all=TRUE))
#Results in Error in filter_impl(.data, quo) :
#Evaluation error: no applicable method for 'distinct_' applied to an object of class "factor".
This should remove row four from my database, leaving me with just values of a,b,c