Filters MegaDetector/SpeciesNet JSON files to only data for images in the directory specified.
Arguments
- json
character vector or nested list object from
jsonlite::read_json().- dir
character. Directory to be used to filter the JSON data. This folder should not be within the relative path of the
fileJSON tag, but should directly contain any folders that appear there. Mutually exclusive withimages.- images
character vector. Vector of images to filter for. Files should be formatted with relative paths if applicable. Mutually exclusive with
dir. The JSON file or loaded JSON data to filter on.- file
character. File to write JSON data to. Use
NAto skip writing to a file.- overwrite
logical. If overwriting files is allowed.
