Error is reading a .tsv file

Am trying to import a dataset using read.tsv

Test <- read_tsv(file = "test.tsv", quote= "")

Test <- read.table("test.tsv", sep="\t", header=T,quote="", comment.char="", stringsAsFactors=F)

however in both ways it fails and gives me an weird result
Parsed with column specification:
cols(
D = col_logical(),
col_logical(),
_1 = col_logical(),
_2 = col_logical(),
_3 = col_logical(),
_4 = col_logical(),
_5 = col_logical(),
_6 = col_logical(),
_7 = col_logical(),
_8 = col_logical(),
_9 = col_logical(),
_10 = col_logical(),
_11 = col_logical(),
_12 = col_logical(),
_13 = col_logical()
)
Warning: 463968 parsing failures.
row col expected actual file
1 D 1/0/T/F/TRUE/FALSE 'test.tsv'
1 -- 15 columns 1 columns 'test.tsv'
2 D 1/0/T/F/TRUE/FALSE 'test.tsv'
2 1/0/T/F/TRUE/FALSE 'test.tsv'
2 _1 1/0/T/F/TRUE/FALSE 'test.tsv'
... ... .................. ......... ............................
See problems(...) for more details.

My test dataset is below :

Department Division Name Sub Id Btype main_group main_classification Screen Description Contributor Foreground (Min.) Background (Min.) Minimized (Min.) Locked (Min.) Hits
CSO CF C, An 36 BA Analytics Analytics BC29 Municipal Bonds 1.21 105.2 0.84 40.23 1
CSO CF C, An 36 BA Analytics Analytics YAS Yield & Spread Analysis 13.22 1482.75 101.03 833.96 26
CSO CF C, An 36 BA BSP Not-Relevant (NR) EIS Exchange Info Systems 0 0 0 0 1
CSO CF C, An 36 BA BSP Not-Relevant (NR) HELP BHS 1 0 0 0 16

Please help

had to include fileEncoding="UTF-8" which fixed it

This topic was automatically closed 7 days after the last reply. New replies are no longer allowed.

If you have a query related to it or one of the replies, start a new topic and refer back with a link.