Import a tab-separated file with differing numbers of elements in each row; prokka output I am using prokka to annotate a bacterial genome:

prokka ecoli.fa

Prokka is outputting a tab-separated file (called PROKKA_12142017.tsv) with differing numbers of elements in each row:

locus_tag    ftype    gene    EC_number    product
BOFHCHGE_00001    CDS    hypothetical protein
BOFHCHGE_00002    CDS    rdgB_1    3.6.1.9    dITP/XTP pyrophosphatase
BOFHCHGE_00003    CDS    hypothetical protein
BOFHCHGE_00004    CDS    hypothetical protein
BOFHCHGE_00005    CDS    hypothetical protein


Does anybody know how I can get round this to import into a dataframe in R?

Is there a way to ask prokka to add something in the gene column?
You don't really need to get around anything, your example can be loaded correctly with read.delim(). The rows with missing values are filled in with blanks. You may, however, prefer the readr package, which handles this a bit more elegantly (it'll tell you which values were missing and not do the annoying string->factor conversion).