Dear R users,

I know, the topic is more related to the r-sig-ecology. I decided to  
post it to the r-help as some specific topics of my question deals  
with NA-values and RDA (R vegan) and an adaptated RDA code due to a  
specific study design (including a second matrix).

I am calculating a RDA for a dependent matrix (different variables for  
tree performance) and different explanatory variables (species  
identitiy, diversity, soil data, ground vegetation). I would very much  
appreciate some help with my txt input file for the vegan function.

As for standard RDA's I have different plots (lines, the dependent  
matrix) and for each plot a value for diversity, soil and vegetation  
(in columns, the environmental matrix). I additionally have different  
species for each plot (separated in columns). In standard RDA's for  
vegetational data you put your dependent variable (e.g. number of a  
specific species in the specific plot) below your species columns.
Problem: I do not have vegetational data with values 0, 1,2, 3 for  
each plot and species. I have 6 species in total, but the plots have a  
predetermined diversity level (e.g. 1, 2, 4, 6). So in comparison to  
vegetational data I do not have '0' values. For example in my 4  
species plot I have 4 species and two missing (NA) values. I have read  
some papers using the same analysis for biodiversity experiments, so  
it should be appropriate. So I decided to put the dependent variables  
separately in different variables and to give species values as the  
proportion within the plot (2-species plot: 0.5+0.5, 1-species plot:  
1.0).

My txt file looks like

tree height - crown PA - tree biomass (all dependent variables) -
10                     20             15
20                      56              36


Diversity - Species A - Species B - Species C - Species D
2                       0                  0.5                  
0.5                   0
3                        0.33              0.33             
0.33                0

Soil - Vegetation
23            43
56                78


So I changed the code for rda (dependent variable on the right of the  
tilde and the explanatory variable on the left of the tilde). In  
standad RDA the dependent variable would be on the left. I tried this,  
but then I was getting points for the dependent variables and not  
arrows. it is because RDA tried to do an RDA on the dfferent species  
(but there is no dependent variable, but just die identity). However,  
I get some error message changing the R-code: Error in  
model.frame.default(formula, data, na.action = na.fail, xlev = xlev) :
   invalid type (list) for variable 'height'. And a second problem is  
that I wanted to include the other environmental matrix (env). I tried  
to include the second matrix on the right of the tilde, but rda was  
producing an error.


Many thanks for any hint or comments
Sibylle

ME<-read.table("ME_rda.txt", na.strings="*", header=TRUE)

height<-ME[,3:6]
mortality<-ME[,7:9]
species<-ME[,11:16]
env<-ME[,10:33]


library(vegan)
ME_rda<-rda(species~height, scale=TRUE)
ME_rda
plot(ME_rda, scaling=-1)


        [[alternative HTML version deleted]]

______________________________________________
R-help@r-project.org mailing list
https://stat.ethz.ch/mailman/listinfo/r-help
PLEASE do read the posting guide http://www.R-project.org/posting-guide.html
and provide commented, minimal, self-contained, reproducible code.

Reply via email to