read.csv blank fields to NA

前端 未结 4 980
予麋鹿
予麋鹿 2020-12-05 10:33

I have tab delimited text file, named \'a.txt\'. The D column is empty.

 A       B       C    D
10      20     NaN
30              40
40      30      20
20           


        
4条回答
  •  北海茫月
    2020-12-05 11:05

    You can specify colClasses in the read.csv statement to read the column as text.

提交回复
热议问题