% Generated by roxygen2: do not edit by hand
% Please edit documentation in R/utils.R
\name{render_external}
\alias{render_external}
\title{Render Rmd in a script external to the current session}
\usage{
render_external(
  input,
  output_format = "rmarkdown::html_document",
  output_file,
  output_options,
  warn = -1
)
}
\arguments{
\item{input}{The input file to be rendered. This can be an R script (.R),
an R Markdown document (.Rmd), or a plain markdown document.}

\item{output_format}{The R Markdown output format to convert to. The option
\code{"all"} will render all formats defined within the file. The option can
be the name of a format (e.g. \code{"html_document"}) and that will render
the document to that single format. One can also use a vector of format
names to render to multiple formats. Alternatively, you can pass an output
format object (e.g. \code{html_document()}). If using \code{NULL} then the
output format is the first one defined in the YAML frontmatter in the input
file (this defaults to HTML if no format is specified there).
If you pass an output format object to \code{output_format}, the options
specified in the YAML header or \code{_output.yml} will be ignored and you
must explicitly set all the options you want when you construct the object.
If you pass a string, the output format will use the output parameters in
the YAML header or \code{_output.yml}.}

\item{output_file}{The name of the output file. If using \code{NULL} then the
output filename will be based on filename for the input file. If a filename
is provided, a path to the output file can also be provided. Note that the
\code{output_dir} option allows for specifying the output file path as well,
however, if also specifying the path, the directory must exist. If
\code{output_file} is specified but does not have a file extension, an
extension will be automatically added according to the output format. To
avoid the automatic file extension, put the \code{output_file} value in
\code{\link{I}()}, e.g., \code{I('my-output')}.}

\item{output_options}{List of output options that can override the options
specified in metadata (e.g. could be used to force \code{self_contained} or
\code{mathjax = "local"}). Note that this is only valid when the output
format is read from metadata (i.e. not a custom format object passed to
\code{output_format}).}

\item{warn}{sets the handling of warning messages. -1 or 0}
}
\description{
Render Rmd in a script external to the current session
}
