gpt4 book ai didi

Rmarkdown 演示幻灯片行情

转载 作者:行者123 更新时间:2023-12-04 10:34:04 27 4
gpt4 key购买 nike

我正在使用 rmarkdown 在 RStudio 中进行投影仪演示。我想在演示文稿的顶部获得幻灯片代码。德累斯顿主题应该支持那些股票 Dresden
enter image description here

那么是否有可能通过使用 rmarkdown 来获取这些代码?当我编织 pdf 时,我得到的演示文稿没有幻灯片行情。

示例代码:

---
title: "Example"
output: beamer_presentation
theme: Dresden
---

# R Markdown

This is an R Markdown presentation. Markdown is a simple formatting syntax for authoring HTML, PDF, and MS Word documents. For more details on using R Markdown see <http://rmarkdown.rstudio.com>.

When you click the **Knit** button a document will be generated that includes both content as well as the output of any embedded R code chunks within the document.

# Slide with Bullets

- Bullet 1
- Bullet 2
- Bullet 3

# Slide with R Code and Output

```{r}
summary(cars)
```

# Slide with Plot

```{r, echo=FALSE}
plot(cars)
```

最佳答案

我认为slide_level选项可能是您正在寻找的:

The slide_level option defines the heading level that defines individual slides. By default this is the highest header level in the hierarchy that is followed immediately by content, and not another header, somewhere in the document. This default can be overridden by specifying an explicit slide_level documentation source



例如使用 slide_level: 2 :
---
title: "Example"
output:
beamer_presentation:
slide_level: 2
theme: Dresden
---

为您提供以下输出

enter image description here

但是,您需要为幻灯片标题提供较低级别的标题,例如
# R Markdown

## Description
This is an R Markdown presentation. Markdown is a simple formatting
syntax for authoring HTML, PDF, and MS Word documents. For more
details on using R Markdown see <http://rmarkdown.rstudio.com>.

When you click the **Knit** button a document will be generated that
includes both content as well as the output of any embedded R code
chunks within the document.

编辑 要获得与您附加的图像相同的输出,请按以下方式分割演示文稿:
---
title: "Example"
output:
beamer_presentation:
slide_level: 3
theme: Dresden
---
# Section 1
## Subsection 1
### Title A
### Title B
## Subsection 2
### Title A
## Subsection 3
### Title A
### Title B
### Title C
# Section 2
## Subsection 1
### Title A
### Title B

并生成以下演示标题:

enter image description here

关于Rmarkdown 演示幻灯片行情,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/28625074/

27 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com