需要pandoc 1.12.3或更高版本,但未找到(R闪亮)

Daniele Avancini:

我从托管在服务器上的我的应用程序闪亮生成pdf报告时遇到问题。

该应用程序运行正常,但是当我按下按钮下载报告时,出现此错误:

 pandoc version 1.12.3 or higher is required and was not found.

问题是,如果键入,pandoc -v我会得到:

 pandoc 1.12.3.3
 Compiled with texmath 0.6.6, highlighting-kate 0.5.6.1.
Syntax highlighting is supported for the following languages:
    actionscript, ada, apache, asn1, asp, awk, bash, bibtex, boo, c, changelog,
    clojure, cmake, coffee, coldfusion, commonlisp, cpp, cs, css, curry, d,
    diff, djangotemplate, doxygen, doxygenlua, dtd, eiffel, email, erlang,
    fortran, fsharp, gnuassembler, go, haskell, haxe, html, ini, java, javadoc,
    javascript, json, jsp, julia, latex, lex, literatecurry, literatehaskell,
    lua, makefile, mandoc, markdown, matlab, maxima, metafont, mips, modelines,
    modula2, modula3, monobasic, nasm, noweb, objectivec, objectivecpp, ocaml,
    octave, pascal, perl, php, pike, postscript, prolog, python, r,
    relaxngcompact, restructuredtext, rhtml, roff, ruby, rust, scala, scheme,
    sci, sed, sgml, sql, sqlmysql, sqlpostgresql, tcl, texinfo, verilog, vhdl,
    xml, xorg, xslt, xul, yacc, yaml
 Default user data directory: /home/daniele/.pandoc
 Copyright (C) 2006-2013 John MacFarlane
 Web:  http://johnmacfarlane.net/pandoc
 This is free software; see the source for copying conditions.  There is no
 warranty, not even for merchantability or fitness for a particular purpose.

所以我想我有合适的版本。TexLive也已安装,并且路径在$PATH

服务器

library(shiny)
library(drsmooth)
library(shinyBS)
library(knitr)
library(xtable)
library(rmarkdown)

shinyServer(function(input, output,session) { 

 output$downloadReport <- downloadHandler(
filename = function() {
  paste('report', sep = '.','pdf')
},

content = function(file) {
  src <- normalizePath('report.Rmd')

  # temporarily switch to the temp dir, in case you do not have write
  # permission to the current working directory
  owd <- setwd(tempdir())
  on.exit(setwd(owd))
  file.copy(src, 'report.Rmd')

  library(rmarkdown)
  out <- render('report.Rmd')
  file.rename(out, file)
})

output$tb <- renderUI({
             p(h4("Report")),
            "Dowload a the report of your analysis in a pdf format",
            tags$br(),downloadButton('downloadReport',label="Download report"),
            tags$em("This option will be available soon")
     })
})

* report.Rmd *不包含任何类型的计算,仅是文本。pdf生成可以在我的本地版本(MacOS)上正常运行,但不能在服务器上运行。

如果需要,我在这里提供其他信息。

克里斯 :

进入RStudio并找到系统环境变量 RSTUDIO_PANDOC

Sys.getenv("RSTUDIO_PANDOC")

然后在调用render命令之前将其放入R脚本中。

Sys.setenv(RSTUDIO_PANDOC="--- insert directory here ---")

在我努力寻找rmarkdown如何找到pandoc之后,这对我有用。我不得不检查github以查看源代码。

本文收集自互联网,转载请注明来源。

如有侵权,请联系 [email protected] 删除。

编辑于
0

我来说两句

0 条评论
登录 后参与评论

相关文章

未找到 Pandoc 版本 1.12.3

ODAC 12c版本1兼容性

未找到:/post/12/responses/

嗨,我需要这样的时间@“ 2014年1月12日,晚上11:45”

清单合并失败,出现多个错误 | Android 12 及更高版本需要为 `android:exported` 指定显式值

组合12个1x3矩阵

在GDB中打印(%r12,%rbx,1)

此基于范围的“ for”语句需要合适的功能,但未找到

将 pandoc 从 1.19 更新到 2.4 后,R markdown pandoc 文档转换失败,错误 1

欧拉12需要优化

Cron表达小时1/12

可以排序以1 2 3 4..9代替1 10 11 12 .. 2 20

R1C1 符号中单元格 $C$12 的地址是什么?

我需要将整数除以12,如果结果是浮点数,则在javascript中将其加1

更新到R版本3.4.2后,pandoc文档转换失败,并出现错误1

针对 Android 12 及更高版本的应用需要为“android:exported”指定一个明确的值,但我有这样的值

为了成功打开Enterprise Architect 12项目文件,我需要哪个版本的Access?

我需要帮助来制作一个Java程序,该程序需要一个1到12的数字并输出一个月

mkdocs-pandoc 类型错误:_split_row() 只需要 2 个参数(给出 3 个)

如何找到从 12 月 1 日开始的每个第二个星期二?

在 SUSE Linux ESS 12 SP3 上配置 XRDP 时需要帮助

为什么需要为 D3D12 中的每一帧创建 GBuffers?

预期 activation_1 有 3 个维度,但得到了形状为 (12 6984, 67) 的数组

Linux bash备份脚本-12,9,6,3,1个月

如何在Vue.js中显示12个条目中的1到3?

将熊猫数据框从(12,1)重塑为特定形状(3,4)

是否有一个函数可以给出输出 [1, 2, 3, 12, 23,...]?

Javascript:根据模式拆分数组:项1、5、10、2、6、11、3、7、12

(Teradata) 获取前 12 个月、3 个月和 1 个月的 SUM 值