Changbin, It looks you're trying to read in a gene annotation file and usually it has many strange characters, e.g. "#", "&", .... (as other people also suggest). I encounter this all the time. So try to be very thorough about your search (the first place I'll look for is the line where R stop reading. See if any thing strange there.)
Also, changing "read.table" to "read.delim" often works. ...Tao ----- Original Message ---- > From: Changbin Du <changb...@gmail.com> > To: David Winsemius <dwinsem...@comcast.net> > Cc: r-help@r-project.org > Sent: Tue, May 25, 2010 9:12:58 AM > Subject: Re: [R] R eat my data > > 644727344 ABC-2 type transporter ABC-2 type > transporter 644727345 conserved hypothetical protein > conserved hypothetical protein Here is the last two lines of > the file id_name_gh5.txt. On Tue, May 25, 2010 at 8:57 AM, David > Winsemius < > href="mailto:dwinsem...@comcast.net">dwinsem...@comcast.net>wrote: > > > On May 25, 2010, at 11:42 AM, Changbin Du wrote: > > HI, Dear > R community, >> >> My original file has 1932 lines, but when I > read into R, it changed to >> 1068 >> lines, how > comes? >> > > We are being asked to investigate this quest, > how? > > Have you looked at the last line to see if it looks like > gene_name? > > Isn't this isomorphic to genetics questions? What > sort of mutation is it? > Deletion? Abnormal stop codon? Figure out where > the transcription process > went wrong. This sort of analysis would > appear to be right up the alley of > someone doing > genetics. > > > >> >> c...@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 >> >> >> > -- >> > > > David Winsemius, MD > West > Hartford, CT > > -- > Sincerely, Changbin -- [[alternative HTML > version deleted]] ______________________________________________ > ymailto="mailto:R-help@r-project.org" > href="mailto:R-help@r-project.org">R-help@r-project.org mailing list > href="https://stat.ethz.ch/mailman/listinfo/r-help" target=_blank > >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. ______________________________________________ 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.