Description Usage Arguments Details Value Examples
Make a table from gist or commit class or a list of either
1 2 3 |
x |
Either a gist or commit class object or a list of either |
... |
Ignored |
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
A data.frame or list of data.frame's
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 | ## Not run:
# from a gist object
x <- as.gist('f1403260eb92f5dfa7e1')
res <- tabl(x)
res$data
res$forks
res$history
# from a list
ss <- gists('minepublic')
tabl(ss[1:3])
lapply(tabl(ss[1:3]), "[[", "data")
# index to data slots, but also make single data.frame
tabl_data(tabl(ss[1:3]))
## manipulate with dplyr
library("dplyr")
tabl_data(tabl(ss[1:30])) %>%
select(id, description, owner_login) %>%
filter(grepl("gist gist gist", description))
# commits
x <- gists()[[2]] %>% commits()
tabl(x[[1]])
## many
x <- sapply(gists(per_page = 100), commits)
tabl(x) %>%
select(id, login, change_status.total, url) %>%
filter(change_status.total > 50)
# pass in a url
gist("https://gist.github.com/expersso/4ac33b9c00751fddc7f8") %>% tabl
## many
gg <- gists()
(urls <- vapply(gg, "[[", "", "html_url"))
lapply(urls[1:5], as.gist) %>% tabl()
# gist with forks and history
gist('1642874') %>% tabl
# gist with history, no forks
gist('c96d2e453c95d0166408') %>% tabl
## End(Not run)
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.