# NOT RUN {
# }
# NOT RUN {
# the examples run too long to pass CRAN tests
wd_images_ID_individual <- system.file("pictures/sample_images_indiv_tag/LeopardCat",
package = "camtrapR")
# missing space in species = "LeopardCat" is because of CRAN package policies
# note argument additionalMetadataTags: contains tag names as returned by function exifTagNames
if (Sys.which("exiftool") != ""){ # only run these examples if ExifTool is available
rec_table_pbe <- recordTableIndividual(inDir = wd_images_ID_individual,
minDeltaTime = 60,
deltaTimeComparedTo = "lastRecord",
hasStationFolders = FALSE,
IDfrom = "metadata",
camerasIndependent = FALSE,
writecsv = FALSE,
metadataIDTag = "individual",
additionalMetadataTags = c("EXIF:Model", "EXIF:Make"),
timeZone = "Asia/Kuala_Lumpur"
)
# extracting some example summary stats too
# a nonsensical example, get all unique cameras with which the event was photographed
rec_table_pbe2 <- recordTableIndividual(inDir = wd_images_ID_individual,
minDeltaTime = 60,
deltaTimeComparedTo = "lastRecord",
hasStationFolders = FALSE,
IDfrom = "metadata",
camerasIndependent = FALSE,
writecsv = FALSE,
metadataIDTag = "individual",
additionalMetadataTags = c("EXIF:Model", "EXIF:Make"),
timeZone = "Asia/Kuala_Lumpur",
eventSummaryColumn = "EXIF:Make",
eventSummaryFunction = "unique"
)
### Video example (the sample data don't contain a video, this is hypothetical)
# with JPG, video mp4, avi, mov, ID = metadata
rec_table_ind_video <- recordTableIndividual(inDir = wd_images_ID_individual,
hasStationFolder = FALSE,
IDfrom = "metadata",
metadataIDTag = "individual",
video = list(file_formats = c("jpg", "mp4", "avi", "mov"),
dateTimeTag = "QuickTime:CreateDate",
db_directory = "C:/Users/YourName/Pictures",
db_filename = "digikam4.db")
)
} else {
# show function output if ExifTool is not available
message("ExifTool is not available. Cannot test function. Loading recordTableSample instead")
data(recordTableSample)
}
# }
# NOT RUN {
# }
Run the code above in your browser using DataLab