Make a table from gist or commit class or a list of either
Make a table from gist or commit class or a list of either
tabl(x,...)tabl_data(x)
Arguments
x: Either a gist or commit class object or a list of either
...: Ignored
Returns
A data.frame or list of data.frame's
Details
For commits we return a single data.frame. For gists, we always return a list so that we are returning data consistently, regardless of variable return data. So you can always index to the main data.frame with gist metadata and file info by doing result$data, and likewise for forks result$forks and history result$history
Examples
## Not run:# from a gist objectx <- as.gist('f1403260eb92f5dfa7e1')res <- tabl(x)res$data
res$forks
res$history
# from a listss <- gists('minepublic')tabl(ss[1:3])lapply(tabl(ss[1:3]),"[[","data")# index to data slots, but also make single data.frametabl_data(tabl(ss[1:3]))## manipulate with dplyrlibrary("dplyr")tabl_data(tabl(ss[1:30]))%>% select(id, description, owner_login)%>% filter(grepl("gist gist gist", description))# commitsx <- gists()[[2]]%>% commits()tabl(x[[1]])## manyx <- sapply(gists(per_page =100), commits)tabl(x)%>% select(id, login, change_status.total, url)%>% filter(change_status.total >50)# pass in a urlgist("https://gist.github.com/expersso/4ac33b9c00751fddc7f8")%>% tabl
## manygg <- gists()(urls <- vapply(gg,"[[","","html_url"))lapply(urls[1:5], as.gist)%>% tabl()# gist with forks and historygist('1642874')%>% tabl
# gist with history, no forksgist('c96d2e453c95d0166408')%>% tabl
## End(Not run)