首页 > 解决方案 > R fread 输入返回 0 行

问题描述

我无法理解我的 fread 进口出了什么问题。当我使用具有相同参数的 read.csv 时,数据正在正确读取,但我无法使用它,因为其他文件无法使用它。

    ths<-read.csv(path_data, sep = ",",header = TRUE,stringsAsFactors = FALSE)
    df <- data.table::fread(file=path_data,
        header = TRUE,
        sep = ",",quote = '',stringsAsFactors = FALSE)
      

我不能给你文件所以这里是一个数据样本:

> "hal-02409822,1,https://hal.archives-ouvertes.fr/hal-02409822,ART,10.1063/1.5127050,,Plasma
> diagnostic tools for ECR ion sources—What can we learn from these
> experiments for the next generation sources,,""O. Tarvainen,T.
> Kalvas,H. Koivisto,R. Kronholm,M. Marttinen,M. Sakildien,V.
> Toivanen,I. Izotov,V. Skalyga,J.
> Angot"",2019,2019,""0.phys,1.phys.phys,2.phys.phys.phys-acc-ph,0.phys"",Rev.Sci.Instrum.,,90,,113321,,,,,,""phys,phys"",,phys.phys.phys-acc-ph,en,false"
> "hal-02277876,1,https://hal.archives-ouvertes.fr/hal-02277876,ART,10.1103/PhysRevE.100.013205,,Physics
> of relativistic collisionless shocks: The scattering-center
> frame,,""Guy Pelletier,Laurent Gremillet,Arno Vanthieghem,Martin
> Lemoine"",2019,2019,""0.phys,1.phys.astr,0.phys,1.phys.phys,2.phys.phys.phys-gen-ph"",""Physical
> Review E : Statistical, Nonlinear, and Soft Matter Physics"",American
> Physical Society,100,,013205,,,,,Plasma Physics,""phys,phys"",Plasma
> Physics,phys.astr,en,false"

标签: rcsvfread

解决方案


推荐阅读