On Tue, Jun 9, 2015 at 11:24 AM, Ye Lin <ye...@lbl.gov> wrote:

> ​Hey All, I have a txt data file that looks like this:
>
> ​[{“ID”:“A”,“Name":"Tom", "Age":"18"},{“ID”:“B”,“Name":"Jim", "Age":"19"}]
>
>
> ​How can I read this into R as a data frame? I have used readLines to read
> all the lines but dont know how to deal with column names and inputs.
>

​That looks like a JSON array of objects to me. I would look into
"jsonlite", "rjson", or "RJSONIO" on CRAN. You'll need to review them to
see which best meets your needs.​


>
> Thanks for your help!​
>
>         [[alternative HTML version deleted]]
>

​ Please change to plain text. In many cases HTML displays poorly due to
the list trying to change it for you to plain text. And, in that case,
you'll likely be ignored.
​

-- 
Yoda of Borg, we are. Futile, resistance is, yes. Assimilated, you will be.

My sister opened a computer store in Hawaii. She sells C shells down by the
seashore.
If someone tell you that nothing is impossible:
Ask him to dribble a football.

He's about as useful as a wax frying pan.

10 to the 12th power microphones = 1 Megaphone

Maranatha! <><
John McKown

        [[alternative HTML version deleted]]

______________________________________________
R-help@r-project.org mailing list -- To UNSUBSCRIBE and more, see
https://stat.ethz.ch/mailman/listinfo/r-help
PLEASE do read the posting guide http://www.R-project.org/posting-guide.html
and provide commented, minimal, self-contained, reproducible code.

Reply via email to