Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

R shiny display formula

Tags:

r

formula

shiny

I want to display correctly formula in Shiny title, like in Latex:

X_n=X_{n-1}-\varepsilon_n

shinyUI(pageWithSidebar(

    headerPanel("Display formula in heading X_n=X_{n-1}-\varesilon"),

    sidebarPanel( ),

    mainPanel( )
  ))
like image 353
Marta Avatar asked May 05 '14 18:05

Marta


1 Answers

You can use withMathJax

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

  headerPanel(withMathJax("$$\\text{Display formula in heading }X_n=X_{n-1}-\\varepsilon$$")),

  sidebarPanel( ),

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

}
)

)

MathJax example

like image 62
jdharrison Avatar answered Oct 21 '22 05:10

jdharrison