List files with multiple conditions part2
问题 I have the following rasters and would like to import them in R. My files are now called: B02_10m.jp2 B03_10m.jp2 B04_10m.jp2 B08_10m.jp2 B05_20m.jp2 B06_20m.jp2 B07_20m.jp2 B8A_20m.jp2 B11_20m.jp2 B12_20m.jp2 They are located in different sub-folders. That's way I am using recursive=TRUE I have trying with the following options to combine the conditions but it's not working. S2 <- "my/path" S2 <- list.files(S2, recursive = TRUE, full.names = TRUE, pattern = "B0[2348]_10m.jp2$ | B(0[567]_20m)