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
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
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
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=
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
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
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
> 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
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 "
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
10 matches
Mail list logo