Hello to everyone, I have gotten my file to print to screen but when I use read.table I am getting an error message that says there are" more columns than column names."This is a file that was not created by me so I am not sure how to investigate and solve this problem.I looked in the help file and it suggested an auxilliary function called count.fieldsThe code that was used was: read.table(file="C:\\Documents and Settings\\Owner\\My Documents\\colon cancer1.txt",header=T,row.names=1) Any help would be appreciated paul [[alternative HTML version deleted]]
Hi Paul, The easiest thing to to is to open the file using a text editor (Notepad will do) and examine the first few lines. You can add add a column name if needed. Julian Paul Adams wrote:> Hello to everyone, > I have gotten my file to print to screen but when I use read.table I am getting an error message that > says there are" more columns than column names."This is a file that was not created by me so I am > not sure how to investigate and solve this problem.I looked in the help file and it suggested an auxilliary function called count.fieldsThe code that was used was: > read.table(file="C:\\Documents and Settings\\Owner\\My Documents\\colon cancer1.txt",header=T,row.names=1) > Any help would be appreciated > paul > > > > [[alternative HTML version deleted]] > > ______________________________________________ > R-help at 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.
Dear Paul, Perhaps read.delim2() can do the job easily. HTH, Jorge On Mon, Jun 2, 2008 at 3:41 PM, Paul Adams <pma3622@yahoo.com> wrote:> Hello to everyone, > I have gotten my file to print to screen but when I use read.table I am > getting an error message that > says there are" more columns than column names."This is a file that was not > created by me so I am > not sure how to investigate and solve this problem.I looked in the help > file and it suggested an auxilliary function called count.fieldsThe code > that was used was: > read.table(file="C:\\Documents and Settings\\Owner\\My Documents\\colon > cancer1.txt",header=T,row.names=1) > Any help would be appreciated > paul > > > > [[alternative HTML version deleted]] > > ______________________________________________ > 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. >[[alternative HTML version deleted]]