Re: [R] Read.table mucks up headers

2014-04-26 Thread starter
Hello Uwe & Others Thanks for all your help, I figured out what the problem was. It wasn't working with old R version. Once I updated it to the latest version, it seemed to work. Thank you -- View this message in context: http://r.789695.n4.nabble.com/Read-table-mucks-up-headers-tp4688742p468

Re: [R] Read.table mucks up headers

2014-04-22 Thread Pavneet Arora
ate: 19/04/2014 14:05 Subject: Re: [R] Read.table mucks up headers On 19.04.2014 14:30, starter wrote: > Hello Milan > > It had worked perfectly before, but now I am trying on a different text file > but using the trick you showed I just get the headers in the output and

Re: [R] Read.table mucks up headers

2014-04-21 Thread starter
Hello Uwe I tried both the options you mentioned but all i get as output then is the header line and the headers as "row.names" and "X." -- View this message in context: http://r.789695.n4.nabble.com/Read-table-mucks-up-headers-tp4688742p4689185.html Sent from the R help mailing list archive a

Re: [R] Read.table mucks up headers

2014-04-19 Thread Uwe Ligges
On 19.04.2014 14:30, starter wrote: Hello Milan It had worked perfectly before, but now I am trying on a different text file but using the trick you showed I just get the headers in the output and that too as "row.names" and "X". *code:* corr <- read.table("E:/temp/corrosion data.txt",header=

Re: [R] Read.table mucks up headers

2014-04-19 Thread starter
Hello Milan It had worked perfectly before, but now I am trying on a different text file but using the trick you showed I just get the headers in the output and that too as "row.names" and "X". *code:* corr <- read.table("E:/temp/corrosion data.txt",header=T,fileEncoding="UTF-8-BOM") > dput(corr

Re: [R] Read.table mucks up headers

2014-04-15 Thread Pavneet Arora
Thank you Milan, the fileEncoding bit worked perfectly. From: Milan Bouchet-Valat To: Jeff Newmiller Cc: Pavneet Arora/UK/RoyalSun@RoyalSun, r-help@r-project.org, pavnee...@yahoo.co.uk Date: 14/04/2014 18:03 Subject:Re: [R] Read.table mucks up headers Le lundi 14

Re: [R] Read.table mucks up headers

2014-04-14 Thread Milan Bouchet-Valat
Le lundi 14 avril 2014 à 08:50 -0700, Jeff Newmiller a écrit : > You have not posted the input to your code so it is not reproducible. > Also, you have posted in HTML, which is notorious for corrupting R > code and data in emails. > > If I were to guess, though, it looks to me like you are workin

Re: [R] Read.table mucks up headers

2014-04-14 Thread S Ellison
> But for some reason my first header comes as "?...X. ", instead of just "X". > Can some one please tell me why? And how to fix it? i) What were the separator characters in the original data file header row? ii) Your first character is not being decoded properly; check the file encoding and set

Re: [R] Read.table mucks up headers

2014-04-14 Thread Jeff Newmiller
You have not posted the input to your code so it is not reproducible. Also, you have posted in HTML, which is notorious for corrupting R code and data in emails. If I were to guess, though, it looks to me like you are working with a UTF-8 file with a Byte Order Mark (header). I don't know the "

[R] Read.table mucks up headers

2014-04-14 Thread Pavneet Arora
Hey All I am trying to read in a small text file using read.table. dput(sim) structure(list(ï...X. = 1:7, Y1 = c(2.5501, 4.105, 5.4687, 7.0009, 8.5066, 9.785, 11.5167), Y2 = c(2.5501, 4.105, 5.4687, 11.0009, 8.5066, 9.785, 11.5167), Y3 = c(2.5501, 4.105, 5.4687, 7.0009, 8.5066, 9.785, 15.516