find_description_file | R Documentation |
Searches for a DESCRIPTION file starting from the current or specified directory and moving upwards through the directory hierarchy until the file is found or the root directory is reached.
find_description_file(start_dir = getwd())
start_dir |
The starting directory for the search. Defaults to the current working directory. |
The path to the DESCRIPTION file if found. If not found, the function stops with an error message.
# Start search from a specific directory
graphics_pkg_dir <- system.file(package = "graphics")
find_description_file(graphics_pkg_dir)
## Not run:
# Below example will only work if executed from a package directory
find_description_file()
## End(Not run)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.