Created
May 23, 2016 06:50
-
-
Save vladiim/52d3dfca73c550031ecbdf6192ca3ae4 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| require(lambda.tools) | |
| chunk <- c('Garpolu', 'Grand Cape', 'blah Mount') | |
| # List of c(replace_pattern, replace_with) | |
| xforms <- list(c('Garpolu', 'Gbarpolu'), c('Grand Cape$', 'Grand Cape Mount'), c('ˆMount$', '')) | |
| fold(xforms, function(r,ch) sub(r[1],r[2],ch), chunk) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment