-1

I'm trying to import a data file of log-file system. The data are collected in json and are download in txt. Here an example of a string:

{ "index" : {}} { "time": 1463687400,"_dominio": "SAG","_ambiente": "PROD", "numChars": 12029395, "numLogs": 598, "numLines": 89597, "numWords": 1025832, "numDistinctWords": 1356 }

How I can parse this file in R?

1 Answers1

0

We can use fromJSON from jsonlite

 library(jsonlite)
 fromJSON(str1)
akrun
  • 874,273
  • 37
  • 540
  • 662