Created
November 5, 2014 23:53
-
-
Save Athospd/1c01e67ff077b894db24 to your computer and use it in GitHub Desktop.
Exemplo de tabela condensada com pander em RMarkdown
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
--- | |
title: "Exemplo Tabelas com Pander em RMarkdown" | |
author: "Athos" | |
date: "Wednesday, November 05, 2014" | |
output: html_document | |
--- | |
```{r} | |
library(pander) | |
library(magrittr) | |
panderOptions('table.style', 'rmarkdown') | |
matriz_larga <- matrix(c(TRUE, FALSE), 10, 20) %>% as.data.frame.matrix | |
``` | |
# Tabela cortada | |
```{r, results='asis'} | |
matriz_larga %>% pander | |
``` | |
# Tabela condensada | |
```{r, results='asis'} | |
panderOptions('table.split.table', Inf) | |
matriz_larga %>% pander | |
``` | |
OBS: para o pander funcionar, o parâmetro `results` do chunk precisa ser `asis`. Exemplo: `'''{r, results = "asis"} ` |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment