View source: R/list-files-gh-repo.R
list_files_github_repo | R Documentation |
Return a dataframe containing the paths of files in a github repostiory.
Generally used prior to spot_{funs/pkgs}_files()
.
list_files_github_repo(
repo,
branch = NULL,
pattern = stringr::regex("(r|rmd|rmarkdown|qmd)$", ignore_case = TRUE),
rmv_index = TRUE
)
repo |
Github repository, e.g. "brshallo/feat-eng-lags-presentation" |
branch |
Branch of github repository, default is "main". |
pattern |
Regex pattern to keep only matching files. Default is
|
rmv_index |
Logical, most repos containing blogdown sites will have an
index.R file at the root. Change to |
Dataframe with columns of relative_paths
and absolute_paths
for
file path locations. absolute_paths
will be urls to raw files.
list_files_wd()
, list_files_github_gists()
library(dplyr)
library(funspotr)
# pulling and analyzing my R file github gists
gh_urls <- list_files_github_repo("brshallo/feat-eng-lags-presentation", branch = "main")
# Will just parse the first 2 files/gists
contents <- spot_funs_files(slice(gh_urls, 1:2))
contents %>%
unnest_results()
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.