[R-sig-eco] ezANOVA package for a rm-ANOVA, Question about Design

2012-06-29 Thread Nils Gülzow
> Dear List, > > I have a problem with the ezANOVA package using for rm ANOVA or a > problem with my statistic design of the experiment. (or both ;-)) > > My file looks like this, dput(head(reg,20)) > structure(list(sample = c(13L, 14L, 15L, 13L, 14L, 15L, 13L, 14L, 15L, 13L, 14L, 15L, 13L, 14L

Re: [R-sig-eco] Carrying capacity in R

2012-06-29 Thread Manuel Spínola
Thank you very much Peter. Manuel 2012/6/28 Peter Solymos > Manuel, > > As a starter you can fit nonlinear models using growth functions, and > calculate carrying capacity from estimated model parameters > (stats:::nle, lme4:::nlmer). > > I am not sure if this is of big help as it is still in d

[R-sig-eco] Re-arrange data frame

2012-06-29 Thread Manuel Spínola
Dear List members, How can I re-arrange a data frame as detailed below. old data frame Item col1 col2 col3 col4 item1 12116 7 item2 108 5 4 item3 3 5 4 3 New data frame item1 12 11 item1 6 7 item2 108 item2

Re: [R-sig-eco] Re-arrange data frame

2012-06-29 Thread Peter Solymos
Manuel, You haven't specified the general problem, but for this particular situation this is how you can do it: x <- data.frame(array(1:12, c(3,4), list(paste("item", 1:3), paste("col", 1:4 x <- data.frame(Item=rownames(x), x) y <- data.frame(Item=x$Item[rep(1:3, each=2)], matrix(as.matrix(x[

Re: [R-sig-eco] Re-arrange data frame

2012-06-29 Thread Baldwin, Jim -FS
Here is an alternative approach that takes a few more steps and assumes the original data frame is named d0: # Split into two data frames d1 <- d0[,c(1:3)] d2 <- d0[,c(1,4,5)] # Rename the columns in the second one so that the names match names(d2) <- names(d1) # Concatenate the two identically

Re: [R-sig-eco] Question about gls output

2012-06-29 Thread Drew Tyre
Basil - you should do it for exactly the reason they state: On page 138 of Zuur et al. (2009) they make the following statement about a fitted model: …there is a high correlation between the intercept and the slope for arrival. This is because all arrival values are between 22 and 30 … The interce

Re: [R-sig-eco] Re-arrange data frame

2012-06-29 Thread Baldwin, Jim -FS
Sorry. It looked fine when I sent it. Below I've added back in the line feeds that somehow disappeared. Jim -Original Message- From: r-sig-ecology-boun...@r-project.org [mailto:r-sig-ecology-boun...@r-project.org] On Behalf Of Baldwin, Jim -FS Sent: Friday, June 29, 2012 10:28 AM To:

Re: [R-sig-eco] Re-arrange data frame

2012-06-29 Thread David Valentim Dias
You can check reshape or melt functions. They do exactly what you want. 2012/6/29 Baldwin, Jim -FS > Sorry. It looked fine when I sent it. Below I've added back in the line > feeds that somehow disappeared. > > Jim > > > -Original Message- > From: r-sig-ecology-boun...@r-project.org [m