Stanfield, Les (MNR)
2008-Mar-27 18:11 UTC
[R] assistance with RDAtest beta version application
Pierre Legendre has developed a beta version of a new redundancy analysis package called RdaTest that is available on his web page at the Universit® de Montréal. The test example that is included with the package is based on the example provided in his book (Numerical Ecology, Chapter 11 (Legendre & Legendre 1998)) I have downloaded the package and am attempting to run it so that I might learn how to match the outputs from the RDA test to the outputs in the book. this is a first step towards me eventually using this technique to analyze my own data with this methodology. However, I keep hitting road blocks trying to get the package to work and so am looking for someone who has used this test package and could help me troubleshoot. Any takers? Les [[alternative HTML version deleted]]
Guillaume Blanchet
2008-Mar-27 19:01 UTC
[R] assistance with RDAtest beta version application
Hi ! I am familiar with the rdaTest package. It works perfectly find for me. Can you give me more details on the problems you have so I can be of greater help ! Have a nice day ! Guillaume Blanchet PhD student Stanfield, Les (MNR) a ?crit :> Pierre Legendre has developed a beta version of a new redundancy analysis package called RdaTest that is available on his web page at the Universit? de Montr?al. The test example that is included with the package is based on the example provided in his book (Numerical Ecology, Chapter 11 (Legendre & Legendre 1998)) > > > I have downloaded the package and am attempting to run it so that I might learn how to match the outputs from the RDA test to the outputs in the book. this is a first step towards me eventually using this technique to analyze my own data with this methodology. However, I keep hitting road blocks trying to get the package to work and so am looking for someone who has used this test package and could help me troubleshoot. > > Any takers? > > Les > > [[alternative HTML version deleted]] > > > ------------------------------------------------------------------------ > > ______________________________________________ > R-help at 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. >
Guillaume Blanchet
2008-Mar-27 20:17 UTC
[R] assistance with RDAtest beta version application
Hi !! Stanfield, Les (MNR) a ?crit :> Thank you so much for coming to my rescue!: > > OK I have been able to open it (but only in the R editor. I assumed that we had to generate our own files of XX.txt and YY.txt and bring them into R before the program could run.... Is this right? > >Yon do not have to, but you can. I personally like to import the whole file I'm working (here "Table_11-3.txt") and go from there. If you feel more comfortable to do it another way there is no problem there !> So I created two as tab delimited text files (Here they are). I am able to bring them into R and when I edit them, they look fine. > >OK> This is the code to this stage: > > rdaTest <- function(YY.mat, XX.mat, WW.mat=NULL, > scale.Y=FALSE, testF=NULL, nperm=NULL, print.results=TRUE, print.cum=FALSE) > { > library(MASS) > > # Read the data tables. Transform them into matrices Y, X, and W > YY.mat = -read.table("YY.txt") > XX.mat = -read.table("XX.txt") > > Y.mat=as.matrix(YY.mat) > >> X.mat=as.matrix(XX.mat) >> > bb<-edit(y.mat) > bb<-edit(x.mat) > > > But when I try to then convert these two files to mat files, nothing happens? I'm assuming it has something to do with this step, but I can't figure it out. Note: I tried creating base yy.mat and xx.mat files, by just changing the file names, but that didn't work..... > > So is this the problem, When I look at the y.mat and x.mat they look no different than the original txt files > > >Here I get a bit confused Here is what I propose: ### Load the whole file tab11.3<-read.table("Table_11-3.txt",header=TRUE,row.names=1) ### Extract the species (Y) and the environmental variables (X) from tab11.3 Y<-tab11.3[,1:6] X<-tab11.3[,7:10] ### Calculate the RDA coco<-rdaTest(Y,X,testF=TRUE,nperm=999) coco ### Draw the triplot graph.rdaTest(coco,plot.type="F") With these couple of lines you should get the same results as the ones presented in Legendre and Legendre (1998).> Les Stanfield > >Have a nice day !! Guillaume Blanchet