\HeaderA{capabilities}{Report Capabilities of this Build of R}{capabilities}
\keyword{utilities}{capabilities}
\begin{Description}\relax
Report on the optional features which have been compiled into this
build of \R.
\end{Description}
\begin{Usage}
\begin{verbatim}
capabilities(what = NULL)
\end{verbatim}
\end{Usage}
\begin{Arguments}
\begin{ldescription}
\item[\code{what}] character vector or \code{NULL}, specifying
required components.  \code{NULL} implies that all are required.
\end{ldescription}
\end{Arguments}
\begin{Value}
A named logical vector. Current components are
\begin{ldescription}
\item[\code{jpeg}] Is the \code{\LinkA{jpeg}{jpeg}} function operational?
\item[\code{png}] Is the \code{\LinkA{png}{png}} function operational?
\item[\code{tiff}] Is the \code{\LinkA{tiff}{tiff}} function operational?
\item[\code{tcltk}] Is the \pkg{tcltk} package operational?
Note that to make use of Tk you will almost always need to check
that \code{"X11"} is also available.

\item[\code{X11}] Are the \code{\LinkA{X11}{X11}} graphics device and the
X11-based data editor available?  This loads the X11 module if not
already loaded, and checks that the default display can be
contacted unless a \code{X11} device has already been used.
\item[\code{aqua}] Are the \code{R.app} GUI components and the
\code{\LinkA{quartz}{quartz}} function operational?  Only on some Mac OS X
builds.  Note that this is distinct from
\code{.Platform\$GUI == "AQUA"}, which is true when using the Mac
\code{R.app} console.
\item[\code{http/ftp}] Are \code{\LinkA{url}{url}} and the internal method for
\code{\LinkA{download.file}{download.file}} available?
\item[\code{sockets}] Are \code{\LinkA{make.socket}{make.socket}} and related functions
available?
\item[\code{libxml}] Is there support for integrating \code{libxml} with
the \R{} event loop?
\item[\code{fifo}] are FIFO connections supported?
\item[\code{cledit}] Is command-line editing available in the current \R{}
session?  This is false in non-interactive sessions.
It will be true for the command-line interface if \code{readline}
support has been compiled in and \option{--no-readline} was
\emph{not} used when \R{} was invoked.

\item[\code{iconv}] is internationalization conversion via
\code{\LinkA{iconv}{iconv}} supported?
\item[\code{NLS}] is there Natural Language Support (for message translations)?
\item[\code{profmem}] is there support for memory profiling?
\item[\code{cairo}] is there support for \code{type="Cairo"} in
\code{\LinkA{X11}{X11}}, \code{\LinkA{png}{png}},\code{\LinkA{jpeg}{jpeg}},
\code{\LinkA{tiff}{tiff}} and \code{\LinkA{bmp}{bmp}}, and
for the \code{\LinkA{svg}{svg}}, \code{\LinkA{cairo\_pdf}{cairo.Rul.pdf}} and
\code{\LinkA{cairo\_ps}{cairo.Rul.ps}} devices?
\end{ldescription}
\end{Value}
\begin{Section}{Note to Mac OS X users}
Capabilities \code{"jpeg"}, \code{"png"} and \code{"tiff"} refer to
the X11-based versions of these devices.  If
\code{capabilities("aqua")} is true, then these devices with
\code{type="quartz"} will be available, and out-of-the-box will be the
default type.  Thus for example the \code{\LinkA{tiff}{tiff}} device will be
available if \code{capabilities("aqua") || capabilities("tiff")} if
the defaults are unchanged.
\end{Section}
\begin{SeeAlso}\relax
\code{\LinkA{.Platform}{.Platform}}
\end{SeeAlso}
\begin{Examples}
\begin{ExampleCode}
capabilities()

if(!capabilities("http/ftp"))
   warning("internal download.file() is not available")

## See also the examples for 'connections'.
\end{ExampleCode}
\end{Examples}

