5 R Markdown

5.1 Email Customization

You can customize the subject line used when an email of a report is generated. RStudio Connect checks the R Markdown output metadata for a value named rsc_email_subject, and if it finds a value, it uses that value as the email subject.

There are two ways to set rsc_email_subject. If you want only a simple, static-text override of the title, you can set the value in the R Markdown YAML header. For example:

title: "Report Title"
    rsc_email_subject: "My Email Subject Goes Here"

You can also set the email subject programmatically by setting the rsc_email_subject value from embedded R code. For example:

rmarkdown::output_metadata$set("rsc_email_subject" = "My Email Subject Goes Here")

Note that rmd_output_metadata names starting with rsc_ are reserved for use with RStudio Connect.