View source: R/yml_rsconnect.R
yml_rsconnect_email | R Documentation |
RStudio Connect allows you to schedule emails to send using R Markdown. It
uses a special type of YAML using the top-level field rmd_output_metadata
that tells RStudio Connect about the email output. Several rsc_*
fields
exist to specify different components of the email, which can be set in the
YAML header or programmatically using rmarkdown::output_metadata()
. See the
RStudio Connect documentation
for more. yml_output_metadata()
allows you to add any type of content to
the rmd_output_metadata
field.
yml_rsconnect_email( .yml, rsc_email_subject = yml_blank(), rsc_email_body_html = yml_blank(), rsc_email_body_text = yml_blank(), rsc_email_images = yml_blank(), rsc_output_files = yml_blank(), rsc_email_attachments = yml_blank(), rsc_email_suppress_scheduled = yml_blank(), rsc_email_suppress_report_attachment = yml_blank(), resource_files = yml_blank(), ... ) yml_output_metadata(.yml, ...)
.yml |
a |
rsc_email_subject |
The subject of the email. A report without an
|
rsc_email_body_html, rsc_email_body_text |
The body of the email, either in plain text or HTML. A report with neither entry uses an automatically generated, plain-text body with a link to the report’s URL. |
rsc_email_images |
Images to embed in the email. The embedded image must
have a Content ID that is used in the body of the HTML and when providing
the image to |
rsc_output_files |
A vector of file names that should be available after
the report has rendered. If you list a file that does not exist after
rendering your report, Connect will log a message but continue trying to
processing the other files listed. If the output files are not generated
during the rendering of your report, then you will also need to list them
in |
rsc_email_attachments |
A vector of file names that should be attached to the email. |
rsc_email_suppress_scheduled |
Logical. Should the email schedule be
suppressed? Default is |
rsc_email_suppress_report_attachment |
Logical. Should the rendered
document be included as an attachment? Default is |
resource_files |
A file or files to host on RStudio Connect that is not generated by your report, e.g. an existing file. |
... |
additional named R objects, such as characters or lists, to transform into YAML |
a yml
object
Other yml:
asis_yaml_output()
,
bib2yml()
,
draw_yml_tree()
,
has_field()
,
read_json()
,
use_yml_defaults()
,
use_yml_file()
,
use_yml()
,
yml_author()
,
yml_blogdown_opts()
,
yml_bookdown_opts()
,
yml_citations()
,
yml_clean()
,
yml_distill_opts()
,
yml_latex_opts()
,
yml_output()
,
yml_pagedown_opts()
,
yml_params()
,
yml_pkgdown()
,
yml_reference()
,
yml_replace()
,
yml_resource_files()
,
yml_rticles_opts()
,
yml_runtime()
,
yml_site_opts()
,
yml_toc()
,
yml_vignette()
yml() %>% yml_rsconnect_email( rsc_email_subject = "Quarterly report", rsc_output_files = "data.csv", rsc_email_attachments = c("attachment_1.csv", "attachment_2.csv") )
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.