If there is a data set in R and I want know how many of one value is in it, is there a command for this? thanks
If the values are discrete, you can just use
If you just want to know how often a specific value occurs, then the snippet
works quite nicely. Beware of NAs, however (e.g. using
If the value is not discrete, then the notion of "frequency" becomes somewhat ill-defined. The above approach would still work, but I would be very cautious about interpreting the results.