So, I have this folder with more than 200 files. Each file is named as orto_[name]_bom.shp
[name] is the variable
I want to list only the 7 files (on the folder) that is on the vector below
name=c('ananindeua','belém','benevides','castanhal','marituba','santa bárbara do pará','santa izabel do pará')
My code is
files <- list.files(path = './data/regions/sector/',
pattern = paste0("orto_", name, "_bom.shp", full.names = TRUE)
But it is not returning all the seven files. It only returns the [ananindeua] one.
I wonder how code it.