Skip to content

Instantly share code, notes, and snippets.

library(tidyverse)
## this r code is taking from here: https://github.com/mkearney/pkguse
read_r_files <- function(...) {
dirs <- unlist(list(...))
r <- unlist(lapply(dirs, list.files,
pattern = "\\.(R|Rmd|Rmarkdown|rmd|r|Rhistory)$",
recursive = TRUE,
full.names = TRUE,
all.files = TRUE))