I use the “traditional” command line tool, grep, for much of my regexp work in R.
formulas <- readLines("full_models.txt") fragstats <- grep("IJI|SIDI|IJI_water|LPI|SIDI", formulas, perl=TRUE, value=TRUE)
I use the “traditional” command line tool, grep, for much of my regexp work in R.
formulas <- readLines("full_models.txt") fragstats <- grep("IJI|SIDI|IJI_water|LPI|SIDI", formulas, perl=TRUE, value=TRUE)