I want to list all files in a directory that met certain conditions (date and currency). So with only one condition the argument
file.ls <- list.files(path='~/DATA/PiP/Curvas/',pattern='20130801')
file.ls <- list.files(path='~/DATA/PiP/Curvas/',pattern=c('20130801','USD'))
Filter(function(x) grepl("USD", x), file.ls)
alternatively, you could construct a regular expression for pattern that only matches filenames containing both strings, but that's a wizard's game.