In R, I want to find out the effect of character string length on computation time of a certain operation. For this, I need random character strings of different lengths. All I can think of now is:
cases1 <- letters[sample(15)] cases2 <- paste(letters[sample(15)], letters[sample(15)], sep="") cases3 <- paste(letters[sample(15)], letters[sample(15)], letters[sample(15)], sep="") How do I automate that? I don't want to keep copypasting... Or does anyone have a better idea?