I have a data frame df, and I am trying to subset all rows that have a value in column B
occur more than once in the dataset.
I tried using table to do it, but am having trouble subsetting from the table:
t<-table(df$B)
Then I try subsetting it using:
subset(df, table(df$B)>1)
And I get the error
"Error in x[subset & !is.na(subset)] : object of type 'closure' is not subsettable"
How can I subset my data frame using table counts?