在我的代码中,我正在检查一个条件,并且当该条件为TRUE时,我希望R markdown显示一张图片。以下是我的代码:
```{r}
if (LOGICAL.Condition)
{
cat("<img src='http://imgc.allpostersimages.com/images/P-473-488-90/60/6071/B4XD100Z/posters/now-stop-and-hammer-time.jpg'>")
}
```
我在HTML页面上使用的R代码输出为文本格式,但我希望它能够以图片形式呈现。
## <img src='http://imgc.allpostersimages.com/images/P-473-488-90/60/6071/B4XD100Z/posters/now-stop-and-hammer-time.jpg'>