$ git add --all
$ git commit -a -m "My commit message"
$ arc diff --amend-all
############################################################ | |
# Hosmer-Lemeshow test | |
############################################################ | |
hosmerlem = function(observed, predicted, g = 10) { | |
cutyhat = cut(predicted, | |
breaks = quantile(predicted, | |
probs=seq(0, 1, 1/g)), | |
include.lowest=TRUE) | |
# Construct a couple sample normal distributions | |
# and set x limits for plotting | |
x <- seq(from = 110, to = 174, by = 0.5) | |
y1 <- dnorm(x, mean = 145, sd = 9) | |
y2 <- dnorm(x, mean = 138, sd = 8) | |
# Plot outline of first distribution | |
# with titles and labels | |
plot(x, y1, type="l", lwd=2, col="red", | |
main="Systolic Blood Pressure Before and After Treatment", |
######################################## | |
######################################## | |
# | |
# Building barplots in R with | |
# error bars | |
# | |
######################################## | |
######################################## | |
######################################## |
######################################## | |
######################################## | |
# | |
# Conducting t-tests in R | |
# | |
######################################## | |
######################################## | |
######################################## | |
# One-sample t-tests |
######################################## | |
######################################## | |
# | |
# Repeated Measures ANOVAs in R | |
# | |
######################################## | |
######################################## | |
######################################## | |
# Construct a sample dataset |
server <- function(input, output, session) { | |
### | |
output$sliders <- renderUI({ | |
xv <- input$xaxisGrp | |
# First, create a list of sliders each with a different name | |
sliders <- lapply(1:length(xv), function(i) { | |
inputName <- xv[i] | |
sliderInput( | |
inputId = inputName, |
library(shiny) | |
################################################################################ | |
# | |
# GLOBALS | |
# | |
################################################################################ | |
# On application start, we'll randomly choose whether | |
# the viewer can see our super-secret Old Faithful tab |
library(data.table) | |
################################################################################ | |
# | |
# Generate some dummy data | |
# | |
################################################################################ | |
data <- data.frame( | |
policyId = "A", |
# Do some work in my home directory | |
chriss-MacBook-Pro:~ chris$ pwd | |
/Users/chris | |
chriss-MacBook-Pro:~ chris$ vim myAwesomeCode.py | |
chriss-MacBook-Pro:~ chris$ python myAwesomeCode.py | |
# Switch directories real quick | |
chriss-MacBook-Pro:~ chris$ cd /etc | |
chriss-MacBook-Pro:etc chris$ vim hosts |