[R] export vector with write() introduces line breaks
gunter.berton at gene.com
Sat Nov 16 20:30:51 CET 2013
1. Read ?write carefully. Note what it says about write() writing to
columns and the link to cat().
2. Use cat() with appropriate arguments to write your file instead.
On Sat, Nov 16, 2013 at 11:20 AM, Martin Batholdy
<batholdy at googlemail.com> wrote:
> I have a long vector which I want to export as a simple ascii text file via
> write(1:600, file='test.txt', sep=',')
> When I open the text file with my text editor I see that the data is structured in columns.
> So it seems that line breaks are introduced.
> How can I prevent this?
> Thank you!
> R-help at r-project.org mailing list
> PLEASE do read the posting guide http://www.R-project.org/posting-guide.html
> and provide commented, minimal, self-contained, reproducible code.
Genentech Nonclinical Biostatistics
More information about the R-help