[R] Presentation tables in R (knitr)
murdoch.duncan at gmail.com
Tue Nov 25 22:37:02 CET 2014
On 25/11/2014 3:12 PM, Tom Wright wrote:
> This problem has me stumped so I thought I'd ask the experts. I'm trying
> to create a pretty summary table of some data (which patients have had
> what tests at what times). Ideally I'd like to knitr this into a pretty
> PDF for presentation.
> If anyone has pointers I'll be grateful.
> #All levels of Time are repeated for all IDs, I'd prefer to just show
> the relevant times.
You can drop certain rows of the table. See the last example in
?tabular. (It's possible to do logical indexing, but a little harder.
I think the vignette has an example of this...)
You can use latex() on the results, and display them in a knitr document.
> #Time is getting collapsed by ID
> #close but not very pretty
> 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.
More information about the R-help