2.1 Writing HTML tags from R
Install the htmltools package, which allows us to manipulate, combine and rearrange HTML elements directly from R:
Create an HTML element via the htmltools package:
<div>Hello world</div>
Inside the tag function call, named elements become attributes; and, unnamed elements, children:
<div id="r-create-div" class="r" data-numChildren="1"> <div>Child</div> </div>