I don't think this line actually subsets the species out with 0 abundance as intended because it needs the actual variable name from the table, not the parameter name. This line does though:
df <- df[df[[abundance.var]]>0,]
It doesn't seem to affect the output, but thought I'd bring it to your attention.