0

I am trying to import a csv file in r, with the code: read.table(file.choose(), header=T, sep=",") and read.csv(file.choose(), header=T)

but I got the next error: Error in make.names(col.names, unique = TRUE) : invalid multibyte string 7

I tried to solve this with the next code:
Sys.setlocale("LC_CTYPE", "English")

But it gave me some unexpected output. Can somebody give me some feedback or suggestion what to do? The output says:

Warning message:
In Sys.setlocale("LC_CTYPE", "English") : using locale code page other than 65001 ("UTF-8") may cause problems
Ris
  • 31
  • 5
  • Does this answer your question? [Invalid multibyte string in read.csv](https://stackoverflow.com/questions/14363085/invalid-multibyte-string-in-read-csv) – socialscientist Jul 28 '22 at 00:21
  • Please provide an example of what you expect it to produce and what it is actually producing ("unexpected output"). The warning message is just a warning, not an error. See this for solutions: https://stackoverflow.com/questions/14363085/invalid-multibyte-string-in-read-csv – socialscientist Jul 28 '22 at 00:22
  • In this case, the warning message is unrelated to the error – Dan Villarreal Aug 15 '22 at 16:28
  • After the read.csv or read.table with the argument file.choose() I expect a window where I can browse for the csv file, select it and when I say enter (open) it start reading/importing the file. After a couple of seconds it should give me no error, just the data in the dataset – Ris Aug 17 '22 at 20:29

0 Answers0