代码照书上抄的,rmd输出word,通过run可以输出图形,knit会报错,代码与报错如下
### 代码清单3-4:多幅图形比对
```{r echo=TRUE ,results='hold'}
par=(fig=c(0,0.8,0,0.8))
plot(mtcars$wt,mtcars$mpg,xlab="Miles Per Gallon",ylab="Car weight")
par(fig=c(0,0.8,0.55,1),new=TRUE)
boxplot(mtcars$wt,horizontal =TRUE,axes=FALSE )
par(fig=c(0.65,1,0,0.8),new=TRUE)
boxplot(mtcars$mpg,axes=FALSE )
mtext("enhanced scatterplot",side=3,outer=TRUE,line =-3)
```