View source: R/B002_grepRename.R
grepRename | R Documentation |
A function to rename the names in a named list using grep patterns.
grepRename(inputList, inputPattern, replaceString)
inputList |
a named list |
inputPattern |
the items to be renamed |
replaceString |
the replacement |
Returns the original list with any matches renamed.
testInputList=list(col="red",.colour="blue",points_.colour="green",lines_col="yellow",lines_.colour="pink") testOutputList=grepRename(testInputList,"\\.colour$","col") expectedOutputList=list(col="blue",points_col="green",lines_col="pink")
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.