random_files | R Documentation |
RandomFiles will randomly sample files from a directory and optionally its internal folders
random_files(
path,
percent_number,
pattern = "jpg$|JPG$",
folders = TRUE,
results = "Q:/Waterfowl/STEI_Survey/Data/RandomFiles"
)
path |
The path to the folder containing files to be sampled (or folders of files). |
percent_number |
The percent (if less than 1.0) or raw number (if greater than 1.0) of files to sample. |
pattern |
The file extension of the requested sample. |
folders |
Should nested folders also be searched? TRUE/FALSE |
results |
The folder path for the copied (sampled) output |
RandomFiles was designed to randomly sample systematic photos of a sampled area for analysis. It is generalized to use any file extension a user inputs. Files are copied and a lookup table is generated to crosswalk original and new names.
copies randomly selected files to results directory and writes a lookup key selected_files.csv
Charles Frost, charles_frost@fws.gov
https://github.com/cfrost3/AKaerial
RandomFiles(path = "C:/DATA/PHOTOS", percent_number = 0.10, pattern = "jpg$|JPG$", folders = TRUE, results = "C:/RESULTS")
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.