[R] Formatting summary() output to a file

MacQueen, Don m@cqueen1 @end|ng |rom ||n|@gov
Fri Jul 27 23:09:53 CEST 2018

Hmmm. I do get output in the file with the first example, and the second example is too complicated for me.

Don MacQueen
Lawrence Livermore National Laboratory
7000 East Ave., L-627
Livermore, CA 94550
Lab cell 925-724-7509

On 7/27/18, 9:56 AM, "R-help on behalf of Rich Shepard" <r-help-bounces using r-project.org on behalf of rshepard using appl-ecosys.com> wrote:

    On Fri, 27 Jul 2018, MacQueen, Don wrote:
    > Given your description, I would start with
    > sink('wysumallyrs.txt')
    > print( summary(wyallyrs) )
    > sink()
    > and see if that doesn't meet your needs.
       I started with sink() trying to follow
    <https://stat.ethz.ch/R-manual/R-patched/library/base/html/sink.html> (which
    is the same as ?sink within R) using the two examples at the bottom. Neither
    used the print() function and the results were an empty file (using example
    1) or an error message about incorrect usage (using example 2).
       Your solution does make more sense than does using cat().
    R-help using r-project.org mailing list -- To UNSUBSCRIBE and more, see
    PLEASE do read the posting guide http://www.R-project.org/posting-guide.html
    and provide commented, minimal, self-contained, reproducible code.

More information about the R-help mailing list