Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
我正在尝试使用 R markdown 创建一个 Flex 仪表板。一旦我开始执行代码,我会看到下面列出的许多错误:
YAML 标头之后的代码执行没有问题,并且由于上述错误,我无法将弹性仪表板作为输出。
如何解决这个错误?
您的错误是,您想在 R 脚本中执行 YAML 标头。当您使用 RStudio 时,请转到“文件”->“新文件”->“R Markdown”并输入 YAML 标头和您的代码。CTRL+Shift+K然后,您可以通过 . 或在控制台中渲染您的 RMD 文件rmarkdown::render("<path-to-your-file>")。
CTRL+Shift+K
rmarkdown::render("<path-to-your-file>")
如果您不使用 RStudio,请将脚本保存为 Rmd 文件 ( *.Rmd) 文件并通过控制台进行渲染。
*.Rmd
我认为这将解决您的问题。