[R] Naming objects in a list

2009-10-09 Thread P.Branco
Hello, I am trying to run a for-loop in which I want to add glm output objects sequentially into a list. I do not know how to give names to each object in a list. I tried this : List.glm <- list() for(i in 1:n) list.glm <- list(list.glm, glm(,,,)) but it is obviously unsuited… Best rega

[R] Spatial Autocorrelation

2009-10-06 Thread P.Branco
Hello, I have a matrix with the distances among sites. And I have another matrix with the presence and absence of each species in each site. I would like to test the spatial autocorrelation among sites. I have tried to use the function gearymoran of the ade4 package, but error messages keep po

[R] How to do a PCA with ordered variables?

2009-09-17 Thread P.Branco
Hi, I want to do a pca using a set of variables which are ordered. I have used the dudi.mix method from the ade4 package, but when I do the $index it shows me that R has considered my variables as quantitative. What should I do? -- View this message in context: http://www.nabble.com/How-to-do-

Re: [R] Calculate an equation

2008-11-20 Thread P.Branco
I tried to do some cycles using the “for” function, but then I had to make multiple “for”s and it didn’t work. One of the major problems is that I don’t know how to use the summation function on R. Best regards, P.Branco stephen sefick wrote: > > What have you tried so far? > >

[R] Calculate an equation

2008-11-20 Thread P.Branco
(I have this information in a table, 40 taxa (columns) t, 49 sites r) drs – Distance from site r to site s (this information is on a table, s sites (columns)) I thought that R would be the software to use, but I am experiencing some difficulties Thanks to everyone, P.Branco -- View this message

Re: [R] R cycle to calculate distances

2008-11-18 Thread P.Branco
It Works now. Thanks to all. P.Branco Gavin Simpson wrote: > > On Mon, 2008-11-17 at 07:20 -0800, P.Branco wrote: >> Sorry, it does not work. >> >> If I do a rnorm I lose the original values of my vectors, and the >> equation >> result must be attain

Re: [R] R cycle to calculate distances

2008-11-17 Thread P.Branco
Sorry, it does not work. If I do a rnorm I lose the original values of my vectors, and the equation result must be attained by the use of the original values. Thanks, P.Branco Dimitris Rizopoulos-4 wrote: > > try this (presented only for two pairs): > > r1 <- rnorm(49) &

[R] R cycle to calculate distances

2008-11-17 Thread P.Branco
Dear all, I am for the first time trying to work with R, but I have bumped into a problem. I have four vectors: r1 (49 values) r21 (49 values) r22 (49 values) r3 (49 values) s1 (300 values) s21 (300 values) s22 (300 values) s3 (300 values) And I would like to calculate the distances from all re