Created
March 16, 2019 21:28
-
-
Save sebastianrothbucher/bbff25cf0956add71fd8a89a02bdd68c to your computer and use it in GitHub Desktop.
handling JSON in R for quick prototyping
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# losely based on https://gist.github.com/gluc/5f780246d57897b57c6b | |
library(jsonlite) | |
reposLoL <- fromJSON("https://api.github.com/users/hadley/repos", simplifyDataFrame = FALSE) | |
reposDf <- data.frame(name=unlist(sapply(reposLoL, function(x) x$name)), url=unlist(sapply(reposLoL, function(x) x$url))) | |
reposDfAlt <- fromJSON("https://api.github.com/users/hadley/repos", simplifyDataFrame = TRUE) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment