RStudio 针织按钮未显示选项 [英] RStudio knit button is not showing options

查看:56
本文介绍了RStudio 针织按钮未显示选项的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我在 RStudio 中遇到了 Knit 按钮的问题.

I have run into issues with my Knit button in RStudio.

缺少 Knit to HTML、Knit to PDF 等所有选项.

It is missing all the options of Knit to HTML, Knit to PDF etc.

我曾经有这些选择.即使重新启动我的 Mac 几次后,我也没有它们.

I used to have these options. Even after restarting my Mac a few times, I don't have them.

推荐答案

您是否尝试过这里的建议,这些建议似乎是相同的问题:

Have you tried the suggestions here which appears to be the same question/problem:

Rstudio knit to PDF

描述导致您看到的行为的几个不同问题以及这些问题的解决方案.

Describes a few different issues resulting in the behaviour you have seen and solutions to these.

主要建议是:

a) 您没有运行 R 3.0(这是 RMarkdown v2 所必需的);或

a) You are not running R 3.0 (which is required for RMarkdown v2); or

b) 您定义了一个自定义降价渲染器(markdownToHTML 选项).您可以通过执行来检查这一点:

b) You have a custom markdown renderer defined (markdownToHTML option). You can check for this by executing:

getOption("rstudio.markdownToHTML")

一些用户发现以下操作也解决了该问题:将以下代码添加到 .Rmd 文件的头部.

Some users have found that the following action also fixes the issue: Add the following code to the head of an .Rmd file.

---
title: "Sample Document"
output: pdf_document
---

这似乎解决了问题.希望其中一种解决方案适合您.

That appeared to solve the problem. Hopefully one of these solutions works for you.

这篇关于RStudio 针织按钮未显示选项的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆