<!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.3105.105" name=GENERATOR>
<STYLE></STYLE>
</HEAD>
<BODY bgColor=#ffffff>
<DIV><FONT size=2>Hello,</FONT></DIV>
<DIV> </DIV>
<DIV><FONT size=2> I'm trying to read a file that has ascci
data in it. The format of the data</FONT></DIV>
<DIV><FONT size=2>is in this order: test_number(integer) 4 double readings.
Simple,ok, but for </FONT></DIV>
<DIV><FONT size=2>life of me I can't get R to put it into the internal
format I need. What I want</FONT></DIV>
<DIV><FONT size=2>to do is to make an array called dat and dim it 10000 rows by
5 columns.</FONT></DIV>
<DIV><FONT size=2>That seems simple enough, I start out by:</FONT></DIV>
<DIV><FONT size=2></FONT> </DIV>
<DIV><FONT size=2>dat <- array(0,dim=c(10000,5)) this looks
ok. </FONT></DIV>
<DIV><FONT size=2>The next thing I did was to scan in the data.</FONT></DIV>
<DIV><FONT size=2>dat
<-scan("mydata-file",what=array(""),sep="\n").</FONT></DIV>
<DIV><FONT size=2>I get the data into the dat array but its looks like a
string.</FONT></DIV>
<DIV><FONT size=2>ie "1000 34.5 34.7 35 35.6".</FONT></DIV>
<DIV><FONT size=2>what I want is to make each of these data point go into
</FONT></DIV>
<DIV><FONT size=2>the appropriate array index ie:</FONT></DIV>
<DIV><FONT size=2>dat[1][1] dat[1][2] dat[1][3]
dat[1][4] dat[1][5]</FONT></DIV>
<DIV><FONT size=2> 1000
34.5
34.7
35 35.6</FONT></DIV>
<DIV> </DIV>
<DIV><FONT size=2>Any help would be greatly appreciated.</FONT></DIV>
<DIV> </DIV>
<DIV><FONT size=2>Thank you</FONT></DIV></BODY></HTML>