Search
 
SCRIPT & CODE EXAMPLE
 

R

Hello Shiny Server Logic

# Define server logic required to draw a histogram ----
server <- function(input, output) {

  # Histogram of the Old Faithful Geyser Data ----
  # with requested number of bins
  # This expression that generates a histogram is wrapped in a call
  # to renderPlot to indicate that:
  #
  # 1. It is "reactive" and therefore should be automatically
  #    re-executed when inputs (input$bins) change
  # 2. Its output type is a plot
  output$distPlot <- renderPlot({

    x    <- faithful$waiting
    bins <- seq(min(x), max(x), length.out = input$bins + 1)

    hist(x, breaks = bins, col = "#75AADB", border = "white",
         xlab = "Waiting time to next eruption (in mins)",
         main = "Histogram of waiting times")

    })

}
Comment

PREVIOUS NEXT
Code Example
R :: extract hyperlinks in r 
R :: rename variable in r dplyr 
R :: Score pairs of records probabilistically in r 
R :: r yardstick confusion matrix 
R :: not displaying prints and on.exit in r 
R :: r predict type 
R :: r: network randomization test igprah stakoverflow 
R :: logistic inverse CDF in r 
R :: Edit axis labels R 
R :: change order of levels, reference 
R :: Extract the text of all list elements in r from html 
R :: ggplot2 color gradient 
R :: change font color in geom_text in ggplot2 in R 
R :: mean of a row dataframe in r 
Rust :: rust dictionary 
Rust :: rust value of pi 
Rust :: assert rust 
Rust :: rust string from bytes 
Rust :: find last element of vec rust 
Rust :: find smallest number in vec rust 
Rust :: rust initialize empty array 
Rust :: rust from floating point to money 
Rust :: armanriazi•rust•error•E0308•mismatched types expected type parameter ``, found associated type 
Rust :: armanriazi•rust•dereferencing 
Rust :: rust•armanriazi•let•const 
Rust :: primitive data types in rust 
Lua :: roblox how to get random object from a table 
Lua :: roblox index and newindex 
Lua :: roblox studio lua for loop 
Lua :: remove from table lua 
ADD CONTENT
Topic
Content
Source link
Name
8+5 =