[R] PROBLEM: correspondence analysis with vegan

Julia Lienert julia.lienert at googlemail.com
Wed Oct 26 14:20:40 CEST 2016


Hello All,

I’m Julia from Germany and I have a problem concerning the vegan package that I can’t solve on my own (after hours and hours spent searching for a solution). I was thrown into the topic of working with R by my professor and wasn’t really aware that this included working with higher statistics (since I studied pedagogy before and have not much basic statistical knowledge or knowledge of R).

I need to do a correspondence analysis on a dataset of vegetation samples and species as a comma-separated csv file. I have the species names as row names. The column names indicated zonation + land use and make up the first row of the matrix. I set the header = TRUE. 

If I tried doing a CA or DCA with this dataset the warning “Error in rowSums(X): ‘x’ must be numeric” appeared. According to several forums, I then removed the first column and the CA worked and i could also apply the envfit function and plot it. 

Now here comes my problem and question:

when I plotted the arrows { plot(ef, p.max = 0.1) }, I got arrows labeled with species in my ordination plot. But instead I would need the column that indicates the zonation/land use (the first column) which I had to remove in order for the CA/ DCA to work. Is there any way that I can incorporate the zonation/ land use column as environmental vector after I did the whole CA/ DCA? Or is there any way for me to do a CA/ DCA without having to remove the first column?

I might be missing something but I just started working with R and haven’t got the time to really work my way in from the basics. I will do that after this project is done but for now I just hope that you can help me.

Greetings,
Julia



More information about the R-help mailing list