File: writeDataFrame.data.frame.Rd

package info (click to toggle)
r-cran-r.utils 2.13.0-1
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid, trixie
  • size: 2,864 kB
  • sloc: sh: 18; makefile: 6
file content (59 lines) | stat: -rw-r--r-- 2,181 bytes parent folder | download | duplicates (5)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
% Do not modify this file since it was automatically generated from:
% 
%  writeDataFrame.R
% 
% by the Rdoc compiler part of the R.oo package.
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%


\name{writeDataFrame.data.frame}
\alias{writeDataFrame.data.frame}
\alias{writeDataFrame}

\title{Writes a data.frame to tabular text file}

\usage{
\method{writeDataFrame}{data.frame}(data, file, path=NULL, sep="\t", quote=FALSE, row.names=FALSE,
  col.names=!append, ..., header=list(), createdBy=NULL,
  createdOn=format(Sys.time(), format = "\%Y-\%m-\%d \%H:\%M:\%S \%Z"),
  nbrOfRows=nrow(data), headerPrefix="# ", headerSep=": ", append=FALSE, overwrite=FALSE)
}

\description{
 Writes a data.frame to tabular text file with an optional header.
}

\arguments{
  \item{data}{A \code{\link[base]{data.frame}}.}
  \item{file}{A \code{\link[base:connections]{connection}} or a filename to write to.}
  \item{path}{The directory where the file will be written.}
  \item{sep, quote, row.names, col.names, ...}{Additional arguments
    passed to \code{\link[utils]{write.table}}.}
  \item{header}{An optional named \code{\link[base]{list}} of header rows to be written
    at the beginning of the file.  If \code{\link[base]{NULL}}, no header will be written.}
  \item{createdBy, createdOn, nbrOfRows}{If non-\code{\link[base]{NULL}}, common header
    rows to be added to the header.}
  \item{headerPrefix}{A \code{\link[base]{character}} string specifying the prefix of each
    header row.}
  \item{headerSep}{A \code{\link[base]{character}} string specifying the character
    separating the header name and header values.}
  \item{append}{If \code{\link[base:logical]{TRUE}}, the output is appended to an existing file.}
  \item{overwrite}{If \code{\link[base:logical]{TRUE}}, an existing file is overwritten.}
}

\value{
  Returns (invisibly) the pathname to the file written
  (or the \code{\link[base:connections]{connection}} written to).
}

\author{Henrik Bengtsson}

\seealso{
 \code{\link[utils]{write.table}}.
 \code{\link{readTable}}().
}


\keyword{methods}
\keyword{IO}