rm(list=ls()) #clears memory setwd("/rstuff") #sets path a2 <- sample(1:10, 500, replace=T) #draws 500 discrete observations with values ranging from 1 to 10 #replace=T specifies sampling with replacement; replace=F is without replacement #a1 <- runif(500,1,10) would draw continuous observations from the same range write.csv(a2, file = "a1.csv")#outputs a1 to a csv file