A tableHTML object created by the tableHTML function.
pattern
A tableHTML string to be replaced. Regex is allowed.
replacement
A replacement for the matched pattern.
replace_all
TRUE or FALSE. If TRUE gsub is used internally and all the pattern occurrances
will be replaced. If FALSE sub is used internally and only the first occurance will be
replaced. Defaults to FALSE.
...
Additional arguments passed on to sub or gsub.
Details
replace_html replaces a tableHTML string with another. The function calls sub and gsub
internally (according to the replace_all argument) to do the replacements but in a safe way in
order to preserve the class of the tableHTML object. Also, replace_html has been
developed so that it can be used with chaining (using the pipe operator %>%).
See the examples to understand exactly how.