2

在 R Markdown 中,我想水平绘制决策树,以便它更适合整个 PDF 页面。此代码垂直绘制它:

```{r, message=FALSE, warning = FALSE, echo=FALSE, cache = FALSE}

rpart.lrn <- makeLearner("classif.rpart", predict.type = "prob", fix.factors.prediction = FALSE) 
model = train(rpart.lrn, task = classif.task, subset = train.set)
tree <- getLearnerModel(model)
rpart.plot(tree) # visualise the tree
```

我怎样才能将它水平绘制呢?

4

1 回答 1

1

你有没有试过这样设置 fig.height 和 fig.width,例如{r ggpair, echo=FALSE, message = FALSE, warning = FALSE, fig.height = 12, fig.width = 12}

于 2018-06-05T07:02:14.683 回答