Re: [R] transposing data

2010-03-07 Thread Frank Tamborello
Ah, this clarifies what the reshape documentation referred to as the "timevar" argument. I'd gone wrong because I'd been confusing reshape's functionality with that of SPSS's cassestovars command, which is where I'm coming from. Your recommendation seems to lead to exactly that I was lookin

Re: [R] transposing data

2010-03-05 Thread Phil Spector
Frank - I think you need to create a composite time variable to do what you want to do: exp1.r5$key = with(exp1.r5,paste(CannonAngle,CannonOriB, CannonOriR,nRedPelelts,TargetColor,tbearing,sep='.')) exp1.r5.use = subset(exp1.r5,select=-c(CannonAngle,CannonOriB,

[R] transposing data

2010-03-05 Thread Frank Tamborello
Hi. I have repeated measures data of the form where each observation is a trial, and trials are grouped by subject, and variables encode whatever level of a factor was present during that trial, and the dependent variable is response time (RT). I want to transpose the data to a form suitabl

Re: [R] Transposing Data Frame does not return numeric entries

2008-04-15 Thread Bill.Venables
: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On Behalf Of stephen sefick Sent: Wednesday, 16 April 2008 10:40 AM To: Rolf Turner Cc: r-help@r-project.org Subject: Re: [R] Transposing Data Frame does not return numeric entries ok site1 site2 site3 site4 species1 1 2 3

Re: [R] Transposing Data Frame does not return numeric entries

2008-04-15 Thread stephen sefick
ok site1 site2 site3 site4 species1 1 2 3 4 species2 30 4 5 species3 5 3 73 spesies4 0 3 67 species1 species2 species3 species4 site1 1

Re: [R] Transposing Data Frame does not return numeric entries

2008-04-15 Thread Rolf Turner
RML: *** Data frames are NOT matrices!!! *** On 16/04/2008, at 10:35 AM, stephen sefick wrote: > x <- read.table("LittleGarvin.csv", sep=",", header=TRUE) > y <- t(x) > str(y) > > chr [1:193, 1:288] "oligocha" "0" " 0" " 0" " 0" "0" ... > - attr(*, "dimnames")=List of 2 > ..$ : chr [1:193]

[R] Transposing Data Frame does not return numeric entries

2008-04-15 Thread stephen sefick
I have a species as rows and sites as columns matrix. I would like to tranpose this matrix so that I can do an NMDS analysis with the vegan package. I have used y <- t(x) and it indeed transposes the matrix, but it changes the whole make up chr [1:193, 1:288] "oligocha" "0" " 0" " 0" " 0" "0"

[R] Transposing Data Frame does not return numeric entries

2008-04-15 Thread stephen sefick
x <- read.table("LittleGarvin.csv", sep=",", header=TRUE) y <- t(x) str(y) chr [1:193, 1:288] "oligocha" "0" " 0" " 0" " 0" "0" ... - attr(*, "dimnames")=List of 2 ..$ : chr [1:193] "X" "upwd1201" "upwd0502" "upwd0702" ... ..$ : NULL x is a data frame with a whole bunch of numeric vectors I