I have a document in RMarkdown where I want to display an output from a function. Because the output table is too big, however, the output always shows with a linebreak, like this:
I want the table to continue in one line and fill the whole width of the document. There is a lot of space on the right that the output box could extend to.
This is my reproducible example code. I made the variables extremely long on purpose to demonstrate the problem. I also added the legend on the side as this demonstrates the problem as well.
---
title: "rEproDUciBle ExamPle"
output:
html_document:
number_sections: true
toc: true
toc_float: true
toc_depth: 1
---
# x
## x
## x
# x
## x
```{r }
#install.packages("MatchIt")
library(MatchIt)
data("mtcars")
names(mtcars) <- c("longlonglonglonglongword1longlonglonglonglongword1", "longlonglonglonglongword1longlonglonglonglongword2", NA, NA, NA, NA, NA, "longlonglonglonglongword1longlonglonglonglongword9")
a1 <- matchit(longlonglonglonglongword1longlonglonglonglongword9 ~ longlonglonglonglongword1longlonglonglonglongword1 + longlonglonglonglongword1longlonglonglonglongword2, mtcars,
method = "nearest", distance = "mahalanobis",ratio = 1,replace = FALSE, std.caliper = TRUE, caliper = c(longlonglonglonglongword1longlonglonglonglongword2 = 0.1))
```
## x
```{r }
options(width = 200)
summary(a1)
```