| Line 11... |
Line 11... |
| 11 |
}
|
11 |
}
|
| 12 |
\usage{
|
12 |
\usage{
|
| 13 |
write.table(x, file = "", append = FALSE, quote = TRUE, sep = " ",
|
13 |
write.table(x, file = "", append = FALSE, quote = TRUE, sep = " ",
|
| 14 |
eol = "\n", na = "NA", dec = ".", row.names = TRUE,
|
14 |
eol = "\n", na = "NA", dec = ".", row.names = TRUE,
|
| 15 |
col.names = TRUE, qmethod = c("escape", "double"))
|
15 |
col.names = TRUE, qmethod = c("escape", "double"))
|
| - |
|
16 |
|
| - |
|
17 |
write.csv(\dots, col.names = NA, sep = ",", qmethod = "double")
|
| - |
|
18 |
write.csv2(\dots, col.names = NA, dec = ",", sep = ";", qmethod = "double")
|
| 16 |
}
|
19 |
}
|
| 17 |
\arguments{
|
20 |
\arguments{
|
| 18 |
\item{x}{the object to be written, preferably a matrix or data frame.
|
21 |
\item{x}{the object to be written, preferably a matrix or data frame.
|
| 19 |
If not, it is attempted to coerce \code{x} to a data frame.}
|
22 |
If not, it is attempted to coerce \code{x} to a data frame.}
|
| 20 |
\item{file}{either a character string naming a file or a connection.
|
23 |
\item{file}{either a character string naming a file or a connection.
|
| Line 41... |
Line 44... |
| 41 |
\item{qmethod}{a character string specifying how to deal with embedded
|
44 |
\item{qmethod}{a character string specifying how to deal with embedded
|
| 42 |
double quote characters when quoting strings. Must be one of
|
45 |
double quote characters when quoting strings. Must be one of
|
| 43 |
\code{"escape"} (default), in which case the quote character is
|
46 |
\code{"escape"} (default), in which case the quote character is
|
| 44 |
escaped in C style by a backslash, or \code{"double"}, in which case
|
47 |
escaped in C style by a backslash, or \code{"double"}, in which case
|
| 45 |
it is doubled. You can specify just the initial letter.}
|
48 |
it is doubled. You can specify just the initial letter.}
|
| - |
|
49 |
|
| - |
|
50 |
\item{\dots}{further arguments to \code{write.table}.}
|
| 46 |
}
|
51 |
}
|
| 47 |
\details{
|
52 |
\details{
|
| 48 |
By default there is no column name for a column of row names. If
|
53 |
By default there is no column name for a column of row names. If
|
| 49 |
\code{col.names = NA} a blank column name is added. This can be used to
|
54 |
\code{col.names = NA} a blank column name is added. This can be used to
|
| 50 |
write CSV files for input to spreadsheets.
|
55 |
write CSV files for input to spreadsheets. \code{write.csv} and
|
| - |
|
56 |
\code{write.csv2} provide convenience wrappers for doing so.
|
| 51 |
|
57 |
|
| 52 |
If the table has no columns the rownames will be written only if
|
58 |
If the table has no columns the rownames will be written only if
|
| 53 |
\code{row.names=TRUE}, and \emph{vice versa}.
|
59 |
\code{row.names=TRUE}, and \emph{vice versa}.
|
| 54 |
|
60 |
|
| 55 |
Real and complex numbers are written to the maximal possible precision.
|
61 |
Real and complex numbers are written to the maximal possible precision.
|