I’m using two datasets imported on R using the comand “read.csv()”.The first one (spxt) includes the traits of an insect community and the second one (spxpl) contains relative abboundances of insects per plot (invaded or not). After cleaning the datasets from values NA which I converted to 0 and assuring that the datasets have the same number of row (which they have), I proceded to compute the CWM which concluded with the error showed in the image: “First argument not valid”.
Could anyone help me?
Many thanks in advance
enter image description here
enter image description hereenter image description here
I tried everything I belived possible:
- I tried to convert the dataframe in matrix
- I tried to convert the content of the “spxt” into factor
- I tried to use the function na.omit without converting the NA in 0 before ( I realized it wasn’t possible because the two dataframe have to have the same number of rows.
I tried anything that came to mind.
Daniele Corrente is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
Check out our Code of Conduct.