0

I try to read a txt file in windows and appear an Error warning :

machine_delim <- read.delim("C:/KOMSTAT/mini project/machine.txt", header = TRUE, sep = "\t")


Error in make.names(col.names, unique = TRUE) : 
  invalid multibyte string at '<ff><fe>N'
In addition: Warning messages:
1: In read.table(file = file, header = header, sep = sep, quote = quote,  :
  line 1 appears to contain embedded nulls
2: In read.table(file = file, header = header, sep = sep, quote = quote,  :
  line 2 appears to contain embedded nulls
3: In read.table(file = file, header = header, sep = sep, quote = quote,  :
  line 3 appears to contain embedded nulls
4: In read.table(file = file, header = header, sep = sep, quote = quote,  :
  line 4 appears to contain embedded nulls
5: In read.table(file = file, header = header, sep = sep, quote = quote,  :
  line 5 appears to contain embedded nulls
Phil
  • 7,287
  • 3
  • 36
  • 66

1 Answers1

0

use the iconv utility (e.g., "iconv file.pcl -f UTF-8 -t ISO-8859-1 -c"). The "-c" option skips characters that can't be translated. This work for me