I have a very large folder of images (train_dir), as well as a CSV file containing the class labels for each of those images(train_df). Because the data is huge, I'd like to take only a sample of images (say 25%) along with labels(train_df); How would I be doing this in R Programming?
My "train_dir" folder has around 150,000 images = ('1.png','2.png',....) and my CSV file looks something similar to CSV file - train_df
What would be the approach to go about making r-script that can do this?