1
我在RStudio內使用knitr和dismo包。嘗試一下,因爲我可能無法使用gmap在R標記內的文本之後出現創建的圖。dismo使用knitr的情節之前有白色空間
這裏是可以用來重新創建[R標記的最低位。您需要安裝三個引用的軟件包。
我正在使用RStudio,並在此環境中執行knitr命令。
---
title: "gmap"
output: html_document
---
```{r setup, include=FALSE}
knitr::opts_chunk$set(echo = TRUE)
library(dismo)
library(rgdal)
library(XML)
```
The plot should follow this text
```{r plot, fig.align='left', echo=FALSE, message=FALSE}
g = gmap('Australia')
plot(g)
```
and precede this. Try as I might, there is white space between the start text and the image which I cannot get rid of.
我找不到任何方法來使用knitr指令來控制圖像的高度,Google沒有提供明顯的答案。有沒有人看過這個,可以提供任何建議?
編輯:我有一個解決方案,繪製到一個PNG文件,然後包括它。這避免了這個問題,但是笨重。
是的 - 這工程。謝謝! – awchisholm