[R] prevent line breaks with sink()

Duncan.Ramsey at stdavids.com Duncan.Ramsey at stdavids.com
Thu Dec 9 18:52:12 CET 2010


Hello.
I have a script that writes vectors to a txt file using sink(). But depending on the console window's size, sometimes you will get output like:

[1]  38  84 272 287 305 348 411 413 425 426 427 457 513 517 569 583 784
[18] 866 933 996

Instead of:
[1]  38  84 272 287 305 348 411 413 425 426 427 457 513 517 569 583 784 866 933 996

Does anyone know how to stop these automatic line breaks? Simply resizing the window won't help due to the length of some of these vectors. 

While we're at it, I'd love for the '[1]' at the beginning to not print, but that's a much milder problem.

I'd appreciate any help!
-D



More information about the R-help mailing list