This what I have:
f=5.20
y=168.9850
dat=c("dat.txt","dat_5.20.txt","data_5.20_168.9850.txt")
Filter(function(x) grepl(f, x), dat)
# [1] "dat_5.20.txt" "data_5.20_168.9850.txt"
I need to grep only the one obtained f and y
How to use both f and y in grepl?
The desired result would be:
"data_5.20_168.9850.txt"