2016-11-10 9 views
0

は、ここに私の例である:最終PDF出力でRmarkdownで大きなテーブルを回転または調整するにはどうすればよいですか?

--- 
title: "There is a reproductible example" 
output: pdf_document 
--- 

```{r table-simple, echo=FALSE, message=FALSE, warnings=FALSE, results='asis'} 
require(pander) 
panderOptions('table.split.table', Inf) 
set.caption("My great data") 
my.data <- " # replace the text below with your table data 
Anticonstitutionnellement|Anticonstitutionnellement|Anticonstitutionnellement|Anticonstitutionnellement|Anticonstitutionnellement 
Anticonstitutionnellement|Anticonstitutionnellement|Anticonstitutionnellement|Anticonstitutionnellement|Anticonstitutionnellement 
Anticonstitutionnellement|Anticonstitutionnellement|Anticonstitutionnellement|Anticonstitutionnellement|Anticonstitutionnellement 
Anticonstitutionnellement|Anticonstitutionnellement|Anticonstitutionnellement|Anticonstitutionnellement|Anticonstitutionnellement " 

df <- read.delim(textConnection(my.data),header=FALSE,sep="|",strip.white=TRUE,stringsAsFactors=FALSE) 
names(df) <- unname(as.list(df[1,])) # put headers on 
df <- df[-1,] # remove first row 
row.names(df)<-NULL 
pander(df, style = 'rmarkdown') 
``` 

、言葉が重なっています。

私は "kable"、 "table"、 "print"を使用します
単語が重複していないと思いますか?

テーブルが非常に大きい場合は、テーブルが自動的にランドスケープ形式で回転します。出来ますか?

答えて

0

あなたはオプションを追加しようとすることができます:あなたの頭のセクションで

classoption: landscape 

--- 
title: "There is a reproductible example" 
output: pdf_document 
classoption: landscape 
--- 

これは、文書の景観バージョンを生成します。

関連する問題