I’m running an RLQ analysis using data from two different spatial samples (just as described in Dray et al 2002 “Matching data sets from two different spatial samples”). I have multiple sediment traps per site and data from fish transects at the same sites. However, traps are not matched to transects. To run an RLQ, I calculate the trap average per site as Table R.
When making table R, it takes weights from the duality diagram (dudi.coa in this case) of table L (fish species abundance in this case). How do I run an RLQ as in R as per Dray et al 2002?
If I incorporate data from all traps and transects (traps and transects are the replicates for sediment and fish data, respectively) as is, the sites don’t match up. It seems to me that I need to incorporate a neighbourhood matrix (telling the analysis that sediment site i equals fish site j) in creating the duality diagram for R (dudi.pca in my case), so that the appropriate weights are applied.
I can’t find any aspect of the ade4 package that enables the procedure outlined in Dray et al 2002 to work in R. Can anyone help?
Thanks in advance for the help!
So far:
library(ade4)
l <- dudi.coa(abundance, scannf=F, nf=2)
r <- dudi.pca(sediment, row.w=l_abundance$lw, scannf=F, nf=2)
Error in as.dudi(df, col.w, row.w, scannf = scannf, nf = nf, call = match.call(), :
Non convenient row weights
q <- dudi.hillsmith(traits, row.w=l_abundance$cw, scannf=F, nf=2)
myRLQ <- rlq(r, l, q, scannf=F, nf=2)
I have a neighbourhood matrix where columns = rows of L and rows = rows of R, but seem to have hit a wall as to what to tell R to do with it.