Skip to content

Reading multiple line from a JSON formatted file

1 message · Shelby McIntyre

#
Below is R code that successfully reads the first line of a JSON file (attached). 
However, it is supposed to read 5 lines of the file, not just one.  What is the 
wrong? 

====================
$votes 
$votes$funny 
[1] 1 

$votes$useful 
[1] 8 

$votes$cool 
[1] 1 


$user_id 
[1] "TFm6azL9LLpljgVKx-Vfkw" 

$name 
[1] "E L." 

$url 
[1] "http://www.yelp.com/user_details?userid=TFm6azL9LLpljgVKx-Vfkw" 

$average_stars 
[1] 3.5 

$review_count 
[1] 12 

$type 
[1] "user" 
-------------- next part --------------
An embedded and charset-unspecified text was scrubbed...
Name: Yelp-academic-dataset SAMPLE.txt
URL: <https://stat.ethz.ch/pipermail/r-help/attachments/20120708/407631fe/attachment.txt>