File: notes_and_code.R

package info (click to toggle)
r-cran-shinystan 2.6.0-1
  • links: PTS, VCS
  • area: main
  • in suites: bookworm, forky, sid, trixie
  • size: 3,172 kB
  • sloc: sh: 15; makefile: 7
file content (26 lines) | stat: -rw-r--r-- 863 bytes parent folder | download | duplicates (2)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
# output$hamiltonian_gif <- renderImage({
#   list(src="www/ham-sim-stepsize-ok.gif")
# }, deleteFile = FALSE)

output$user_text_saved <- renderText({
  if (input$save_user_model_info > 0) {
    paste("Saved", format(Sys.time(), "%a %b %d %Y %X"))
  }
})
output$user_code_saved <- renderText({
  if (input$save_user_model_code > 0) {
    paste("Saved", format(Sys.time(), "%a %b %d %Y %X"))
  }
})
observeEvent(input$save_user_model_info, handlerExpr = {
  model_info <- input$user_model_info
  if (model_info == "")
    model_info <- "Use this space to store notes about your model"
  slot(object, "user_model_info") <<- model_info
})
observeEvent(input$save_user_model_code, handlerExpr = {
  model_code <- input$user_model_code
  if (model_code == "")
    model_code <- "Use this space to store your model code" 
  slot(object, "model_code") <<- model_code
})