This file contains 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
# Script to demonstrate distributions | |
library(VGAM) | |
library(eeptools) | |
library(shiny) | |
library(ggplot2) | |
shinyServer(function(input,output){ |
This file contains 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
# server.R | |
library("shiny") | |
library("ggplot2") # Grammar of Graphics for plots | |
library("VGAM") # Vector Generalized Linear and Additive Models | |
library("eeptools") # Convenience functions for education data | |
shinyServer( | |
function(input,output){ |
This file contains 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
# server.R | |
library("shiny") | |
library("ggplot2") # Grammar of Graphics for plots | |
library("eeptools") # Convenience functions for education data | |
# static function | |
rnormcor <- function(x,rho) {rnorm(1,rho*x,sqrt(1-rho^2))} | |
shinyServer( |
This file contains 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
# server.R | |
library("shiny") | |
library("ggplot2") # Grammar of Graphics for plots | |
library("eeptools") # Convenience functions for education data | |
library("plyr") # Convenience functions to manipulate data | |
shinyServer( | |
function(input,output){ | |
This file contains 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
# global.R | |
c1 <- c("16681","16892","18586","18921","18923","19731","19775","20275","20965","22873") | |
c2 <- c("20267","24093","24095","25386","25359","25388","25396","25397") |
This file contains 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
# server.R | |
library("shiny") | |
library("datasets") | |
library("ggplot2") | |
tg <- ToothGrowth | |
tg$dose <- factor(tg$dose) | |
shinyServer(function(input, output) { |
This file contains 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, session) { | |
output$text_n <- renderText({ | |
paste0("input$n = ",input$n) | |
}) | |
output$text_k <- renderText({ |
This file contains 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
# global.R | |
# Author: Patrick Toche, first version 12 January 2014 | |
# I am very grateful for generous help received on stackoverflow and on the shiny-discuss forum | |
# Please fix, improve, fork, share, whatever... | |
# gArg = default arguments | |
# gFun = default function | |
# Static Parameters |
This file contains 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
# server.R | |
library("shiny") | |
library("shinyIncubator") | |
shinyServer( | |
function(input, output) { | |
# table of outputs | |
output$table <- renderTable({ | |
res <- matrix(apply(input$data,1,prod)) |
This file contains 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
# global.R | |
# customize display settings here | |
gTags <- function() { | |
tags$head( | |
tags$style( | |
type = 'text/css' | |
, "body {font-size: 80%; color: rgb(0,0,100);}" | |
, "#mainPanelId {min-width: 50%; max-width: 70%; float: right;}" | |
, "#sidebarPanelId {min-width: 10%; max-width: 20%; float: left;}" |
OlderNewer