appendSpeciesNames(inDir, IDfrom, hasCameraFolders, metadataSpeciesTag, metadataHierarchyDelimitor = "|", removeNames = FALSE, writecsv = FALSE
)
inDir
have camera-subdirectories (e.g. inDir/StationA/CameraA1; inDir/StationA/CameraA2)?
inDir
?
data.frame
containing the old and new file names and directories.
checkSpeciesIdentification
to detect possible misidentifications. As an example, the function would change an image file name from "StationA__2015-05-41__20-59-59(1).JPG" to "StationA__2015-05-41__20-59-59(1)__Species Name.JPG". If species names were appended several times by accident, they can all be removed by running the function with removeNames = TRUE
## Not run:
#
# # copy sample images to another location (so we don't mess around in the package directory)
# wd_images_ID <- system.file("pictures/sample_images", package = "camtrapR")
# file.copy(from = wd_images_ID, to = getwd(), recursive = TRUE)
# wd_images_ID_copy <- file.path(getwd(), "sample_images")
#
# # append species names
# SpecNameAppend1 <- appendSpeciesNames(inDir = wd_images_ID_copy,
# IDfrom = "directory",
# hasCameraFolders = FALSE,
# removeNames = FALSE,
# writecsv = FALSE)
#
# SpecNameAppend1
#
# # remove species names
# SpecNameRemove1 <- appendSpeciesNames(inDir = wd_images_ID_copy,
# IDfrom = "directory",
# hasCameraFolders = FALSE,
# removeNames = TRUE,
# writecsv = FALSE)
#
# SpecNameRemove1
# ## End(Not run)
Run the code above in your browser using DataLab