Interactive R Markdown

This is a test of an interactive RMarkdown document within the govuk-hugo theme, on 2022-02-11.

Testing DT

This is a test of the {DT} package that implements interactive tables via the DataTables jQuery plugin

1
2
new_cars <- tibble::rownames_to_column(mtcars, var = "model")
govukhugo::govuk_datatable(new_cars, search = FALSE)

Testing Plotly

This is a test of plotly::ggplotly() which uses the Plotly R package and JavaScript Library to convert {ggplot2} charts into interactive charts

1
2
3
4
p <- ggplot2::ggplot(mtcars, ggplot2::aes(x = mpg, y = disp)) +
  ggplot2::geom_point()

plotly::ggplotly(p)

Testing leaflet

This is a test of the {leaflet} package that produces interactive maps using leaflet.js.

1
2
3
4
m <- leaflet::leaflet()
m <- leaflet::addTiles(m)
m <- leaflet::addMarkers(m, lng = -0.12768, lat = 51.50739)
m