【问题标题】:How do I add a URL to R markdown?如何将 URL 添加到 R 降价?
【发布时间】:2015-06-29 12:54:03
【问题描述】:

我想引用一个指向 R 降价的 URL 链接,并且我已经尝试了诸如“addlink”之类的输入 或“地址

谢谢!

编辑:评论中的操作代码是

   {r} [linked phrase] (www.bit.ly/1EqAdIp)

【问题讨论】:

  • 请添加一些代码!!!
  • 我试过这个:[链接短语] (bit.ly/1EqAdIp),但还是不行:(
  • 你为什么一直在“]”和“(”之间放一个空格?应该是“](”。
  • 根据@Dev 的建议,请在您的原始帖子中添加代码。

标签: r hyperlink knitr r-markdown


【解决方案1】:

注意下面@Hao 的回答,这必须在正文中,而不是在代码块中:

来自this fabulous resource

[I'm an inline-style link](https://www.google.com)

[I'm an inline-style link with title](https://www.google.com "Google's Homepage")

[I'm a reference-style link][Arbitrary case-insensitive reference text]

[I'm a relative reference to a repository file](../blob/master/LICENSE)

[You can use numbers for reference-style link definitions][1]

Or leave it empty and use the [link text itself]

Some text to show that the reference links can follow later.

[arbitrary case-insensitive reference text]: https://www.mozilla.org
[1]: http://slashdot.org
[link text itself]: http://www.reddit.com

【讨论】:

    【解决方案2】:

    如果您使用的是闪亮,您需要做的就是在标记(白色)区域:

    [linked phrase](www.bit.ly/1EqAdIp) #no space, no {r}
    

    这样您在文本(=标记)而不是页面的交互部分(~R)处输入超链接。

    【讨论】:

      【解决方案3】:

      您不应该将超链接放在 R 代码块中。 xxx 是 Markdown 语法。如果你把它放在{r} 之后,knitr/rmarkdown 会将它视为 R 代码的一部分,当然,R 会产生错误消息。

      解决方法:删除{r}

      【讨论】:

        猜你喜欢
        • 2021-07-01
        • 2019-07-11
        • 2020-02-13
        • 2014-03-07
        • 2015-07-09
        • 2016-12-24
        • 1970-01-01
        • 2019-03-25
        • 1970-01-01
        相关资源
        最近更新 更多