inst/apps/shockabsorber_probabilities/ui.R

ui = fluidPage(theme = SMRD::add_theme(getShinyOption("theme")), 
               SMRD::add_css(),
               
sidebarLayout(
  sidebarPanel(width = 4,
    shinyAce::aceEditor(fontSize = 16, 
                        wordWrap = T,
                        outputId = "shockprob", 
                        mode = "r", 
                        theme = "github", 
                        height = "450px", 
                        value = "
par(family = 'serif', mfrow = c(1,2), las = 1, cex = 1.25)

library(SMRD)

ShockAbsorber.ld <- 
frame.to.ld(SMRD::shockabsorber,
            response.column = 1, 
            censor.column = 3,
            time.units = 'Kilometers')

simple.contour(ShockAbsorber.ld, 
               distribution = 'weibull', 
               the.quantile = 0.1, 
               size = 300, 
               factor = 2.25, 
               rel.or.conf = 'Relative likelihood',
               original.par = F)

simple.contour(ShockAbsorber.ld, 
               distribution = 'weibull', 
               the.quantile = 0.1, 
               profile = 'x', 
               size = 300)

par(mfrow = c(1,1))"),
             
        actionButton("shockprobs", "Evaluate",width = '100%')),
        
        mainPanel(plotOutput("sprob"), width = 8)))
Auburngrads/SMRD documentation built on Sept. 14, 2020, 2:21 a.m.