R list files with multiple conditions

前端 未结 6 1235
梦谈多话
梦谈多话 2020-12-28 14:03

I want to list all files in a directory that met certain conditions (date and currency). So with only one condition the argument pattern in list.files

6条回答
  •  隐瞒了意图╮
    2020-12-28 14:58

    In line with Baptiste and the answer on this post (list.files pattern argument in R, extended regular expression use), you can use the following expression:

    file.ls <- list.files(path='~/DATA/PiP/Curvas/',
    pattern=glob2rx("*20130801*USD*"))
    

    Where * is the wildcard.

提交回复
热议问题