I have a column of catch rate data in a DF (df$catch.rate) that contains a combination of decimal values and zeros.
I would like to calculate the percentage of zero
sum(df$catch.rate==0)/length(df$catch.rate)
There's probably a more R-ish way, but this is the quickest I could come up with.