Welcome to ShenZhenJia Knowledge Sharing Community for programmer and developer-Open, Learning and Share
menu search
person
Welcome To Ask or Share your Answers For Others

Categories

I wanted to use fread function to load all the datasets as I think it would better to use one type of import function so I just sticked to the fread.

Few of my files are in xlsx format and I was saving them to csv format and then using the fread function was trying to load the datasets.

But I noticed that when I converted the xlsx files into csv, an empty or incomplete row was being created in the newly created csv files.

Is there a way I can resolve this issue? Can I load xlsx file somehow using the fread function rather than converting it to csv file and then loading it using the fread function?

See Question&Answers more detail:os

与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
thumb_up_alt 0 like thumb_down_alt 0 dislike
515 views
Welcome To Ask or Share your Answers For Others

1 Answer

Here's how: Using command line tools directly in conjunction with csvkit like this

my.dt<-fread('in2csv my.xls')

与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
thumb_up_alt 0 like thumb_down_alt 0 dislike
Welcome to ShenZhenJia Knowledge Sharing Community for programmer and developer-Open, Learning and Share
...