[R] Reshape? I need it?

2010-08-05 Thread spigo
Dear all, I'm new here, I'm starting to learn R (oh my God!!). So, now I'm in panic because I have this situation: TIPO Avariato A 0.05 B 0.09 A 9 B 8 A 9 B 3 and this is what I would like to do: AvariatoA B Avariato0.050.09

Re: [R] Reshape? I need it?

2010-08-05 Thread Michael Bedward
Hello, For that simple case you could just do... newdf - data.frame(A=df[df$TIPO == A,2], B=df[df$TIPO == B,2]) where df is the name of your existing data.frame Michael On 5 August 2010 20:57, spigo nicola.spigo...@gmail.com wrote: Dear all, I'm new here, I'm starting to learn R (oh my

Re: [R] Reshape? I need it?

2010-08-05 Thread Henrique Dallazuanna
Try this: unstack(DF, Avariato ~ TIPO) On Thu, Aug 5, 2010 at 7:57 AM, spigo nicola.spigo...@gmail.com wrote: Dear all, I'm new here, I'm starting to learn R (oh my God!!). So, now I'm in panic because I have this situation: TIPO Avariato A 0.05 B 0.09 A 9 B

Re: [R] Reshape? I need it?

2010-08-05 Thread Stefan Grosse
Am 05.08.2010 12:57, schrieb spigo: I don't know how to do it. I need to use reshape? how? thanks for your reply. example(reshape) Stefan __ R-help@r-project.org mailing list https://stat.ethz.ch/mailman/listinfo/r-help PLEASE do read the posting