<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<HTML><HEAD>
<META content="text/html; charset=iso-8859-1" http-equiv=Content-Type>
<META content="MSHTML 5.00.2614.3500" name=GENERATOR>
<STYLE></STYLE>
</HEAD>
<BODY bgColor=#ffffff>
<DIV> </DIV>
<DIV><FONT face=Arial size=2>Hi, </FONT></DIV>
<DIV> </DIV>
<DIV><FONT face=Arial size=2>I have what I think is an easy
question.</FONT></DIV>
<DIV> </DIV>
<DIV><FONT face=Arial size=2>I have a data frame, called stockdata, of
stock prices that looks like this:</FONT></DIV>
<DIV> </DIV>
<DIV><FONT face=Arial
size=2><BR> date
ticker close
<BR> 1 01/02/1998 GE
24.667<BR> 2 01/05/1998 GE
25.104<BR> 3
01/06/1998 GE
24.771<BR> 4 01/07/1998 GE
24.979<BR> 5
01/08/1998 GE
24.750<BR> 6 01/02/1998 HIT
71.125<BR> 7 01/05/1998
HIT 72.313<BR> 8
01/06/1998 HIT
72.563<BR> 9 01/02/1998 INTC
36.313<BR>10 01/05/1998 INTC 37.250<BR>11
01/06/1998 INTC 36.563<BR>12
01/07/1998 INTC 36.375<BR>13
01/08/1998 INTC 37.156<BR></DIV></FONT>
<DIV><FONT face=Arial size=2>I would like to turn this data frame into a matrix,
closedata, that looks like </FONT></DIV>
<DIV><FONT face=Arial size=2>this </FONT></DIV>
<DIV><FONT face=Arial
size=2>
GE
HIT INTC
<BR>01/02/1998 24.667 71.125
36.313<BR>01/05/1998 25.104
72.313 37.250<BR>01/06/1998
24.771 72.563
36.563<BR>01/07/1998 24.979 NA
36.375<BR>01/08/1998
24.750 NA
37.156<BR></FONT></DIV>
<DIV><FONT face=Arial size=2> </FONT></DIV>
<DIV><FONT face=Arial size=2>What is the best way to do this?</FONT></DIV>
<DIV> </DIV>
<DIV><FONT face=Arial size=2>I can see how to do it using a loop, but that is a
problem when </FONT></DIV>
<DIV><FONT face=Arial size=2>I have lots of stocks on lots of
dates.</FONT></DIV>
<DIV> </DIV>
<DIV> </DIV>
<DIV><FONT face=Arial size=2>Thanks much,</FONT></DIV>
<DIV> </DIV>
<DIV><FONT face=Arial size=2> Jeff Miller </FONT></DIV>
<DIV> </DIV>
<DIV> </DIV>
<DIV><FONT face=Arial size=2> </DIV></FONT></BODY></HTML>