Thank you very much, Rui!

The problem with your script is that data is now in a string format, while
I need to obtain a data.frame instead.
Do you really think that I cannot do anything else with this json data?
Thank you very much again

Duccio


2012/12/27 Rui Barradas <ruipbarra...@sapo.pt>

>  Hello,
>
> Your dataset is not in tabular form, so I find it difficult to transform
> it into a data.frame, but you can see it in R with the following.
>
>
> install.packages("RJSONIO", dependencies = TRUE)
> library(RJSONIO)
>
> url <-
> "http://apistat.istat.it/?q=getdatajson&dataset=DCIS_POPSTRBIL&dim=1,0,0,0&lang=1&tr=&te=";<http://apistat.istat.it/?q=getdatajson&dataset=DCIS_POPSTRBIL&dim=1,0,0,0&lang=1&tr=&te=>
> dat <- fromJSON(url)
>
> str(dat)  # List with 3 components
>
> str(dat[[1]][[1]])
> dat[[1]][[1]]
>
> str(dat[[1]][[2]])
> unlist(dat[[1]][[2]])
>
> str(dat[[1]][[3]])
> dat[[1]][[3]]
>
>
> Hope this helps,
>
> Rui Barradas
> Em 27-12-2012 11:55, sp.duccio escreveu:
>
> Hello to everybody,
>
> I need to convert a json dataset in an R dataframe.
> I suppose that I'd need to use rjson or rjsonio package.
> The json dataset 
> is:http://apistat.istat.it/?q=getdatajson&dataset=DCIS_POPSTRBIL&dim=1,0,0,0&lang=1&tr=&te=
> It would be nice if someone can help me to create a function like the one
> below:http://lamages.blogspot.it/2011/09/accessing-and-plotting-world-bank-data.html
> that can applied to my json dataset and with all the parameter values that
> can be specifiable.
> Is there anyone who can solve this problem?
>
> Thanx in advance for any help!
> Duccio
>
>
>
>
> ______________________________________________r-h...@r-project.org mailing 
> listhttps://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.
>
>
>


-- 
Il messaggio trasmesso può contenere informazioni di carattere
confidenziale rivolte esclusivamente al destinatario. Ne è vietato
l'uso, la diffusione, la distribuzione o la riproduzione da parte di
altre persone e/o entità diverse da quelle specificate. Nel caso aveste
ricevuto questo messaggio per errore siete pregati di segnalarlo
immediatamente al mittente e cancellare quanto ricevuto.

This electronic mail transmission may contain confidential information
addressed only to the person (s) named. Any use, distribution, copying or
disclosure by any other person and/or entities other than the intended
recipient is prohibited. If you received this transmission in error,
please inform the sender immediately and delete the material.

        [[alternative HTML version deleted]]

______________________________________________
R-help@r-project.org mailing list
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