Open jamiemkass opened 3 years ago
I also thought that simply removing all records with 0 abundance wouldn't make much sense, because true absences would be essential to compute the true variance if there are other non-zero abundances in a time series for a species. I thought something like this, that removes species with ALL zeroes (the ones most likely not to vary over time) makes more sense. Curious what you think.
Qformula <- as.formula(paste(abundance.var, "~", species.var, sep = ""))
spSums <- aggregate(Qformula, data = df, sum)
spZeroes <- spSums[spSums$abundance==0, species.var]
df <- df[!(df[[species.var]] %in% spZeroes),]
@laurenmh @mavolio Could you comment on these proposed algorithmic changes to codyn please? Thanks!
What function is this for?
On Thu, Jan 28, 2021 at 9:47 PM Matt Jones notifications@github.com wrote:
@laurenmh https://github.com/laurenmh @mavolio https://github.com/mavolio Could you comment on these proposed algorithmic changes to codyn please? Thanks!
— You are receiving this because you were mentioned. Reply to this email directly, view it on GitHub https://github.com/NCEAS/codyn/issues/126#issuecomment-769537317, or unsubscribe https://github.com/notifications/unsubscribe-auth/ADS3ZTAESHH3B6AY73R5YXTS4IOVPANCNFSM4WWRXLPQ .
@mavolio synchrony.R line 113 (from the subject)
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.