Convert the unknown file format to dataframe in R



I have a .dat file, the contents are not in a csv or tsv file, it’s contents look like the below:

[1] "<Overall Rating>4"                                                                                                                
[2] "<Avg. Price>$173"                                                                                                                 
[3] "<URL>"
[4] ""                                                                                                                                 
[5] "<Author>everywhereman2"

I want to know how to convert this into a dataframe in R. The contents between the < and > would be the column name and following should be the corresponding entry.
I realize I could hard code string extraction corresponding to every column, but is there any inbuilt method?
Please help!


you can use memisc to import stata .dta file into R

also read this


@ajay_ohri The link that you have provided deals with tables as input. I have the data in the format that you can see in the question, I have edited the question to make that clearer. Please edit your answer accordingly.



You might need to .check levels and drop them if needed. You can use file name)

to convert it into data frame