This package contains the definition for a htmlwidget widget able to embed a Twitter status within an R markdown page.
The main functionality is to allow to render a card representing a twitter status in HTML page created from R Markdown. The widget has been tested with regular pages or dashboards, created with Flaxdashboard and Shiny.
To install the latest stable version you can obtain the package from CRAN:
install.packages("twitterwidget")
To install the latest development version:
devtools::install_github("guivo/twitterwidget")
The widget at the moment focuses on a very specific goal and it is indeed very easy to use. In Rmd page you can place the following line where it is more convenient:
library(twitterwidget)
optspars <- list(align="center")
twitterwidget('<statusid>', optpars)
The last line renders the twitter widget within the HTML page, allowing to visualize a specific status in the region of the layout controlled by the block.
The javascript code doesn't properly render the content using the RStudio viewer, it is required to use a more complete browser to check the result.
The package is not under active development but the developer is alive, in case of issues fixes can be applied.
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.