ng<-9
ns<-1000
dataset<-matrix(0,ns,ng)
averages<-runif(ng)
variances<-runif(ng)
for(i in 1:ng){
dataset[,i]<-rnorm(ns,mean=averages[i],sd=sqrt(variances[i]))
}
summary(dataset)
rownames<-c()
for(i in 1:ng){
rownames[i]<-paste("",i,sep="")
}
datasetf<-as.data.frame(dataset,row.names=rownames)
boxplot(datasetf)
matplot(apply(datasetf,2,sort),type="l")
datasetf2<-data.frame(group=rep(rownames,ns),val=c(dataset))
summary(aov(val~group,data=datasetf2))
for(i in 1:(ng-1)){
for(j in (i+1):ng){
print(t.test(dataset[,i],dataset[,j]))
}
}