On 22/02/2011 10:43 AM, John Edwards wrote:
Hi,

I have the following input file.
$ cat main.txt
CEL_A CELL_B
1 4
2 5
2 6

Then I run read.table in R.

>  f=read.table('main.txt', header=T, check.names=F, sep='\t')
>  head(f)
   \ufeffCEL_A CELL_B
1    1      4
2    2      5
3    2      6
>  f$CEL_A
NULL

I'm not sure where the special character \ufeff comes from. Could anybody
let me know what is the problem?


The Unicode character "\uFEFF" is the "byte-order mark". This is commonly used in Windows systems, not so commonly on others, which tend to get confused by it. You didn't say what system you are working on and what encoding was used for the file; those are likely both important.

Duncan Murdoch

______________________________________________
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