[R] write.table - format

Prof Brian Ripley ripley at stats.ox.ac.uk
Tue Jan 8 09:55:08 CET 2002


On Tue, 8 Jan 2002, Nando Foppa wrote:

> Hello there
>
> I ` m a newbie in R and have a question about the output of write.table
> My command looks like this:
> write.table(datatr$V1[data.chull],file="outr.txt", quote = FALSE, sep =
> "\t")
>
> In the outputfile (outr.txt) I have an "x" in the left corner and a new
> row with  numbers for each column(1,2,3...).
> I just want the values in my file. What should I change in
> write.table-command?

row.names = FALSE, col.names = FALSE.

However, what you are writing is not a data frame but a vector, so I think
write() is a more appropriate function.

...

-- 
Brian D. Ripley,                  ripley at stats.ox.ac.uk
Professor of Applied Statistics,  http://www.stats.ox.ac.uk/~ripley/
University of Oxford,             Tel:  +44 1865 272861 (self)
1 South Parks Road,                     +44 1865 272860 (secr)
Oxford OX1 3TG, UK                Fax:  +44 1865 272595

-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-
r-help mailing list -- Read http://www.ci.tuwien.ac.at/~hornik/R/R-FAQ.html
Send "info", "help", or "[un]subscribe"
(in the "body", not the subject !)  To: r-help-request at stat.math.ethz.ch
_._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._



More information about the R-help mailing list