#' Checks if `path` contains a valid R project structure
#'
#' Checks if `path` contains:
#' - a DESCRIPTION file
#' - a NAMESPACE file
#' - an R directory
#'
#' @md
#' @param path path to check for an R project (defaults to `getwd()`)
#' @export
is_r_project <- function(path = getwd()) {
file.exists(file.path(path, "DESCRIPTION")) &&
file.exists(file.path(path, "NAMESPACE")) &&
dir.exists(file.path(path, "R"))
}
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.