Hallo, can someone please help me. I have a proplem reading a file with more that one rows. e.g I used the function: p<-read.table(file="FILENAME ", header=TRUE,sep=";") and later used the data.Frame() function. It functions when the file has only a row of variables. When I insert the second row I get an error message. How do I do this ========================Sylvie B. Forkusam Eppelheimer Str.52/A2-5-2 69115 Heidelberg, Germany Tel: (0049)-06221/346913 Mobile: 0179-6816276 ====================== __________________________________ Free Pop-Up Blocker - Get it now
On Wed, 19 Nov 2003, forkusam wrote:> Hallo, > can someone please help me. > I have a proplem reading a file with more that one > rows. > e.g I used the function: > p<-read.table(file="FILENAME ", header=TRUE,sep=";") > and later used the data.Frame() function. > It functions when the file has only a row of > variables. > When I insert the second row I get an error message. > How do I do this1) Have you read through the documentations? 2) Are you sure each field is separated by a semi-colon ";"? 3) Exactly what the error messages are? It is kind of difficult to diagnose your problem without knowing the error messages! -- Cheers, Kevin --------------------------------------------------------------- "Try not. Do, do! Or do not. There is no try" Jedi Master Yoda ---- Ko-Kang Kevin Wang Master of Science (MSc) Student SLC Tutor and Lab Demonstrator Department of Statistics University of Auckland New Zealand Homepage: http://www.stat.auckland.ac.nz/~kwan022 Ph: 373-7599 x88475 (City) x88480 (Tamaki)
On Wed, Nov 19, 2003 at 11:11:27PM -0800, forkusam wrote:> p<-read.table(file="FILENAME ", header=TRUE,sep=";") > and later used the data.Frame() function. > It functions when the file has only a row of > variables.It is not at all clear to me what you are doing and what is going wrong. Please provide a (short) example of what exactly you do, what error messages and warnings you get and what your input file looks like. BTW: read.table returns a data frame so I'm not sure what you mean by using data.frame() later on. cu Philipp -- Dr. Philipp Pagel Tel. +49-89-3187-3675 Institute for Bioinformatics / MIPS Fax. +49-89-3187-3585 GSF - National Research Center for Environment and Health Ingolstaedter Landstrasse 1 85764 Neuherberg, Germany
On Thu, 20 Nov 2003, forkusam wrote:> Hi; > Thanks for the quick reply. I am presently not sittinh infront of my computer so I can't tell you the exact error message but. > > I have read through the documentation and have found nothing of help. > Yes. the columns are separated by semicolons > My problem is: I do not know the command / or parameter I need to read the rows and process the stored information one after the other.read.table() should know how to read each rows, can you provide an subset of your data? -- Cheers, Kevin --------------------------------------------------------------- "Try not. Do, do! Or do not. There is no try" Jedi Master Yoda ---- Ko-Kang Kevin Wang Master of Science (MSc) Student SLC Tutor and Lab Demonstrator Department of Statistics University of Auckland New Zealand Homepage: http://www.stat.auckland.ac.nz/~kwan022 Ph: 373-7599 x88475 (City) x88480 (Tamaki)