rm(list=ls()) #clears memory setwd("/rstuff") #sets path x <- 1:5000 #number of iterations for "for" f10 <- NULL #creates a null set f20 <- NULL f40 <- NULL for(i in seq(along=x)) #loops x times {f10<-c(f10,var(rnorm(10, mean=10, sd=2))/var(rnorm(10, mean=10, sd=2)))} for(i in seq(along=x)) #loops x times {f20<-c(f20,var(rnorm(20, mean=10, sd=2))/var(rnorm(20, mean=10, sd=2)))} for(i in seq(along=x)) #loops x times {f40<-c(f40,var(rnorm(40, mean=10, sd=2))/var(rnorm(40, mean=10, sd=2)))} fall <- cbind(f10,f20,f40) write.csv(fall, file = "fall.csv")