I am new to R Studio and now want to make a "cca". I followed a describtion but R says NO. This is what Iam working with:
PreAbscca<- read.table("PreAbsenz.csv", header = TRUE, row.names = NULL)
UVcca<- read.table("UV.csv", header = TRUE, row.names = 1)
cca.all<- cca ( PreAbscca, UVcca )
UVcca are the Environmental Variables like Tree class, Tree diameter, altitude, cover %.. Tree class was numeric so I changed the type of tree in 1,2,3 because I thought it would chance something and would work, but it does not. PreAbscca inclued the incidence of bryophyts. If they appear on the trees yes(1) or no (0). In The List are just numbers.
And R puts out this error:
Error in terms.formula ( object, data = data ) : '.' appears in the formula and 'data' argument is not valid
What can I do, maybe someone can help me this would be nice. Thank u for that
Unfortunately your example is not reproducible so I can't test this for myself.
From the error message it seems your input for the
cca
function is wrong. It is not exactly clear, which package your are using, but I am assuming you are usingcca
from thevegan
package.The package documentation says about the usage of this function:
Which means you either supply input in the form of
formula
anddata
or in the form ofX
,Y
,Z
.Here what these inputs need to be:
So in this cas you need supply formula and a data.frame.
It seems like these need to be supplies as a matrix