Re: [R] Get XML or JSON data from api into data frame

2012-07-26 Thread Richard Ohrvall
Thank you Erdal and Hadley for your answeres. It now works perfectly. Also, I will look at the github solution, even if I don't have any experience of Ruby. Once again, thank you. Richard 2012/7/26 Hadley Wickham : > On Thu, Jul 26, 2012 at 4:18 AM, Richard Ohrvall > wrote: >> Dear all, >> >> I

Re: [R] Get XML or JSON data from api into data frame

2012-07-26 Thread Erdal Karaca
You can try this one... # library(RCurl) library(rjson) ids <- c("tt0110074", "tt0096184", "tt0081568", "tt0448134", "tt0079367") titles <- data.frame() for ( i in 1:length(ids)) { req <- paste("http://www.imdbapi.com/?i=";, ids[i] , "&tomatoes=TRUE", sep="") u <- getURL(req) j <- fromJSON(u

Re: [R] Get XML or JSON data from api into data frame

2012-07-26 Thread Hadley Wickham
On Thu, Jul 26, 2012 at 4:18 AM, Richard Ohrvall wrote: > Dear all, > > I am new to R in general and ways to retrieve XML or JSON data in > particular. I have tried to get information through the XML package > and various websites without being able to do exactly what I want. I > hope someone of y

[R] Get XML or JSON data from api into data frame

2012-07-26 Thread Richard Ohrvall
Dear all, I am new to R in general and ways to retrieve XML or JSON data in particular. I have tried to get information through the XML package and various websites without being able to do exactly what I want. I hope someone of you can give me some help. I want to retrieve information about movi