Error in make.names(col.names, unique = TRUE) : invalid multibyte string at ' <0a> '
I am trying to read a delimited text file with the .csv extension, but it says that it is UTF-16 Unicode text.txt file: df <- read.delim("/Users/admin/Downloads/data1.csv", sep = ",") # Error in make.names(col.names, unique = TRUE) : # invalid multibyte string at '<ff><fe> # # <0a> # # <ff><fe>' warnings() # Warning messages: # 1: In grep("^[^#].*", lines, value = TRUE) : # input string 1 is invalid in this locale # 2: In read.table(path, encoding = encoding, header = header, ... : # line 1 appears to contain embedded nulls How can I avoid this error and correctly read my CSV file?
0 upvotes
View original discussion ↗
Comments
Sign in or sign up to comment and upvote.
No comments yet.