0

I have a matrix that is being outputted in to a RMarkDown PDF.

It is several columns wide and 10 rows. Is there a way to force it fit horizontally as oppose to going further down the page?

{r out.width = '200px', out.height = '200px'} mat

Right now it looks like this....

enter image description here

user1234440
  • 22,521
  • 18
  • 61
  • 103
  • Would you consider making the pdf landscape instead of portrait? That would be a very easy solution. Otherwise, and people can feel free to correct me, you'd have to convert the output into a table/data.frame and then put that into the pdf. Which isn't horrible, just not as easy as making the page landscape. – Andrew Taylor Jan 09 '15 at 21:14
  • I don't mind. As long as it fits nicely... – user1234440 Jan 09 '15 at 21:15
  • Well here is an entry for making a landscape page: http://stackoverflow.com/questions/25849814/rstudio-rmarkdown-both-portrait-and-landscape-layout-in-a-single-pdf see if you like it, if not we can continue... – Andrew Taylor Jan 09 '15 at 21:16

1 Answers1

0

You can redefine override the default wrapping width.

```{r}
options(width=100)
mat
'''

Note sure that this will be optimal/good choice when you convert your markdown to pdf...

agstudy
  • 119,832
  • 17
  • 199
  • 261