为了能够调整用DiagrammeR包(这里已经解释过:https://github.com/rich-iannone/DiagrammeR/issues/93)生成的图形输出的大小,我需要将grVizOutput封装在服务器中的renderUI中,并在ui中通过uiOutput调用它。 这段代码一直向我返回以下错误: Error in as.vector: cannot coerce type 'closure' to vector of type 'character' 注意:直接在UI中调用grVizOutput是可行的,但是不要让我动态地调整图表的大小。
我在使用指定为输出的pdf的R包DiagrammeR时遇到了相当多的问题。我成功地显示了图表,但是正如您将在下面介绍的那样,图周围有相当大的空间。
下面看看我的示例代码:
---
title: "Untitled"
author: "test"
date: "14/05/2020"
output: pdf_document
---
# My Markdown-file
This is my RMarkdown-file. Now I want to add a flowchart using the packages DiagrammeR.
我想要添加一个流程图(图)到我正在创建的Rmarkdown文档中。流程图需要包括由某些R码计算的数字。
我已经安装了DiagrammeR和nomnoml软件包,因为它们看起来都可以完成我想要的任务。但是,试图编织.Rmd文档会返回一个错误:
Error: Functions that produce HTML output found in document targeting docx output.
Please change the output type of this document to HTML. Alternatively, you can allow
HTML output