【问题标题】:How do I Render R-Presentation (ioslide) Like this on RStudio?如何在 RStudio 上像这样渲染 R-Presentation (ioslide)?
【发布时间】:2021-04-14 07:57:45
【问题描述】:

告诉我如何像这样渲染R-Presentation。在阅读以了解如何制作 R-Presentation 时,我看到了许多示例,但每次我在 RStudio 上像正常的 R code 一样运行它们时,它们都拒绝渲染,尽管如果我 ctr + v 它只显示封面页。像这样我的MWE,我知道这不是一张幻灯片演示,但我得到的只是

---
title: "Habits"
author: John Doe
date: March 22, 2005
output: ioslides_presentation
---

# In the morning

## Getting up

- Turn off alarm
- Get out of bed

## Breakfast

- Eat eggs
- Drink coffee

# In the evening

## Dinner

- Eat spaghetti
- Drink wine

---

```{r, cars, fig.cap="A scatterplot.", echo=FALSE}
plot(cars)
```

## Going to sleep

- Get in bed
- Count sheep

请告诉我keyboard shortcut 以在RStudio 上呈现R-Presentationbottom 以在RStudio 本身上呈现click

【问题讨论】:

  • 这行得通吗:Ctrl + Shift + K?
  • 我使用Ctrl + Shift + K 得到的输出与i.stack.imgur.com/9il5r.png 相同,其他幻灯片在哪里?
  • 尝试将您的.Rpres 文件修改为.Rmd。然后你可以试着编织它

标签: r r-markdown ioslides


【解决方案1】:

这需要.Rpres 文件类型 NOT .Rmd(Rmarkdown)。

  1. 在 Rstudio 中打开一个新的文本文件

  2. 另存为file.Rpres

  3. 使用适当的语法让 RStudio 知道如何呈现您的演示文稿

    In the morning
    =====================
    Exercise
    
    Breakfast
    =====================
    - Cereal
    

当您使用代码保存文件时,Rstudio 将在通常的knit 按钮所在的位置有一个preview 按钮。当您点击preview时,Rstudio 将正确呈现文件。

我使用this link 进行研究

【讨论】:

    猜你喜欢
    • 2018-12-23
    • 2015-05-05
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 2013-11-09
    相关资源
    最近更新 更多