Search code examples
rstatisticsveganmultivariate-testing

Alternative example for capscale function in vegan package


I have been learning multivariate analyses in PRIMER, yet now want to convert to R using the vegan package. I wish to use the capscale() function in vegan, yet am not sure how my data should be formatted beforehand. In the example in the vignette http://cc.oulu.fi/~jarioksa/softhelp/vegan/html/capscale.html, both dataframes (varespec and varechem) have numeric values only, yet I have one dataframe of dependent (numeric) values, and another of independent (factor) values. So what I am asking for is an alternative worked example that I might be able to emulate. I can't find anything online. The iris data set should provide sufficient toy data. Thank you


Solution

  • The vignette source you use is badly outdated: I got to remove it from the Web. The help page for ?capscale should contain more up-to-date documentation in your current vegan installation. For the independent data with factors, you should be able to use the model of any other constrained ordination help (?rda) which tell you that with formula interface you can have factors in the independent data -- and the formula interface is the only allowed interface in capscale.

    You should switch from capscale to dbrda in vegan: capscale may be deprecated in the future.