I have a factor a:
> a
[1] foo
[2] bar
[3] foo
[4] baz
[5] bar
[6] foo
I want to plot() this factor but only including levels with a minimum frequency of two. So that only foo and bar are plotted, not baz.
How can I achive this?
You just use standard subsetting. First, create some table:
next, create a table of frequencies:
Finally, subset and plot: