View source: R/list-files-gh-gists.R
list_files_github_gists | R Documentation |
Given a username, return a dataframe with paths to all the gists by that user.
list_files_github_gists(
user,
pattern = stringr::regex("(r|rmd|rmarkdown|qmd)$", ignore_case = TRUE)
)
user |
Character string of username whose github gists you want to pull. |
pattern |
Regex pattern to keep only matching files. Default is
|
Dataframe with relative_paths
and absolute_paths
of file paths.
Because gists do not exist in a folder structure relative_paths
will
generally just be a file name. absolute_paths
a url to the raw file. See
unnest_results()
for helper to put into an easier to read format.
list_files_github_repo()
, list_files_wd()
library(dplyr)
library(funspotr)
# pulling and analyzing my R file github gists
gists_urls <- list_files_github_gists("brshallo", pattern = ".")
# Will just parse the first 2 files/gists
# Note that is easy to hit the API limit if have lots of gists
contents <- filter(gists_urls, str_detect_r_docs(absolute_paths)) %>%
slice(1:2) %>%
spot_funs_files()
contents %>%
unnest_results()
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.