我从我的应用程序闪亮生成pdf报告时遇到问题,该报告托管在服务器上.
该应用程序工作正常,但当我按下按钮下载报告时,我收到此错误:
pandoc version 1.12.3 or higher is required and was not found.
Run Code Online (Sandbox Code Playgroud)
问题是,如果我输入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, …Run Code Online (Sandbox Code Playgroud) 我构建了一个闪亮的应用程序,它采用用户上传的CSV文件并添加标题和几个新列,以便之后进行一些计算.
上传的CSV文件包含2列,如下所示:
1 0.21
1 0.20
1 0.23
2 0.40
2 0.42
2 ...
Run Code Online (Sandbox Code Playgroud)
要上传文件我使用此代码(正在运行):
data1<- reactive({
inFile <- input$file1
if(is.null(inFile)){return()}
data1<- read.csv(file=inFile$datapath,header =input$header,sep=input$sep)
})
Run Code Online (Sandbox Code Playgroud)
下一步是将标题添加到这两列,并以这种方式添加另外两列:
Dose Response SquareRoot Log
1 0.21 sq(Response) log(Response)
1 0.20 ... ...
1 0.23 ... ...
2 0.40 ... ...
2 0.42 ... ...
2 ...
Run Code Online (Sandbox Code Playgroud)
在R会话中,我将使用的代码是:
data1<- read.csv(file=inFile$datapath,header =input$header,sep=input$sep)
colnames(data1) <-c("Dose","Response")
data1$ResponseLog <- log10(data1$Response + 1)
data1$ResponseSqRoot <- sqrt(data1$Response + 1)
Run Code Online (Sandbox Code Playgroud)
如果我这样做有光泽地将这些行添加到我的Rshiny应用程序中它将无法工作并给我错误:
错误:长度为0的参数,即使我只是使用定义列名称colnames().
所以我的问题是,有没有办法编辑我刚上传的数据帧?我已经问过这个问题你能不能重定向我,因为我找不到解决方案.我希望我能给你足够的细节来理解这个问题.