Megh Dal <megh700004 <at> yahoo.com> writes:

> 
> Hi all, I have a datasei like this :
> 
>   ID      Date             Price
>   aa     01/01/07       12
>   aa    01/02/07         13
>   bb     01/01/07        23
>   bb    01/02/07        12
> 
>    
>   Now I want to write them in following format :
> 
>   ID      Date             Price   ID      Date             Price
>   aa     01/01/07       12        bb     01/01/07        23
>   aa    01/02/07         13       bb    01/02/07        12   
> 
>   Is there any way to do this by some automated way?

The closest guess is to use reshape(... direction= "wide"). Be warned, reshape
is powerful and has a somewhat complex syntax. The alternative is to use the
package reshape by Hadley Wickham. 

Dieter

______________________________________________
R-help@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.

Reply via email to