htmlwidgets in pkgdown sites need special treatment for some site components.
If you include widgets in a README.Rmd
, add always_allow_html: yes
to the YAML front matter. You’ll get a error if you try to knit the document without that option.
If you include widgets in your vignettes, use chunk option out.width = '100%'
to ensure the widget spans the entire container.
library(heatmaply)
#> Loading required package: plotly
#> Loading required package: ggplot2
#>
#> Attaching package: 'plotly'
#> The following object is masked from 'package:ggplot2':
#>
#> last_plot
#> The following object is masked from 'package:stats':
#>
#> filter
#> The following object is masked from 'package:graphics':
#>
#> layout
#> Loading required package: viridis
#> Loading required package: viridisLite
#>
#> ======================
#> Welcome to heatmaply version 0.15.0
#>
#> Type citation('heatmaply') for how to cite the package.
#> Type ?heatmaply for the main documentation.
#>
#> The github page is: https://github.com/talgalili/heatmaply/
#> Please submit your suggestions and bug-reports at: https://github.com/talgalili/heatmaply/issues
#> Or contact: <tal.galili@gmail.com>
#> ======================
heatmaply(mtcars, k_row = 3, k_col = 2)