Re: [R] transposition problem

2008-04-16 Thread Geoff Russell
Many thanks -- the "unname" makes all the difference. Geoff. On 4/16/08, Henrique Dallazuanna <[EMAIL PROTECTED]> wrote: > Try this: > > x <- read.table(textConnection("\"1989-90\",\"1990-91\" > Barley,23,34 > Oats,15,16"), sep = ",", header = T, check.names = FALSE) > > t(x) > > or if you want y

Re: [R] transposition problem

2008-04-16 Thread Henrique Dallazuanna
Try this: x <- read.table(textConnection("\"1989-90\",\"1990-91\" Barley,23,34 Oats,15,16"), sep = ",", header = T, check.names = FALSE) t(x) or if you want year as column and not rownames: data.frame(Year = names(x), t(unname(x))) On Wed, Apr 16, 2008 at 7:27 AM, Geoff Russell <[EMAIL PROTEC

[R] transposition problem

2008-04-16 Thread Geoff Russell
Hi use Rs, I have a csv file: "1989-90","1990-91" Barley,23,34 Oats,15,16 Which I want to turn into: year, Barley, Oats 1 "1989-90", 23, 15 2 "1990-91",34,16 Transpose doesn't quite do it, is there a standard way? Cheers, Geoff Russell __ R-he