Hello Uwe 
I tried both the options you mentioned, but it didnt work. All i get as 
output then is the header line and the headers as "row.names" and "X." 

I am using R-Studio v0.98 






From:   Uwe Ligges <lig...@statistik.tu-dortmund.de>
To:     Pavneet Arora/UK/RoyalSun@RoyalSun, r-help@r-project.org
Date:   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 
that
> too as "row.names" and "X".
>
> *code:*
> corr <- read.table("E:/temp/corrosion
> data.txt",header=T,fileEncoding="UTF-8-BOM")


Which R version?
Are you sure this is UTF-8-BOM and not "UCS-2LE" or "UTF-16LE"?

Best,
Uwe Ligges


>> dput(corr)
> structure(list(ï...Weight. = c(13.74, 12.97, 10.78, 10.53, 10.16,
> 9.38, 9.23, 9.2, 17.24, 18, 15.12, 16.08, 13.71, 13.81, 12.61,
> 14.03), Piece = c(1L, 1L, 1L, 1L, 1L, 1L, 1L, 1L, 2L, 2L, 2L,
> 2L, 2L, 2L, 2L, 2L), Time = c(96L, 84L, 72L, 60L, 48L, 36L, 24L,
> 12L, 96L, 96L, 72L, 60L, 48L, 36L, 24L, 12L)), .Names = c("ï...Weight.",
> "Piece", "Time"), class = "data.frame", row.names = c(NA, -16L
> ))
>
>> str(corr)
> 'data.frame':          16 obs. of  3 variables:
>   $ ï...Weight.: num  13.7 13 10.8 10.5 10.2 ...
>   $ Piece      : int  1 1 1 1 1 1 1 1 2 2 ...
>   $ Time       : int  96 84 72 60 48 36 24 12 96 96 ...
>
> Please tell me what I am doing wrong.
>
>
>
> --
> View this message in context: 
http://r.789695.n4.nabble.com/Read-table-mucks-up-headers-tp4688742p4689099.html

> Sent from the R help mailing list archive at Nabble.com.
>
> ______________________________________________
> 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.
>


______________________________________________________________________________________________
The following message has been automatically added  to comply with the RSA
Group IT Security requirements:

This email have arrived via the Internet without any form of encryption or
verification of the sender. 
As such you should be especially cautious about its origin and content.
Replies which contain sensitive information or legal/contractual 
obligations are particularly vulnerable. 
In these cases you should not reply unless you are authorised to do so, 
and adequate encryption is employed.

If you have any questions, please speak to the Service Centre on x7979.
______________________________________________________________________________________________



***********************************************************************************************************************************************************************************************************************
MORE TH>N is a trading style of Royal & Sun Alliance Insurance plc (No. 93792). 
Registered in England and Wales at St. Mark’s Court, Chart Way, Horsham, West 
Sussex, RH12 1XL. 

Authorised by the Prudential Regulation Authority and regulated by the 
Financial Conduct Authority and the Prudential Regulation Authority.
************************************************************************************************************************************************************************************************************************

        [[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.

Reply via email to