Re: [R] how to read a local JSON file

2015-06-07 Thread Prof Brian Ripley
On 07/06/2015 08:10, Berend Hasselman wrote: On 07-06-2015, at 07:50, Ye Lin wrote: Hi All, I downloaded a data file from dropbox and its in JSON format. here is my code: library(RJSONIO) data <- fromJSON(file='C:/Users/Downloads/sample.json') Lines <- readLines("C:/Users/Downloads/sample.j

Re: [R] how to read a local JSON file

2015-06-07 Thread Berend Hasselman
> On 07-06-2015, at 07:50, Ye Lin wrote: > > Hi All, > > I downloaded a data file from dropbox and its in JSON format. > > here is my code: > library(RJSONIO) > data <- fromJSON(file='C:/Users/Downloads/sample.json') > Lines <- readLines("C:/Users/Downloads/sample.json") > df <- as.data.frame(

Re: [R] how to read a local JSON file

2015-06-06 Thread Jim Lemon
Hi Ye Lin, Looks like the file was read, but there is no linefeed at the end of the last line. You could probably stick one in using a text or hex editor and you won't get the warning. Jim On Sun, Jun 7, 2015 at 3:50 PM, Ye Lin wrote: > Hi All, > > I downloaded a data file from dropbox and its

[R] how to read a local JSON file

2015-06-06 Thread Ye Lin
Hi All, I downloaded a data file from dropbox and its in JSON format. here is my code: library(RJSONIO) data <- fromJSON(file='C:/Users/Downloads/sample.json') Lines <- readLines("C:/Users/Downloads/sample.json") df <- as.data.frame(t(sapply(Lines, fromJSON))) I got this error message: incomplet