错误:Shining tableOutput在0行data.frame上出现错误
(这是报告闪亮bug的正确地点吗?) tableOutput在传递0行data.frame时出现以下错误:错误:Shining tableOutput在0行data.frame上出现错误,r,shiny,xtable,R,Shiny,Xtable,(这是报告闪亮bug的正确地点吗?) tableOutput在传递0行data.frame时出现以下错误: Warning in matrix(align.tmp[(2 - pos):(ncol(x) + 1)], nrow = nrow(x), ncol = ncol(x) + : data length exceeds size of matrix ui.R: 服务器.R: library(shiny) shinyServer(function(input, output) {
Warning in matrix(align.tmp[(2 - pos):(ncol(x) + 1)], nrow = nrow(x), ncol = ncol(x) + :
data length exceeds size of matrix
ui.R:
服务器.R:
library(shiny)
shinyServer(function(input, output) {
output$view <- renderTable({data.frame(col=character(0))})
})
这不是
闪亮
的问题,而是xtable
:
> library(xtable)
> rr <-xtable(data.frame(col=character(0)))
> print(rr, type = 'html')
<!-- html table generated in R 3.1.1 by xtable 1.7-3 package -->
<!-- Wed Sep 03 00:22:48 2014 -->
<TABLE border=1>
<TR> <TH> </TH> <TH> col </TH> </TR>
</TABLE>
Warning message:
In matrix(align.tmp[(2 - pos):(ncol(x) + 1)], nrow = nrow(x), ncol = ncol(x) + :
data length exceeds size of matrix
>库(xtable)
>rr打印(rr,类型='html')
上校
警告信息:
在矩阵(align.tmp[(2-pos):(ncol(x)+1)]中,nrow=nrow(x),ncol=ncol(x)+
数据长度超过了矩阵的大小
此外,这不是一个错误,而是一个警告。这导致我正在使用的
闪亮的应用程序出现问题。如果您尚未在RForge上提交Bug,我将在Github上打开一个问题
R version 3.1.0 (2014-04-10)
Platform: x86_64-apple-darwin13.1.0 (64-bit)
locale:
[1] C
attached base packages:
[1] stats graphics grDevices utils datasets methods base
other attached packages:
[1] shiny_0.10.1
loaded via a namespace (and not attached):
[1] RJSONIO_1.2-0.2 Rcpp_0.11.2 bitops_1.0-6 caTools_1.17
[5] digest_0.6.4 htmltools_0.2.4 httpuv_1.3.0 tools_3.1.0
[9] xtable_1.7-3
> library(xtable)
> rr <-xtable(data.frame(col=character(0)))
> print(rr, type = 'html')
<!-- html table generated in R 3.1.1 by xtable 1.7-3 package -->
<!-- Wed Sep 03 00:22:48 2014 -->
<TABLE border=1>
<TR> <TH> </TH> <TH> col </TH> </TR>
</TABLE>
Warning message:
In matrix(align.tmp[(2 - pos):(ncol(x) + 1)], nrow = nrow(x), ncol = ncol(x) + :
data length exceeds size of matrix