Quantcast
Channel: Active questions tagged r - Stack Overflow
Viewing all articles
Browse latest Browse all 201945

How to save multiple .jpeg image files into a directory after making changes to them?

$
0
0

I am trying to make changes to some camera-trap photos. Here is the issue: I need to remove photos from a camera-trap station from 1500-2000 hrs, which were taken due to wrong setting.

I was able to import them into R and make the changes - I can't figure out a way to successfully save the images that I want to keep.

Here's the code that I used so far:

timfile <- read.csv("timeCh.csv")

folder <- ("/Volumes/Manitou_photos/NMI/NMI_01/100EK113")
files <- list.files(path = folder , pattern = "*.jpg", full.names=TRUE)

View(files)
str(files)

folder1 <- as.data.frame(files)

newfolder <- subset(folder1, grepl(paste("15-00-00", collapse = "|"), folder1$files))

timfileFolder <- subset(folder1, grepl(paste(timfile$time, collapse = "|"), folder1$files))

goodPics <- subset(folder1, !files %in% timfileFolder$files) 


Viewing all articles
Browse latest Browse all 201945

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>