[R] Read Unicode text (*.txt)

javad bayat j@b@y@t194 @end|ng |rom gm@||@com
Mon Jul 1 13:33:11 CEST 2019


Dear R users;
I am trying to read an excel CSV file (1.csv). When I read it as csv file
in R, the R shows me the exact number of row. But it puts all columns in
one column, while I have 3 or 4 columns in the data frame.
"
d4 = read.table("./4.csv",sep=";",header=TRUE)
     Warning messages:
     1: In read.table("./4.csv", sep = ";", header = TRUE) :
      line 1 appears to contain embedded nulls
     2: In read.table("./4.csv", sep = ";", header = TRUE) :
     line 2 appears to contain embedded nulls
     3: In read.table("./4.csv", sep = ";", header = TRUE) :
     line 3 appears to contain embedded nulls
     4: In read.table("./4.csv", sep = ";", header = TRUE) :
     line 4 appears to contain embedded nulls
     5: In read.table("./4.csv", sep = ";", header = TRUE) :
    line 5 appears to contain embedded nulls
     6: In read.table("./4.csv", sep = ";", header = TRUE) :
    line 1 appears to contain embedded nulls
     7: In scan(file = file, what = what, sep = sep, quote = quote, dec =
dec,  :
       embedded nul(s) found in input
> attach(d4)
> dim(d4)
[1] 1814394       1
"
I opened the csv file in excel and I tried to make a new csv (delimited)
file. I dont know why in the "save as type" box Unicode text (*.txt) is
written. Why the format is txt while the file extension is .CSV?
Please help me to read this format correctly.
Many thanks.



-- 
Best Regards
Javad Bayat
M.Sc. Environment Engineering
Alternative Mail: bayat194 using yahoo.com

	[[alternative HTML version deleted]]



More information about the R-help mailing list