r - Fill option for fread -


let's have txt file:

"aa",3,3,3,3 "cc","ad",2,2,2,2,2 "zz",2 "aa",3,3,3,3 "cc","ad",2,2,2,2,2 

with read.csv can:

> read.csv("linktofile.txt", fill=t, header=f)   v1 v2 v3 v4 v5 v6 v7 1 aa  3  3  3  3 na na 2 cc ad  2  2  2  2  2 3 zz  2 na na na na na 4 aa  3  3  3  3 na na 5 cc ad  2  2  2  2  2 

however fread gives

> library(data.table)  > fread("linktofile.txt")    v1 v2 v3 v4 v5 v6 v7 1: cc ad  2  2  2  2  2 

can same result fread?

not currently; wasn't aware of read.csv's fill feature. on plan add ability read dual-delimited files (sep2 sep mentioned in ?fread). variable length vectors read list column each cell vector. but, not padding na.

could add the list please? way you'll notified when status changes.

are there many irregular data formats out there? recall ever seeing regular files, incomplete lines considered error.

update : unlikely done. fread optimized regular delimited files (where each row has same number of columns). however, irregular files read list columns (each cell vector) when sep2 implemented; not filled in separate columns read.csv can do.


Comments

Popular posts from this blog

html - How to style widget with post count different than without post count -

How to remove text and logo OR add Overflow on Android ActionBar using AppCompat on API 8? -

javascript - storing input from prompt in array and displaying the array -