Description Usage Arguments Value Note Examples
View source: R/01_raw_image_handling.R
Find all valid image paths (PNG and JPG) in a directory (does not search subdirectories). Will recover any image ending in .PNG, .JPG, or .JPEG, case-insensitive.
1 | getImagePaths(path)
|
path |
Path to directory in which to search for images. Absolute or relative filepaths are fine. |
A vector of absolute filepaths to JPG and PNG images in the given directory.
In the event that no compatible images are found in the directory, it returns a message to that effect instead of an empty vector.
1 2 3 4 5 6 7 | im.dir <- colordistance::getImagePaths(system.file("extdata",
"Heliconius/Heliconius_A", package="colordistance"))
## Not run:
im.dir <- colordistance::getImagePaths("some/nonexistent/directory")
## End(Not run)
im.dir <- colordistance::getImagePaths(getwd())
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.