如何在rmarkDown中的文本/句子中包含代码?

发布于 2025-02-12 02:07:26 字数 169 浏览 0 评论 0原文

是否可以在rmarkDown中运行代码

我想在HTML中写一些文本,并包括代码,例如:

最大的销售具有独特(DF $ City)去年...

```{r}
some code
````

is it possible to run the code outside the chunk in rmarkdown?

I want to put some text in html and include code, for example:

The biggest sales had unique(df$city) last year...

```{r}
some code
````

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(1

别忘他 2025-02-19 02:07:27

内联代码:

The biggest sales had `r unique(df$city)` last year. 

https://rmarkdown.rstudio.com/lesson-4.html

Inline code:

The biggest sales had `r unique(df$city)` last year. 

https://rmarkdown.rstudio.com/lesson-4.html

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文