を見てみましょう:私がでてるところ
data.frame(v1 = c(TRUE, TRUE, TRUE, FALSE, TRUE), v2 = c("Some text", "Some more text", "This text wraps after a certain width", "Even more text", "More text"), y = c(TRUE, FALSE, FALSE, FALSE, TRUE))
options(width=10)
はここだ理想的には、私は次のような何かをしたいですライブラリpander
のpandoc.table
の機能それはあなたが何をしているかのようです。http://rapporter.github.io/pander/pandoc_table.html
library(pander)
m<-data.frame(v1 = c(TRUE, TRUE, TRUE, FALSE, TRUE), v2 = c("Some text", "Some more text", "This text wraps after a certain width", "Even more text", "More text"), y = c(TRUE, FALSE, FALSE, FALSE, TRUE))
pandoc.table(m, split.cells = c(5, 20, 5))
#>---------------------------
#> v1 v2 y
#>----- --------------- -----
#>TRUE Some text TRUE
#>
#>TRUE Some more text FALSE
#>
#>TRUE This text wraps FALSE
#> after a certain
#> width
#>
#>FALSE Even more text FALSE
#>
#>TRUE More text TRUE
#>---------------------------