Re: [R] How to save multiple values of a variable in a json file in R

2020-01-20 Thread Eric Berger
I have had success using the fromJSON() function in the rjson package. On Thu, Jan 16, 2020 at 4:22 PM Ioanna Ioannou wrote: > hello everyone, > > and happy new year! > > I have this problem: I want to save the name of the 'countries', the > 'taxonomy_gem' and the 'minimum_im' and 'maximum_im' .

Re: [R] How to save multiple values of a variable in a json file in R

2020-01-20 Thread Jim Lemon
Hi Ioanna, Assuming your input file is named "ii.json" and contains the text in your original post: library(jsonlite) a2<-fromJSON("ii.json",flatten=TRUE) a2$fields$geo_applicability$fields$countries[,"fields.name"] You can find this yourself by progressively checking names and extracting until

Re: [R] How to save multiple values of a variable in a json file in R

2020-01-20 Thread Richard O'Keefe
optimise the code? > > Best, > > ____________________ > From: Rainer M Krug > Sent: 16 January 2020 14:47 > To: Ioanna Ioannou > Subject: Re: [R] How to save multiple values of a variable in a json file in R > > Check the hep of the read_json() function and

Re: [R] How to save multiple values of a variable in a json file in R

2020-01-16 Thread Ioanna Ioannou
in some cases there will be one country reported and in some others multiple. How can i optimise the code? Best, From: Rainer M Krug Sent: 16 January 2020 14:47 To: Ioanna Ioannou Subject: Re: [R] How to save multiple values of a variable in a json file in R Ch