search for: rjson

Displaying 20 results from an estimated 42 matches for "rjson".

Did you mean: json
2009 Jun 13
1
conditional dependencies & loading
Hi! I'm working on a package that must convert data to and from JSON. For this, it can use either the rjson package, or preferably, the faster RJSONIO package. I have two related questions about this. First, how can I specify that the package depends on *either* RJSONIO *or* rjson? (I.e. both are not required.) Second, what's the best-practice R idiom for such conditional loading? I.e. I'm l...
2012 Aug 24
1
RJSONIO/rjson maximum depth?
Hi All, has anyone run into maximum depth of nested JSON arrays in either rjson or RJSONIO ? I seem to be able to get up to 10 depth levels without problem, but crossing over to 11 either causes an error or fails to load the nodes properly. with RJSONIO I tried: a = fromJSON('data/myJSON.json', depth=1000) but I still get this error: Error in fromJSON(content, han...
2011 Jun 25
2
On .. glibc detected home/sguha/lib64/R/bin/exec/R: realloc(): invalid next size: 0x000000000209e210 ***
Hello, I'm trying to use rjson to parse a JSON object. The object can be found here http://pastebin.com/np0s5hgM (you'll probably need to add quotes around the content) fromJSON returns the error glibc detected home/sguha/lib64/R/bin/exec/R: realloc(): invalid next size: 0x000000000209e210 *** Is there a fix coming soo...
2018 May 08
0
help with json data from the web into data frame in R
That said, I have two issues to ask for help with: 1) how to ignore cert errors with a fromJSON call And 2) why the json data from the example link doesn't convert to a data frame. As seen in the following example library("rjson") result <- fromJSON(file = "https://www.semantic-mediawiki.org/w/api.php?action=ask&query=[[Category:City]]|?Capital%20of|?Has%20area&format=json") json_data_frame <- as.data.frame(result) print(json_data_frame) which results in: > library("rjson") Warn...
2009 Jun 12
1
Fast JSON <-> R converter?
Is there a *fast* converter between JSON and R? I'm aware of the rjson package, but it is implemented in R, and it is too slow for my purposes. TIA! kynn [[alternative HTML version deleted]]
2013 Aug 29
0
Big Integer Support in JSON-to-R Conversion
I have come across an issue converting a JSON string in R (with either the package 'rjson' or 'RJSONIO') when big integers are included in the JSON string. A simple example of the problem is: > options(scipen=999) # To prevent representing the answer in scientific notation > json.str <- '{"bigInt":123456789123456789}' # Sample JSON string with...
2018 May 08
3
help with json data from the web into data frame in R
...2) why the json data from the example link doesn't convert to a data frame. That was already answered in my earlier response. It's not a tabular result, so it doesn't "fit" into a tabular structure. -- David. > As seen in the following example > > library("rjson") > result <- fromJSON(file = "https://www.semantic-mediawiki.org/w/api.php?action=ask&query=[[Category:City]]|?Capital%20of|?Has%20area&format=json") > json_data_frame <- as.data.frame(result) > print(json_data_frame) > > which results in: > >&gt...
2012 Jun 19
1
need help with unlist(), losing NULL values
Hi, I have a very rudimentary kind of question on using unlist(). I am parsing a bunch of JSON text using rjson package. Some data elements in a dictionary happen to be null which rjson parses correctly. > fromJSON(json_str='{"query":{"A":10, "B":null, "C":"hello"}, "query":{"A":20, "B":null, "C":"hello...
2018 May 08
3
help with json data from the web into data frame in R
...r [mailto:ericjberger at gmail.com] > Sent: Tuesday, May 08, 2018 11:31 AM > To: Evans, Richard K. (GRC-H000) > Cc: r-help at r-project.org > Subject: Re: [R] help with json data from the web into data frame in R > > Hi Rich, > Take a look at the function fromJSON found in the rjson package. > Note that the Usage in the help page: ?fromJSON names the second > argument 'file' but if you look at the description the argument can be a URL. > > HTH, > Eric > > > On Tue, May 8, 2018 at 6:16 PM, Evans, Richard K. (GRC-H000) <richard.k.evans at n...
2018 May 09
1
help with json data from the web into data frame in R
...s at nasa.gov> wrote: That said, I have two issues to ask for help with: 1) how to ignore cert errors with a fromJSON call And 2) why the json data from the example link doesn't convert to a data frame. As seen in the following example library("rjson") result <- fromJSON(file = "https://www.semantic-mediawiki.org/w/api.php?action=ask&query=[[Category:City]]|?Capital%20of|?Has%20area&format=json") json_data_frame <- as.data.frame(result) print(json_data_frame) which results in: > libr...
2018 May 08
0
help with json data from the web into data frame in R
...2) why the json data from the example link doesn't convert to a data frame. That was already answered in my earlier response. It's not a tabular result, so it doesn't "fit" into a tabular structure. -- David. > As seen in the following example > > library("rjson") > result <- fromJSON(file = "https://www.semantic-mediawiki.org/w/api.php?action=ask&query=[[Category:City]]|?Capital%20of|?Has%20area&format=json") > json_data_frame <- as.data.frame(result) > print(json_data_frame) > > which results in: > >&gt...
2018 May 08
3
help with json data from the web into data frame in R
...2) why the json data from the example link doesn't convert to a data frame. That was already answered in my earlier response. It's not a tabular result, so it doesn't "fit" into a tabular structure. -- David. > As seen in the following example > > library("rjson") > result <- fromJSON(file = "https://www.semantic-mediawiki.org/w/api.php?action=ask&query=[[Category:City]]|?Capital%20of|?Has%20area&format=json") > json_data_frame <- as.data.frame(result) > print(json_data_frame) > > which results in: > >&gt...
2011 Nov 05
2
install.packages problem
...g ...ideas on how to address this would be appreciated : install.packages('rdatamarket') Installing package(s) into ?/home/eric/R/i486-pc-linux-gnu-library/2.13? (as ?lib? is unspecified) --- Please select a CRAN mirror for use in this session --- also installing the dependencies ?RCurl?, ?RJSONIO? trying URL 'http://lib.stat.cmu.edu/R/CRAN/src/contrib/RCurl_1.7-0.tar.gz' Content type 'application/x-gzip' length 813252 bytes (794 Kb) opened URL ================================================== downloaded 794 Kb trying URL 'http://lib.stat.cmu.edu/R/CRAN/src/contrib/R...
2014 Aug 28
2
sql codificación R
Estimados Les envío dos archivos, el primero es mysql, el segundo es el código R. A ambos los ejecuté en ubuntu 14.04, anteriormente en mi script tenía anotado, se ve feo pero anda, esto es referente a los acentos, hoy se ve feo (codificado no en español) y rjson produce un error, básicamente me informa que no es UFT-8. Desconozco que pasa, ¿alguna idea? Desde ya muchas gracias. Javier Rubén Marcuzzi ------------ próxima parte ------------ SET @OLD_UNIQUE_CHECKS=@@UNIQUE_CHECKS, UNIQUE_CHECKS=0; SET @OLD_FOREIGN_KEY_CHECKS=@@FOREIGN_KEY_CHECKS, FOREIGN_K...
2012 Aug 06
1
Defining Version in R Package
Hello Liste[R]s, I defined a version in a recent package using the following entries: DESCRIPTION FILE: /Depends: R(>= 2.14.2), rjson, RgoogleMaps/ *.rd FILE: (which I was under the impression is the package version, not the R requirement) /\details{ \tabular{ll}{ Package: \tab geoPlot\cr Type: \tab Package\cr Version: \tab 2.0\cr Date: \tab 2012-07-24\cr License: \tab GPL-2\cr }/ When I try to install the package, I get the fo...
2013 Sep 12
1
problem with rJython and modules
Dear R People: I have been experimenting with rPython, rSymPy, and rJython. Here is my latest snag: > library(rJython) Loading required package: rJava Loading required package: rjson > library(rSymPy) > rJython <- rJython() > x <- "x" > y <- "y" > rJython$exec("from sympy import *") Error in .jcall("RJavaTools", "Ljava/lang/Object;", "invokeMethod", cl, : Traceback (most recent call last):...
2010 Feb 18
3
parsing strings between [ ] in columns
Dear all, I have a data.frame with a column like the x shown below myDF<-data.frame(cbind(x=c("[[1, 0, 0], [0, 1]]", "[[1, 1, 0], [0, 1]]","[[1, 0, 0], [1, 1]]", "[[0, 0, 1], [0, 1]]"))) > myDF x 1 [[1, 0, 0], [0, 1]] 2 [[1, 1, 0], [0, 1]] 3 [[1, 0, 0], [1, 1]] 4 [[0, 0, 1], [0, 1]] As you can see my x column is composed of
2012 Dec 27
1
Convert json data to an r dataframe
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...
2018 May 08
0
help with json data from the web into data frame in R
...sn't convert to a data frame. > > That was already answered in my earlier response. It's not a tabular result, so it doesn't "fit" into a tabular structure. > > -- > David. > > >> As seen in the following example >> >> library("rjson") >> result <- fromJSON(file = "https://www.semantic-mediawiki.org/w/api.php?action=ask&query=[[Category:City]]|?Capital%20of|?Has%20area&format=json") >> json_data_frame <- as.data.frame(result) >> print(json_data_frame) >> >> which resul...
2010 Jan 26
1
library.dynam
...n my zzz.R file i include: .onLoad <- function(libname, pkgname) { library.dynam("mylib", lib.loc = PATH) } when i load the package, however, i get: Error in .find.package(package, lib.loc, verbose = verbose) : there are no packages called 'RCurl', 'bitops', 'rjson', 'stats', 'graphics', 'grDevices', 'utils', 'datasets', 'methods', 'base' so it appears i need to specify the package name, so if i change the call to: library.dynam("mylib", pkgname, lib.loc = PATH), i get: Error in .find....