Skip to content

Instantly share code, notes, and snippets.

@mrxiaohe
mrxiaohe / aov.mcp.R
Last active December 15, 2015 05:29
aov.mcp<-function(model, pairs=FALSE, method=c("Bonferroni", "Holm", "none", "Tukey",
"Hochberg", "BH", "BY", "fdr"), condition=NULL, pooled.sd=TRUE,
var.equal=FALSE){
r<-paired<-if(sum(names(model)=="(Intercept)")!=0) TRUE else FALSE
if(length(method)>1){
method<-"bonferroni"
} else {
method<-tolower(method)
if(r){
if(!(method %in% c("bonferroni", "holm", "none")))
library(shiny)
cnorm <- function(n){
val <- rnorm(n)
uval <- runif(n)
flag <- (uval <= 1 - 0.1)
val[!flag] <- 10 * val[!flag]
val
}
shinyServer(function(input, output){
data <- reactive(function(){