<!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>&nbsp;</DIV>
<DIV><FONT face=Arial size=2>Hi, </FONT></DIV>
<DIV>&nbsp;</DIV>
<DIV><FONT face=Arial size=2>I have what I think is an easy 
question.</FONT></DIV>
<DIV>&nbsp;</DIV>
<DIV><FONT face=Arial size=2>I have a data frame,&nbsp;called stockdata, of 
stock prices that looks like this:</FONT></DIV>
<DIV>&nbsp;</DIV>
<DIV><FONT face=Arial 
size=2><BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; date 
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; ticker&nbsp; &nbsp;&nbsp;&nbsp;&nbsp; close 
<BR>&nbsp;1 01/02/1998&nbsp;&nbsp;&nbsp;&nbsp;GE &nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 
24.667<BR>&nbsp;2 01/05/1998&nbsp;&nbsp;&nbsp;&nbsp;GE 
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 25.104<BR>&nbsp;3 
01/06/1998&nbsp;&nbsp;&nbsp;&nbsp;GE &nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 
24.771<BR>&nbsp;4 01/07/1998&nbsp;&nbsp;&nbsp;&nbsp;GE 
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 24.979<BR>&nbsp;5 
01/08/1998&nbsp;&nbsp;&nbsp;&nbsp;GE&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 
24.750<BR>&nbsp;6 01/02/1998&nbsp;&nbsp;&nbsp; HIT 
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 71.125<BR>&nbsp;7 01/05/1998&nbsp;&nbsp;&nbsp; 
HIT &nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 72.313<BR>&nbsp;8 
01/06/1998&nbsp;&nbsp;&nbsp; HIT &nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 
72.563<BR>&nbsp;9 01/02/1998&nbsp;&nbsp;&nbsp; INTC &nbsp;&nbsp;&nbsp; 
36.313<BR>10 01/05/1998&nbsp;&nbsp; INTC &nbsp;&nbsp;&nbsp; 37.250<BR>11 
01/06/1998&nbsp;&nbsp; INTC &nbsp;&nbsp;&nbsp; 36.563<BR>12 
01/07/1998&nbsp;&nbsp; INTC &nbsp;&nbsp;&nbsp; 36.375<BR>13 
01/08/1998&nbsp;&nbsp; INTC &nbsp;&nbsp;&nbsp; 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>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 
&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp;&nbsp; GE&nbsp;&nbsp;&nbsp; 
&nbsp;&nbsp;&nbsp;&nbsp; 
HIT&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;INTC 
<BR>01/02/1998 &nbsp;&nbsp;&nbsp; 24.667 &nbsp;&nbsp;&nbsp; 71.125 
&nbsp;&nbsp;&nbsp; 36.313<BR>01/05/1998 &nbsp;&nbsp;&nbsp; 25.104 
&nbsp;&nbsp;&nbsp; 72.313 &nbsp;&nbsp;&nbsp; 37.250<BR>01/06/1998 
&nbsp;&nbsp;&nbsp; 24.771 &nbsp;&nbsp;&nbsp; 72.563 &nbsp;&nbsp;&nbsp; 
36.563<BR>01/07/1998 &nbsp;&nbsp;&nbsp; 24.979&nbsp;&nbsp;&nbsp;&nbsp; NA 
&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp;&nbsp; 36.375<BR>01/08/1998 
&nbsp;&nbsp;&nbsp; 24.750&nbsp;&nbsp;&nbsp;&nbsp; NA &nbsp;&nbsp;&nbsp; 
&nbsp;&nbsp;&nbsp;&nbsp; 37.156<BR></FONT></DIV>
<DIV><FONT face=Arial size=2>&nbsp;</FONT></DIV>
<DIV><FONT face=Arial size=2>What is the best way to do this?</FONT></DIV>
<DIV>&nbsp;</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>&nbsp;</DIV>
<DIV>&nbsp;</DIV>
<DIV><FONT face=Arial size=2>Thanks much,</FONT></DIV>
<DIV>&nbsp;</DIV>
<DIV><FONT face=Arial size=2>&nbsp;&nbsp;&nbsp; Jeff Miller </FONT></DIV>
<DIV>&nbsp;</DIV>
<DIV>&nbsp;</DIV>
<DIV><FONT face=Arial size=2>&nbsp;</DIV></FONT></BODY></HTML>