Dear Alessia,
Error 1: DCA (as CA) is not adapted to your data with heterogeneous variables (not species), empty sites, negative values and NAs. Forget it!
Error 2: If CN, TOC... are actually variables present in your data frame df and if there are no missing values, the correct code for the RDA should be:
rda1 <- rda(df[, 1:5] ~ CN + TOC + Chla + Phaeo + ChlaPhaeo + Tot_lipids + Depth
+ Gravel + Sand + Mud + Silt + Clay + ProkAbu, data = df, scale = TRUE)
Kind regards,
Fran?ois Gillet
----- Mail original -----
De: "Ciraolo, Alessia Caterina" <acciraolo at mun.ca>
?: "r-sig-ecology" <r-sig-ecology at r-project.org>
Envoy?: Lundi 27 Septembre 2021 15:19:17
Objet: [R-sig-eco] issue with rda analysis
Hello,
I am trying to perform a rda analysis with nutrients data as response
variables and environmental data as explanatory variables. I have already
used both kinds of data for other rdaes but this time I have been getting
different kinds of errors that I am not able to fix. Would you mind helping
with that, please?
df<-read.csv("nutrients env var.csv")
df
dca=decorana(df)
1) Error in decorana(df) :
all row sums must be >0 in the community matrix: remove empty sites
rda1 <- rda(df[c(1:5)]~CN +TOC+ Chla +Phaeo+ ChlaPhaeo+ Tot_lipids +Depth
+Gravel+ Sand + Mud +Silt +Clay +ProkAbu
,scale = TRUE)
2) Error in eval(predvars, data, env) : object 'CN' not found
I looked online for some solutions and the only one I found for error 1 was
to delete samples with 0 and or NA. Regarding error 2, I am not completely
sure honestly.
If you can kindly help me with that, it would be very appreciated please.
Many thanks.
Kind regards,
Aless
_______________________________________________
R-sig-ecology mailing list
R-sig-ecology at r-project.org
https://stat.ethz.ch/mailman/listinfo/r-sig-ecology