Questions tagged [rjson]

Converts R object into JSON objects and vice-versa

rjson is an package for woking with , allowing JSON objects to be imported as R objects, and R objects to be serialized as JSON.

Repositories

Vignettes

Other resources

Related tags

135 questions
0
votes
2 answers

Extracting JSON data from Google geocoding API in R

I'm quite new to Json data structure and so unable to extract data from it. This is the sample rows from Json data which is stored in csv file row1) …
Andre_k
  • 1,680
  • 3
  • 18
  • 41
0
votes
1 answer

Converting JSON to Excel using R

I'm new to R, and I'm practicing converting JSon to R, then to CSV or Excel. I downloaded the entire Magic the Gathering card set from: https://mtgjson.com/ to practice. I used this code to get it into a "list", but I'd like it in a dataframe or…
Alex
  • 77
  • 1
  • 10
0
votes
0 answers

Which R object does return this JSON structure?

After R to JSON conversion, this should be the output: { "alpha": [100,120,140,150,160], "beta": [0.6, 1, 1.5, 2], "gamma": [ [ 0.018429082998491217, -0.1973461380810494, 0.6373366343601572, …
Lisa Ann
  • 3,345
  • 6
  • 31
  • 42
0
votes
1 answer

Using Zuora Rest API with R

I'm trying to pull some data from Zuora, but rjson is throwing an error. library(httr) library(rjson) query <- "https://api.zuora.com/rest/v1" getdata <- GET(url=query, add_headers(apiAccessKeyId="Username", apiSecretAccessKey = "Password",…
Joseph Noirre
  • 387
  • 4
  • 20
0
votes
1 answer

Error while using rjson package to retrive Yahoo's API Stock data

I'm trying to get SPY prices from Yahoo real-time API, the code used to work in the past but now I get this error (below), How can I overcome this problem library(rjson) json_file <-…
mql4beginner
  • 2,193
  • 5
  • 34
  • 73
0
votes
1 answer

HTTP error 400 using Google Maps API

I am using the Google Places API to collect information about businesses. It has been working for more than 2000 queries but it has stopped now with the error Error in open.connection(con, "rb") : HTTP error 400. Code:…
user3507584
  • 3,246
  • 5
  • 42
  • 66
0
votes
1 answer

R Getting JSON data into dataframe

I have this file with JSON formatted data, but need this into a dataframe. Ultimately I would like to plot the geolocations onto a map, but can't seem to get this data into a df first. json_to_df <- function(file){ file <- lapply(file,…
dnsko
  • 1,017
  • 4
  • 17
  • 29
0
votes
1 answer

Call a function for the number of items in a data frame and merge the results together

I have a function called getWeatherForMonth that takes a start date and end date and returns as data frame of the result for each month. I have another method getWeatherForRange that takes a data frame of ranges. I need to call getWeatherForMonth …
0
votes
1 answer

Only one json line was read in rjson

The code is library(rjson) url <- 'file.json' j <- fromJSON(file=url, method='C') there are more than 1000 lines in the file.json, however, the returned result is a list of 9. the file.json is {"reviewerID": "A30TL5EWN6DFXT", "asin":…
user3329081
  • 337
  • 4
  • 15
0
votes
1 answer

Retrieving data in R from Import.io API using Rcurl?

Im trying to retrieve data from an import.io 'connector' API. Basically, i've trained the extractor to the structure of a given website, and I want to import the data from within R using this approach: 1) Retrieve the Json results from the API 2)…
MikeR
  • 35
  • 1
  • 12
0
votes
1 answer

Trying to convert tweets to json format to insert into mongoDB

> orioles.tweets <- searchTwitter('#orioles', n=15, lang="en") > orioles.text=laply(orioles.tweets,function(t) t$getText()) > class(toJSON(orioles.text)) [1] "character" Why does this happen?
VBB
  • 15
  • 6
0
votes
1 answer

Convert R data.frame to multilevel JSON

I have a periodic process in R that yields me a data.frame. I want to use this data.frame to create a dropdown selector with AngularJS. My final data.frame will look more or less as follows (my real example might have a deeper hierarchical…
Jon Nagra
  • 1,538
  • 1
  • 16
  • 36
0
votes
1 answer

how to create json from hash in r

am new to R and have already passed at least a day trying to figure this out. I've been trying to create json from a data.table, where I'd like to use the value of one of the variables as a key, and as its value a list combining the other variables.…
lstilo
  • 5
  • 1
  • 4
0
votes
1 answer

Constructing request payload in R using rjson/jsonlite

My current code as seen below attempts to construct a request payload (body), but isn't giving me the desired result. library(df2json) library(rjson) y = rjson::fromJSON((df2json::df2json(dataframe))) globalparam = "" req = list( Inputs = list( …
Ritika R
  • 77
  • 1
  • 1
  • 9
0
votes
1 answer

Removing text tweets from dataset in R

I am working on twitter dataset, I need to remove some tweets concerning a certain word. I have retrieved the tweets concerning this word and I saved those tweets in a variable called "removing". I need now to remove those tweets from my dataset,…
Hana
  • 157
  • 1
  • 2
  • 10
1 2 3
8
9