Dambo Dambo - 1 year ago 49
R Question

How to specify an attribute with a dash in a tag function?

I need to specify an attribute

in a
tag, how to I do it?
I tried something like this but it doesn't work:

tags$div(id='log', data-log='value')

Answer Source

Quoting the attribute would work!


Output (Html source):

<div class="col-sm-8">
        <div id="distPlot" class="shiny-plot-output" style="width: 100% ; height: 400px"></div>
        <div id="log" class="unique" data-log="next"></div>