Skip to content
Back to formatted view

Raw Message

Message-ID: <20041130201811.65277.qmail@web53509.mail.yahoo.com>
Date: 2004-11-30T20:18:11Z
From: Srinivas Iyyer
Subject: Reading a tab delimitted text

Dear group,
 I have a tab delimitted text file with 21 column and
1988 rows. When I read the file:

D1 <-
read.table(file="gist_data1.txt",sep="\t",header=T)
> dim(D1)
[1] 1811   20

It reads only 1811 rows from that file.

I saved this file as CSV file and I read it again
using:

> D1 <-
read.csv(file="gist_data1.txt",sep=",",header=T)


> dim(D1)
[1] 1987    1
> 


This timer it reaad correct number of rows and wrong
column numbers. 

Can any one suggest how to read a tab-delimited text
file and read in corect number of lines. 


thank you.
		
__________________________________