\HeaderA{write.arff}{Write Data into ARFF Files}{write.arff}
\keyword{print}{write.arff}
\keyword{file}{write.arff}
\begin{Description}\relax
Writes data into Weka Attribute-Relation File Format (ARFF) files.
\end{Description}
\begin{Usage}
\begin{verbatim}
write.arff(x, file, eol = "\n", relation = deparse(substitute(x)))
\end{verbatim}
\end{Usage}
\begin{Arguments}
\begin{ldescription}
\item[\code{x}] the data to be written, preferably a matrix or data frame.
If not, coercion to a data frame is attempted.
\item[\code{file}] either a character string naming a file, or a connection.
\code{""} indicates output to the standard output connection.
\item[\code{eol}] the character(s) to print at the end of each line (row).
\item[\code{relation}] The name of the relation to be written in the file.
\end{ldescription}
\end{Arguments}
\begin{Details}\relax
\code{relation} will be passed through \code{\LinkA{make.names}{make.names}} before
writing to the file, in an attempt to it them acceptable to Weka, and
column names what do not start with an alphabetic character will have
\code{X} prepended.

However, the references say that ARFF files are ASCII files, and that
encoding is not enforced.
\end{Details}
\begin{References}\relax
Attribute-Relation File Format
\url{http://www.cs.waikato.ac.nz/~ml/weka/arff.html}\\
\url{http://weka.sourceforge.net/wekadoc/index.php/en:ARFF_(3.5.1)}
\end{References}
\begin{SeeAlso}\relax
\code{\LinkA{read.arff}{read.arff}}
\end{SeeAlso}
\begin{Examples}
\begin{ExampleCode}
write.arff(iris, file = "")
\end{ExampleCode}
\end{Examples}

