无法使用R

时间:2015-10-29 16:25:21

标签: r csv

我运行以下内容:

data <- read.csv("C:/Users/user/Desktop/directory/file.csv")

这些是我的警告信息:

Warning messages:
1: In read.table("C:/Users/user/Desktop/directory/file.csv",  :
  line 1 appears to contain embedded nulls
2: In read.table("C:/Users/user/Desktop/directory/file.csv",  :
  line 2 appears to contain embedded nulls

          ....

6: In scan(file = file, what = what, sep = sep, quote = quote, dec = dec,  :
  embedded nul(s) found in input

结果数据框只是一个填充了NA的列。

问题可能是我的所有数据都在一个列中,用逗号分隔(第一行是标题,第二行是示例数据):

stat_breed,tran_disp,train_key,t_type,trainer_Id,horsedata_Id
QH,"Tavares Joe","214801","E",0,0

如何准确读取数据呢?

0 个答案:

没有答案