I have a table of info from the web with unusual separators. Between columns, it has ‘1-space and ‘1-tab’. When I used the std. ‘read.table’ with sep=” \t” R kicked it back saying it could only take one byte for a separation. Can I use ‘read.table’ or something else or should I just run gsub or grep, instead?
Share
Try adding this parameter to your read.table call keeping
sep='\t':Setting this flag to
TRUEwill strip leading and trailing white space (unless quoted) that surrounds each entry in a column.