I have a large number of files in several folders. I can get a list of these files with;
MY_FILES <- list.files(WORKING_DIRECTORY, pattern = "MY_PATTERN", recursive = TRUE)
Sure, just get file sizes.
x <- list.files(full.names = TRUE) x[sapply(x, file.size) > 300000]  "./hami.jpg" "./process_steps.jpg" "./shp_sveta.png"
Here I subset only files which are bigger than 300kB. Notice that
atom.jpg and other smaller files are not included in the subset. You should use
full.names argument to access files which are not in