shinyAce — the Ace Editor in R / Shiny

A code editor with syntax highlighting, themes, autocompletion, and a live R parse-status feedback loop. CRAN package shinyAce 0.4.4.

Live editor

Switch language mode + theme, change font size, watch the parse status update on every keystroke when the mode is R.


              
            
What it's good for

Anywhere a textarea isn't enough.

📝
User-supplied code

Take R from users with autocompletion, syntax checking, and a real keymap (vim, emacs).

🎨
30+ language modes

R, Python, SQL, YAML, JSON, Markdown, JavaScript, HTML, CSS, and more — all in one editor.

📊
Reactive feedback

Parse status, diff highlighting, and updateAceEditor() let the editor react to other inputs.

Drop it in

Three lines for the editor, one for the value.

                library(shiny)
library(shinyAce)

ui <- fluidPage(
  aceEditor('code', value = 'mean(1:10)', mode = 'r', theme = 'github'),
  verbatimTextOutput('result')
)

server <- function(input, output, session) {
  output$result <- renderPrint(eval(parse(text = input$code)))
}