I am testing dygraphs, what I would like is generate an html file and then send it in an email so outlook
can open it and I see the content in the body (NOT just attachment)
This is an extension of this post
Here is dygraphs.Rmd
---
output:
html_document:
fig_width: 6
fig_height: 4
self_contained: no
---
```{r}
require(dygraphs)
dygraph(nhtemp, main = "New Haven Temperatures", ylab = "Temp (F)")
```
The following code works and send the email (dygraphs.r)
library(dygraphs)
library(mailR)
library(rmarkdown)
send <- function(subject, body){
send.mail(from = "me",
to = "me",
subject = subject,
html = T,
inline = T,
body = body,
smtp = list(host.name = "smtp.gmail.com", port = 465, user.name = "me", passwd = "pwd", ssl = T),
authenticate = T,
send = T)
}
knitr::knit2html(input='dygraphs.Rmd', output='dygraphs_knitr.html',options = "")
rmarkdown::render('dygraphs.Rmd','html_document','dygraphs_rmarkdown.html')
send('dygraphs_knitr', 'dygraphs_knitr.html')
send('dygraphs_rmarkdown', 'dygraphs_rmarkdown.html')
I doing this I receive the email but the graph is not rendered. Is there a workaround (if this is possible)?