# NOT RUN {
# }
# NOT RUN {
### "trial" run. create a table with file names after renaming, but don't copy images.
# first, find sample image directory in package directory:
wd_images_raw <- system.file("pictures/raw_images", package = "camtrapR")
# because copyImages = FALSE, outDir does not need to be defined
renaming.table <- imageRename(inDir = wd_images_raw,
hasCameraFolders = FALSE,
copyImages = FALSE,
writecsv = FALSE
)
### a real example in which images are copied and renamed
# define raw image location
wd_images_raw <- system.file("pictures/raw_images", package = "camtrapR")
# define destination for renamed images
wd_images_raw_renamed <- file.path(tempdir(), "raw_images_renamed")
# now we have to define outDir because copyImages = TRUE
renaming.table2 <- imageRename(inDir = wd_images_raw,
outDir = wd_images_raw_renamed,
hasCameraFolders = FALSE,
copyImages = TRUE,
writecsv = FALSE
)
# show output files
list.files(wd_images_raw_renamed, recursive = TRUE)
# output table
renaming.table2
# }
# NOT RUN {
# }
Run the code above in your browser using DataLab