Once I saw R.devices
function toFavicon
I just had to figure out how to use it to dynamically change the favicon with a plot from R. Here is one way to accomplish it, but note the dangerous eval(parse(...))
in line 14, so be careful if you are using for nonpersonal use.
For non-shiny use, we can see it work with htmltools
.
library(htmltools)
library(R.devices)
html_print(
HTML(
toFavicon( plot(1:10) )
)
,viewer = browseURL # since RStudio Viewer doesn't show favicon open in browser
)