Re: [R] read.delim skips first column (why?)

2009-07-15 Thread Paolo Sonego
This should work: junk <-read.table("fd0edfab.txt", sep="", header=T, fill=F,quote=" ") HIH Paolo Sonego __ 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/post

Re: [R] read.delim skips first column (why?)

2009-07-14 Thread Gabor Grothendieck
Try count.fields("myfile.txt", sep = "\t") read.delim uses sep = "\t" but there are trailing tabs on some lines. The first line, i.e. with the headers, has three trailing tabs so it thinks that there are 15 columns rather than 12. The 5th line of the file (4th line of data) has 4 trailing tabs

Re: [R] read.delim skips first column (why?)

2009-07-14 Thread Petr PIKAL
Hi > str(read.table("test.txt", header=T)) 'data.frame': 9 obs. of 12 variables: $ snp : Factor w/ 9 levels "rs1113188","rs1113397",..: 9 5 7 8 3 4 6 1 2 $ gene : Factor w/ 1 level "TRP2": 1 1 1 1 1 1 1 1 1 $ chromosome : int 3 3 3 3 3

Re: [R] read.delim skips first column (why?)

2009-07-14 Thread Giovanni Marco Dall'Olio
Hi, I have uploaded a copy of the file here: - http://pastebin.com/fd0edfab the file has also been passed throught the unix command tool unexpand, but it doesn't solve the problem. using head=TRUE instead of head=T has also the same effect. the output of print(names) is: > print(names(ngly), quo

[R] read.delim skips first column (why?)

2009-07-13 Thread Giovanni Marco Dall'Olio
Hi people, I have a text file like this one posted: snp_id genechromosome distance_from_gene_center positionpop1pop2pop3pop4pop5pop6pop7 rs2129081 RAPT2 3 -129993 "upstream" 0.439009 1.169210NA 0.2330200.093042