This is a question regarding file path change. I have an image database, from a camera trap data management software (camelot) from which I need to seperate certain specific images into a different folder. Each of the image has a metadata associated with it, one of the metadata being species tag. I want to extract only specific species in a separate folder. It is a data frame where each row represents a single image which has a specific path (pasted below). Hence my question is regarding trying to change absolute file path in R, I am trying to do so using file.path but haven’t been successful. Alternatively, if I use file.copy - is there a way to choose ‘pattern’ so that species with a specific metadata (e.g. Elephant) gets selected. Also attached is the csv with first 10 rows of the data.
I would need to change the path to something like:
from the existing path:
1 /Users/Vratika/Library/Application Support/camelot/Media/ce/ceab3647-bc09-45a3-9505-c17d5166d446.jpg
2 /Users/Vratika/Library/Application Support/camelot/Media/1e/1e9ca86c-18a2-42c5-8903-0b8e1af46bc9.jpg
3 /Users/Vratika/Library/Application Support/camelot/Media/4e/4e6ead9b-b6fc-4c4d-b9c7-54055fe7a0d9.jpg
4 /Users/Vratika/Library/Application Support/camelot/Media/57/57953a3d-5083-4041-804e-7b6a0d00b546.jpg
5 /Users/Vratika/Library/Application Support/camelot/Media/59/59255c10-20da-4fa0-9b2b-1a9f3690f951.jpg
6 /Users/Vratika/Library/Application Support/camelot/Media/cb/cb256dc1-5958-4881-a3f5-12e80fcb178e.jpg
This list strives to be beginner friendly. However, we still ask that you
PLEASE do read the posting guide http://www.R-project.org/posting-guide.html
and provide commented, minimal, self-contained, reproducible code.