Hi R experts,
I tried to send a data table by "sendmail" in sendmailR package.
Here is my code:
employee <- c('John Doe','Peter Gynn','Jolie Hope')
salary <- c(21000, 23400, 26800)
outputf <- data.frame(employee, salary)
from <- "email@example.com"
to <- "firstname.lastname@example.org"
subject <- "update"
body <-print(xtable(outputf,caption = 'a data table'),type='html',caption.placement = 'top')
However, the output in the email is a mess (see below)
Could you please suggest a way to write a data frame in an email?