Have you ever been stuck watching or just waiting for your code to finish? This post will outline a simple example program that you can use to email a file or message. I've found this incredibly helpful on time critical projects where I want to maximize my time by coding up the next problem while the current one executes. The mailR package allows you to programmatically attach files and email results to yourself. Assuming your company SMTP server is open for you to use, the mailR package can support you in doing this. My example below emails the R script used to create the email to myself. I'm hoping that I can send an example of a rmarkdown file as the body of the email in my next example using this package.
No comments:
Post a Comment