title: pass variable into HTML tag in R
body: <p>I need to show tweets in my shiny app, so let's assume that the URL is in a data frame.
  here is my code without variable:</p>
  
  <pre><code>library(shiny)
  runApp(list(
    ui = fluidPage(
      tags$head(
        tags$script("!function(d,s,id){var js,fjs=d.getElementsByTagName(s)    [0],p=/^http:/.test(d.location)?'http':'https';if(!d.getElementById(id)){js=d.createElement(s);js.id=id;js.src=p+'://platform.twitter.com/widgets.js';fjs.parentNode.insertBefore(js,fjs);}}(document,'script','twitter-wjs');")
      ),
        mainPanel(
  HTML('
  &lt;blockquote class="twitter-tweet" data-lang="en"&gt; 
  
  &lt;a href="https://twitter.com/Twitter/status/1144673160777912322"&gt;tweet1&lt;/a&gt;
  
  &lt;/blockquote&gt;
     ') )
    ),
    server = function(input, output, session) {}
  ))
  )
  </code></pre>
  
  <p>then I do some change to HTML and pass a variable </p>
  
  <pre><code>HTML('
  &lt;blockquote class="twitter-tweet" data-lang="en"&gt; 
  
  paste0("&lt;a href='",Top5Retweet2[1,3],"'&gt;","tweet","&lt;/a&gt;")
  &lt;/blockquote&gt;
     ')
        ) )
  </code></pre>
  
  <p>but I got this error and I think it because of quotes  </p>
  
  <pre><code>Error: unexpected '&lt;' in "&lt;"
  </code></pre>
  
  <p>also, I tried  all of this but still does not show anything </p>
  
  <pre><code>cat("&lt;a href=\"",Top5Retweet2[1, 3],"\"&gt;","tweet","&lt;/a&gt;")
  cat("&lt;a href=", dQuote(Top5Retweet2[1, 3]) ,"&gt;","tweet","&lt;/a&gt;")
  </code></pre>
  
  <p>update :</p>
  
  <pre><code>runApp(list(
    ui = fluidPage(
      tags$head(
        tags$script("!function(d,s,id){var js,fjs=d.getElementsByTagName(s)    [0],p=/^http:/.test(d.location)?'http':'https';if(!d.getElementById(id)){js=d.createElement(s);js.id=id;js.src=p+'://platform.twitter.com/widgets.js';fjs.parentNode.insertBefore(js,fjs);}}(document,'script','twitter-wjs');")
      ),
        mainPanel(
          htmlOutput("tweets_show")
  
        )
    ),
    server = function(input, output, session) {
      output$tweets_show &lt;- renderUI({
        HTML(
          paste('&lt;blockquote class="twitter-tweet" data-lang="en"&gt;',
                paste("&lt;a href=\"",Top5Retweet2[2, 3],"\"&gt;","tweet","&lt;/a&gt;"),
                '&lt;/blockquote&gt;') 
        )
      })
  
    }
  ))
  </code></pre>
  
  <p>any help thank you</p>