Re: [R] Break up a data frame

From: Henrique Dallazuanna <wwwhsd_at_gmail.com>
Date: Thu, 20 Mar 2008 08:07:42 -0300

Or perhaps:

xtabs(V3 ~ V2 + V4, data=x)

On 20/03/2008, Ravi S. Shankar <ravis_at_ambaresearch.com> wrote:
> Hi R users,
>
>
>
> I have a dataframe in the below format
>
> xyz 01/03/2007 15.25 USD
>
> xyz 01/04/2007 15.32 USD
>
> xyz 01/02/2008 23.22 USD
>
> abc 01/03/2007 45.2 EUR
>
> abc 01/04/2007 45.00 EUR
>
> abc 01/02/2008 68.33 EUR
>
>
>
> I want to change the above data into the below format
>
>
>
>
>
> xyz 01/03/2007 15.25 USD abc
> 01/03/2007 45.2 EUR
>
> xyz 01/04/2007 15.32 USD abc
> 01/04/2007 45.00 EUR
>
> xyz 01/02/2008 23.22 USD abc
> 01/02/2008 68.33 EUR
>
>
>
> Any help would be welcome
>
>
>
> Thank you
>
>
>
> Ravi
>
>
>
>
>
> This e-mail may contain confidential and/or privileged i...{{dropped:13}}
>
> ______________________________________________
> R-help_at_r-project.org mailing list
> https://stat.ethz.ch/mailman/listinfo/r-help
> PLEASE do read the posting guide http://www.R-project.org/posting-guide.html
> and provide commented, minimal, self-contained, reproducible code.
>

-- 
Henrique Dallazuanna
Curitiba-Paraná-Brasil
25° 25' 40" S 49° 16' 22" O

______________________________________________
R-help_at_r-project.org mailing list
https://stat.ethz.ch/mailman/listinfo/r-help
PLEASE do read the posting guide http://www.R-project.org/posting-guide.html
and provide commented, minimal, self-contained, reproducible code.
Received on Thu 20 Mar 2008 - 11:14:33 GMT

Archive maintained by Robert King, hosted by the discipline of statistics at the University of Newcastle, Australia.
Archive generated by hypermail 2.2.0, at Thu 20 Mar 2008 - 11:30:23 GMT.

Mailing list information is available at https://stat.ethz.ch/mailman/listinfo/r-help. Please read the posting guide before posting to the list.

list of date sections of archive