sprintf() returns a character string that you then can write to file using cat() or some of its friends.
Henrik Bengtsson Dept. of Mathematical Statistics @ Centre for Mathematical Sciences Lund Institute of Technology/Lund University, Sweden (+2h UTC) +46 46 2229611 (off), +46 708 909208 (cell), +46 46 2224623 (fax) h b @ m a t h s . l t h . s e, http://www.maths.lth.se/~hb/ On Thu, 21 Aug 2003 [EMAIL PROTECTED] wrote: > I'd like to write some numbers to an external file that looks "pretty" (e.g, > decimal points aligned, same number of decimals). For example, if using > sprintf(), "%5.1f" can be used to specify the format of the float to be printed > on screen. How can I do the same if I want to write an output file instead? I > have tried cat and write.table, but none of them worked so far. > > Thanks in advance, > > Ping > > ______________________________________________ > [EMAIL PROTECTED] mailing list > https://www.stat.math.ethz.ch/mailman/listinfo/r-help > ______________________________________________ [EMAIL PROTECTED] mailing list https://www.stat.math.ethz.ch/mailman/listinfo/r-help
