Hi,I can see and issue with csv import in R.I have some data files provided to me in csv format. Unfortunately I cannot import them to R. Although when I open them in Excel and import them in Excel format, everything is fine. I know I can convert all files before importing them but I am just curious that that could be.
You are watching: Line 1 appears to contain embedded nulls
this doesn"t work:
data.source.csv but this is fine:
library(readxl)data.source.xls and I"ve got that as a result:
data.frame(stringsAsFactors=FALSE, þÿ.URN. = c("10BE022654416", "10BE022662462", "10BE022001922"), QUESTION = c("Recommendation", "Recommendation", "Choice Dealer"), VERBATIM = c("aaa meer!!!!!", "bbb gesteld", "ccceid"), CONCEPTS = c("-<5|68|180>", "+<7|0|61> -<5|61|106>", "+<7|0|107>") )any thoughts? Maybe that is related to a weird character in the name of the first variable (þÿ.URN)?
andresrcns October 2, 2019, 4:54pm #2
Any chance you can share a link to a sample .csv file that reproduces the issue?
jdb March 21, 2021, 1:24am #3
I had this happen to me and the solution was providing the encoding as UTF-16.
Does the following help at all?
Slavek October 3, 2019, 8:46am #4
, encoding = "UTF-16"
Thank you but encoding did not help. I still have this error:
Warning messages:1: In read.table(file = file, header = header, sep = sep, quote = quote, : line 1 appears to contain embedded nulls2: In read.table(file = file, header = header, sep = sep, quote = quote, : line 2 appears to contain embedded nulls3: In read.table(file = file, header = header, sep = sep, quote = quote, : line 3 appears to contain embedded nulls4: In read.table(file = file, header = header, sep = sep, quote = quote, : line 4 appears to contain embedded nulls5: In read.table(file = file, header = header, sep = sep, quote = quote, : line 5 appears to contain embedded nullsI don"t know how I could attached the file as only pdfs and pictures are allowed.
Slavek November 19, 2020, 7:28afternoon #5
Ok, I"ve got it in Google Drive: https://drive.google.com/open?id=1U5Psb8CxEBYx74RfquGWLlaN1aJWmJmo
andresrcs November 24, 2020, 9:42afternoon #6
You haven"t made the file public, we don"t have access to it.
Slavek November 24, 2020, 9:48afternoon #7
Ooops, sorry.Try now please: https://drive.google.com/open?id=1U5Psb8CxEBYx74RfquGWLlaN1aJWmJmo
Slavek October 7, 2019, 9:16to be #8
I have a feeling this csv problem is an R issue which can be resolved only by converting csv files to excel prior to importing them to R environment. Unless there is a package helping to import weird or corrupter csv files
andresrcns October 8, 2019, 9:40to be #9
Your csv file has a rare encoding that I can"t identify but using "utf16" allows you to read the data, although you lose the special characters like "þÿ"
If you know what the exact encoding is then you can specify it and have the special characters to appear.
See more: Dream League Soccer 2017 Mod Apk, Dream League Soccer 17 Mod Apk Download
Slavek October 8, 2019, 9:41to be #10
header = TRUE, fileEncoding = "utf16")
system closed October 15, 2019, 9:41am #11
This topic was automatically closed 7 days after the last reply. New replies are no longer allowed.