thanks, jeff.  no, not capture.output(), but thanks for pointing me to it
(I did not know it).  capture.output flattens the data frame.  I want the
print.data.frame output, so that I can feed it to cat, and get reasonable
newlines, too.

regards,

/iaw
----
Ivo Welch (ivo.welch@gmail.com)
J. Fred Weston Professor of Finance
Anderson School at UCLA, C519
http://www.ivo-welch.info/
Editor, Critical Finance Review, http://www.critical-finance-review.org/


On Thu, May 31, 2012 at 1:19 PM, Jeff Newmiller <jdnewmil@dcn.davis.ca.us>wrote:

> capture.output(print(mydf))
>
> note that df is a base function... best to not use it as a variable.
> ---------------------------------------------------------------------------
> Jeff Newmiller                        The     .....       .....  Go Live...
> DCN:<jdnewmil@dcn.davis.ca.us>        Basics: ##.#.       ##.#.  Live
> Go...
>                                      Live:   OO#.. Dead: OO#..  Playing
> Research Engineer (Solar/Batteries            O.O#.       #.O#.  with
> /Software/Embedded Controllers)               .OO#.       .OO#.  rocks...1k
> ---------------------------------------------------------------------------
> Sent from my phone. Please excuse my brevity.
>
> ivo welch <ivo.welch@gmail.com> wrote:
>
> >dear R experts---is there a function that prints a data frame to a
> >string?
> >cat() cannot handle lists, so I cannot write cat("your data frame
> >is:\n",
> >df, "\n").
> >
> >regards, /iaw
> >----
> >Ivo Welch (ivo.welch@gmail.com)
> >
> >       [[alternative HTML version deleted]]
> >
> >______________________________________________
> >R-help@r-project.org mailing list
> >https://stat.ethz.ch/mailman/listinfo/r-help
> >PLEASE do read the posting guide
> >http://www.R-project.org/posting-guide.html
> >and provide commented, minimal, self-contained, reproducible code.
>
>

	[[alternative HTML version deleted]]

