str_detect_r_docs | R Documentation |
Wrapper on stringr::str_detect()
to return TRUE
for only R and Rmarkdown
or Quarto files, else FALSE
.
str_detect_r_docs(
contents,
pattern = stringr::regex("(r|rmd|rmarkdown|qmd)$", ignore_case = TRUE),
rmv_index = TRUE
)
contents |
Character vector of file path. |
pattern |
Regex pattern to identify file types. |
rmv_index |
Logical, default to |
Logical vector.
files <- c("file1.R", "file2.Rmd", "file3.Rmarkdown", "file4.Rproj", "file5.qmd")
funspotr::str_detect_r_docs(files)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.