is there a way to convert txt file data into Dataframe in R
For example, I have a df.txt file in my project folder
df.csv
"a", "e", "b", "c" ,"d", "f"
a 1, e 1, b1 ,c1 ,d1, f1
"a", "e", "b" ,"c" ,"d" ,"f"
a1, e1, sdf, c1 ,d1, f1
"a" ,"e" ,"b", "c", "d" ,"f"
a1 ,e1, sdf, sdf,d1 ,f1
"a", "e", "b" ,"c" ,"d", "f", "z"
a2, e1 ,b1, c1, d1, f1, z1
Expected output
a e b c d f z ### column names
a 1 e 1 b1 c1 d1 f1 NA
a1 e1 sdf c1 d1 f1 NA
a1 e1 sdf sdf d1 f1 NA
a2 e1 b1 c1 d1 f1 z1