如何在R中读取json文件

时间:2022-12-18 20:21:59

My file is a CSV file which contain json type data in it...how can i read in R

我的文件是一个CSV文件,其中包含json类型的数据...我怎样才能在R中读取

1 个解决方案

#1


0  

Je vous propose d'essayer le package jsonlite et la fonction fromJSON qui doit pouvoir accepter n'importe quel extension de fichier à plat contenant des données de type json :

Je vous提出了来自JSON qui doit pouvoir accepter n'importe quel extension defichieràplatcontenantdesdonnéesdetype json的'essayer le package jsonlite et la fonction:

library(jsonlite) q90 <- fromJSON(txt = "https://www.wikidata.org/wiki/Special:EntityData/Q90.json")

library(jsonlite)q90 < - fromJSON(txt =“https://www.wikidata.org/wiki/Special:EntityData/Q90.json”)

Source : https://fr.wikibooks.org/wiki/Programmer_en_R/Import_un_fichier_JSON ou https://www.tutorialspoint.com/r/r_json_files.htm

资料来源:https://fr.wikibooks.org/wiki/Programmer_en_R/Import_un_fichier_JSON ou https://www.tutorialspoint.com/r/r_json_files.htm

Avez-vous essayer de modifier l'extension du fichier CSV en .json avant de l'importer dans R ?

Avez-vous essayer de modifier l'extension du fichier CSV en .json avant de l'importer dans R?

#1


0  

Je vous propose d'essayer le package jsonlite et la fonction fromJSON qui doit pouvoir accepter n'importe quel extension de fichier à plat contenant des données de type json :

Je vous提出了来自JSON qui doit pouvoir accepter n'importe quel extension defichieràplatcontenantdesdonnéesdetype json的'essayer le package jsonlite et la fonction:

library(jsonlite) q90 <- fromJSON(txt = "https://www.wikidata.org/wiki/Special:EntityData/Q90.json")

library(jsonlite)q90 < - fromJSON(txt =“https://www.wikidata.org/wiki/Special:EntityData/Q90.json”)

Source : https://fr.wikibooks.org/wiki/Programmer_en_R/Import_un_fichier_JSON ou https://www.tutorialspoint.com/r/r_json_files.htm

资料来源:https://fr.wikibooks.org/wiki/Programmer_en_R/Import_un_fichier_JSON ou https://www.tutorialspoint.com/r/r_json_files.htm

Avez-vous essayer de modifier l'extension du fichier CSV en .json avant de l'importer dans R ?

Avez-vous essayer de modifier l'extension du fichier CSV en .json avant de l'importer dans R?