Using fread, how to read CSV file which contains row and column names. I tried following but it is not reading the row and column names properly.
The csv file looks like (where C1,C2,C3 are column names and r1, r2, r3 are row names)
input = ",C1,C2,C3
r1,A,B,C
r2,1,3,5
3,2,4,6"
I use function
require(data.table)
fread(input,header = TRUE)
which give
r1 A B C
1: r2 1 3 5
2: 3 2 4 6
How can I properly read CSV using fread?