-
-
Save fboehm/a7de7dd9a31a8ee3a342 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
library(shiny) | |
shinyServer(function(input,output){ | |
output$distPlot<-reactivePlot(function(){ | |
dist<-rnorm(input$obs) | |
p<-qplot(dist,binwidth=0.1)+geom_vline(xintercept=mean(dist))+theme_dpi() | |
p<-p+coord_cartesian(xlim=c(-4,4))+geom_vline(xintercept=median(dist),color=I("red")) | |
print(p) | |
}) | |
}) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
library(shiny) | |
library(ggplot2) | |
library(eeptools) | |
shinyUI(pageWithSidebar( | |
# Title | |
headerPanel("Normality"), | |
sidebarPanel( | |
sliderInput("obs","Number of observations:", | |
min=0,max=1000,value=100) | |
), | |
# GGPLOT | |
mainPanel( | |
plotOutput("distPlot") | |
) | |
)) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment