list=list.files(path="~/Deduplicated_input",pattern="^sorted_deduplicated_sorted*m$", full.names=TRUE)
您怎么看?
答案 0 :(得分:5)
模式必须是regular expression所以。*而不是*,即
list.files(path = "~/Deduplicated_input",
pattern = "^sorted_deduplicated_sorted.*m$",
full.names = TRUE)
或使用glob,将其转换为正则表达式,如下所示:
list.files(path = "~/Deduplicated_input",
pattern = glob2rx("sorted_deduplicated_sorted*m"),
full.names = TRUE)