Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- docs <- Corpus(DirSource("path of the directory containing text documents"))
- f <- content_transformer(function(x, pattern)regmatches(x, gregexpr(pattern, x, ignore.case=TRUE)))
- genes = "IL1|IL2|IL3|IL4|IL5|IL6|IL7|IL8|IL9|IL10|TNF|TGF|AP2|OLR1|OLR2"
- docs <- tm_map(docs, f, genes)
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement