highlightString | R Documentation |
Use the case of a string to highlight a pattern. For example, highlighting AC in TTTTGTACAAATC as TTTTGTacAAATC. Note that it will not find overlapping patterns e.g. looking for AGA in AGAGA will only find the first AGA. Non-letter characters can be included in the pattern but their case will remain unchanged.
highlightString(pattern, strings)
pattern |
Pattern to look for in strings |
strings |
Strings in which to look for pattern |
Strings with case of any occurences of pattern swapped
highlightString('AGA',c('TTAGATTAGA','AGAGA')) highlightString('aga',tolower(c('TTAGATTAGA','AGAGA')))
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.