On Mon, 2011-11-07 at 10:24 -0800, kelsmith wrote: > Can anyone point me in the right direction of figuring out what downweight() > is doing? > > I am using vegan to perform CCA on diatom assemblage data. I have a lot of > rare species, so I want to reduce the influence of rare species in my CCA. I > have read that some authors reduce rare species by only including species > with an abundance of at least 1% in at least one sample (other authors use > 5% as a rule, but this removes at least half my species).
That is not what downweight() is for. If you want this sort of selection, see chooseTaxa() in my analogue package diat.sel <- chooseTaxa(diatoms, max.abun = 1, type = "AND") or, if proportions not percent diat.sel <- chooseTaxa(diatoms, max.abun = 0.01, type = "AND") This sort of indexing is trivial (but I made a typo in the current version so type = "OR" won't work) so you can study the code of analogue:::chooseTaxa.default once I fix the CRAN version or on R-Forge now: https://r-forge.r-project.org/scm/viewvc.php/pkg/R/chooseTaxa.R?view=markup&root=analogue Jari has addressed the other part of your question. Jari also mentioned the issue about whether you should be removing or downweighting rare species. Many people, especially diatomists, do this for practical purposes in a routine fashion because their data sets are especially speciose and have a large proportion of low abundance taxa. As a general matter of routine practice, I don't think this is a very good way of working, especially as we have no good ecological grounds for doing so and who knows what information these species could be telling us if we just listened to them instead of discarding them. HTH G -- %~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~% Dr. Gavin Simpson [t] +44 (0)20 7679 0522 ECRC, UCL Geography, [f] +44 (0)20 7679 0565 Pearson Building, [e] gavin.simpsonATNOSPAMucl.ac.uk Gower Street, London [w] http://www.ucl.ac.uk/~ucfagls/ UK. WC1E 6BT. [w] http://www.freshwaters.org.uk %~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~% ______________________________________________ R-help@r-project.org mailing list https://stat.ethz.ch/mailman/listinfo/r-help PLEASE do read the posting guide http://www.R-project.org/posting-guide.html and provide commented, minimal, self-contained, reproducible code.