2016-05-30 3 views
0

シャイニーはwithMathJax()関数を提供し、UIに式を表示します。shiny UI:radioButton内の `withMathJax()`とcheckboxGroupInput

チェックボックスやラジオボタンのオプションをいくつか表示したいのですが、うまく動作しません。 corresponding RStudio shiny gallery exampleに触発

最小限の例

require(shiny) 
runApp(
    list(ui = pageWithSidebar(

    headerPanel(withMathJax("$$\\text{Here it works }X_n=X_{n-1}-\\varepsilon$$")), 

    sidebarPanel(radioButtons("test", withMathJax("$$\\text{Here it works too }X_n=X_{n-1}$$"), 
           choices = c(paste(withMathJax("$$\\text{Here it doesn`t work }X_n=X_{n-1}$$"), "= test"), 
              "Rohe Skalierung"  = "raw", 
              "Ueber alle Werte"  = "std", 
              "Innerhalb der Personen" = "gstd"))), 

    mainPanel() 
), 
    server= function(input, output, session){ 

    } 
) 
) 

答えて

0

試行錯誤は、次のソリューションに私をリード:

require(shiny) 
runApp(
    list(ui = pageWithSidebar(

    headerPanel(withMathJax("$$\\text{Here it works }X_n=X_{n-1}-\\varepsilon$$")), 

    sidebarPanel(withMathJax(), radioButtons("test", "\\(X_n=X_{n-1}\\)", 
           choices = c("\\(X_n= \\text{And Here it works to }X_{n-1}\\)"  = "test", 
              "Rohe Skalierung"   = "raw", 
              "Ueber alle Werte"  = "std", 
              "Innerhalb der Personen" = "gstd"))), 

    mainPanel() 
), 
    server= function(input, output, session){ 

    } 
) 
)