rm(list=ls()) #clears memory setwd("/rstuff") #sets path k2<-rbinom(1000,2,.5)#100 draws from binomial with k=2 and p=q=0.5 k4<-rbinom(1000,4,.5) k8<-rbinom(1000,8,.5) k16<-rbinom(1000,16,.5) k32<-rbinom(1000,32,.5) kall<-cbind(k2,k4,k8,k16,k32)#binds 4 columns into 1 object (kall) k20<-rbinom(1000,20,.2)#100 draws from binomial with k=2 and p=0.2 k40<-rbinom(1000,40,.2) k80<-rbinom(1000,80,.2) k160<-rbinom(1000,160,.2) k320<-rbinom(1000,320,.2) k640<-rbinom(1000,640,.2) kuneqall<-cbind(k20,k40,k80,k160,k320,k640) ktot<-cbind(kall,kuneqall) write.csv(ktot, file = "ktot.csv")#writes ktot as a csv file