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
require(MASS) | |
require(manipulate) | |
data(anscombe) | |
plotit <- function(whichpair, i){ | |
eval(parse(text = paste("sortit <- order(anscombe$x", whichpair, ")", sep = ""))) | |
eval(parse(text = paste("data.df <- data.frame(x=anscombe$x", whichpair, "[sortit], y=anscombe$y", whichpair, "[sortit])", sep = ""))) | |
ylims <- c(min(data.df$y)*0.8, max(data.df$y)*1.2) | |
xlims <- c(min(data.df$x)*0.8, max(data.df$x)*1.2) |
This file has been truncated, but you can view the full file.
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
{ | |
"metadata": { | |
"name": "Hamiltonian" | |
}, | |
"nbformat": 3, | |
"nbformat_minor": 0, | |
"worksheets": [ | |
{ | |
"cells": [ | |
{ |
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
{ | |
"metadata": { | |
"name": "Rejection Sampler Illustrated" | |
}, | |
"nbformat": 3, | |
"nbformat_minor": 0, | |
"worksheets": [ | |
{ | |
"cells": [ | |
{ |
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
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(arm) | |
options(warn=-1) | |
shinyServer(function(input, output){ | |
Data <- reactive({ | |
#N <- as.numeric(input$ns) | |
#prob <- input$prob | |
lambda <- 0 |
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
shinyServer(function(input, output) { | |
gameA <- function(p){ | |
WinLose <- sample(c(1,-1), size = 1, prob=c(p,(1-p))) | |
} | |
gameB <- function(CurrentCapital, p1, p2){ | |
WinLose <- 0 | |
if ((CurrentCapital %% 3) == 0){ |
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) | |
# Define server logic required to draw a histogram | |
shinyServer(function(input, output) { | |
Data <- reactive({ | |
# output$contents <- renderTable({ | |
# input$file1 will be NULL initially. After the user selects | |
# and uploads a file, it will be a data frame with 'name', |
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) | |
# Define server logic required to generate and plot a random distribution | |
shinyServer(function(input, output) { | |
x1 <- c(3.36, 3.24, 5.16, 6.09, 3.08, 6.97, 4.85, 5.42, 5.15, 3.61, 4.95, 2.22) | |
x2 <- c(2.72, 3.09, 1.49, 1.98, 0.85, 2.56, 2.14, 1.80, 0.57, 3.16, 0.90, 0.15) | |
x <- c(x1, x2) | |
mycol = c(rep("red", 12), rep("blue", 12)) | |
ind <- c(rep(1,12), rep(2,12)) | |
X <- matrix("numeric", 24, 1001) |
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) { | |
Data <- reactive({ | |
# output$contents <- renderTable({ | |
# input$file1 will be NULL initially. After the user selects |