without any clue about your data-file this is definitely unsolvable. But
some things to consider :  Where is the dataset coming from? Did you check
for special characters?  Is there an apostrophe somewhere in a string? (That
messed up things for me once). Is the delimiter placed correctly everywhere?


Did you check how the dataframe looks like? If you see what's the last
observation read in, you can jump to that line number in the txt file and
check yourself what goes wrong.


On Tue, May 25, 2010 at 6:15 PM, Changbin Du <changbind@gmail.com> wrote:

> cdu@nuuk:~/operon$ grep '^#' id_name_gh5.txt
> cdu@nuuk:~/operon$
>
> no lines starts with #
>
>
>
> On Tue, May 25, 2010 at 9:11 AM, Barry Rowlingson <
> b.rowlingson@lancaster.ac.uk> wrote:
>
> > On Tue, May 25, 2010 at 4:42 PM, Changbin Du <changbind@gmail.com>
> wrote:
> > > HI, Dear R community,
> > >
> > > My original file has 1932 lines, but when I read into R, it changed to
> > 1068
> > > lines, how comes?
> > >
> > >
> > > cdu@nuuk:~/operon$ wc -l id_name_gh5.txt
> > > 1932 id_name_gh5.txt
> > >
> > >
> > >> gene_name<-read.table("/home/cdu/operon/id_name_gh5.txt", sep="\t",
> > > skip=0, header=F, fill=T)
> > >> dim(gene_name)
> > > [1] 1068    3
> > >
> > >
> >
> >  Do any of your lines start with a "#"?
> >
> > > read.table("test.txt",sep="\t")
> >      V1
> > 1 line 1
> > 2 line 2
> > 3 line 3
> > 4 line 4
> >
> > > read.table("test.txt",comment.char="",sep="\t")
> >               V1
> > 1          line 1
> > 2      #commented
> > 3          line 2
> > 4          line 3
> > 5 #nother comment
> > 6          line 4
> >
> >  just a guess. hard to tell without the file...
> >
> > Barry
> >
>
>
>
> --
> Sincerely,
> Changbin
> --
>
> Changbin Du
> DOE Joint Genome Institute
> Bldg 400 Rm 457
> 2800 Mitchell Dr
> Walnut Creet, CA 94598
> Phone: 925-927-2856
>
>        [[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.
>



-- 
Joris Meys
Statistical Consultant

Ghent University
Faculty of Bioscience Engineering
Department of Applied mathematics, biometrics and process control

Coupure Links 653
B-9000 Gent

tel : +32 9 264 59 87
Joris.Meys@Ugent.be
-------------------------------
Disclaimer : http://helpdesk.ugent.be/e-maildisclaimer.php

	[[alternative HTML version deleted]]

