Warning: file_get_contents(/data/phpspider/zhask/data//catemap/4/r/77.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
R:使用Latex创建的表很乱_R_Latex_Shiny - Fatal编程技术网

R:使用Latex创建的表很乱

R:使用Latex创建的表很乱,r,latex,shiny,R,Latex,Shiny,我是新的光泽以及乳胶 我正在使用下面的脚本将一个表输出打包到Shiny中 --- 库(xtable) ui根据这一点:,MathJax不支持表格环境。您认为这是有原因的吗?可能的替代方案:根据这一点:,MathJax不支持表格环境。你认为这是有原因的吗?可能的替代方案: library(xtable) ui <- shinyUI( fluidPage( withMathJax(), titlePanel("P

我是新的光泽以及乳胶

我正在使用下面的脚本将一个表输出打包到Shiny中

---
库(xtable)
ui根据这一点:,MathJax不支持
表格
环境。您认为这是有原因的吗?可能的替代方案:根据这一点:,MathJax不支持
表格
环境。你认为这是有原因的吗?可能的替代方案:
library(xtable)

ui <- shinyUI(
        fluidPage(
                withMathJax(),
                titlePanel("Panel Title"),
                sidebarLayout(
                        sidebarPanel(
                                checkboxGroupInput("inputs", label = "Select Inputs:",
                                                   choices=c("Option A",
                                                             "Option B"),
                                                   selected="Option A")),
                        mainPanel((tabsetPanel(
                                tabPanel("Test Table",h2("Test Table Header"),uiOutput("tabletest"))))))))

server=function(input, output) {output$tabletest<-renderUI({ 
        table2=data.frame(A=c("{SubheaderA}","Item A1","Item A2","Item A3","{Subheader B}"," Item B1","Item B2","Item B3"),
                          B=c("","Value  A1","Value  A2","Value  A3","","Value  B1","Value  B2","Value  B3"))
        test=print(xtable(table2,type="latex",sanitize.text.function=identity))
        html=paste0("$$",test,"$$")
        list(tags$script(src = 'https://c328740.ssl.cf1.rackcdn.com/mathjax/2.0-latest/MathJax.js?config=TeX-AMS-MML_HTMLorMML', type = 'text/javascript'),
             HTML(html)
        )  
})
}

shinyApp(ui = ui, server = server)