If possible I would like to combine two different character arrays in combinations
Array1 <- c("height","weight","age","sex") Array2 <- c("trt0","trt1","trt2") I would like to combine these two character vectors to end up with such ... Array3 "height.trt0.trt1" "height.trt0.trt2" "weight.trt0.trt1" "weight.trt0.trt2" "age.trt0.trt1" "age.trt0.trt2" "sex.trt0.trt1" "sex.trt0.trt2" I'm trying combinations of the "combinations" and "paste" functions, but no luck yet! Any suggestions about most efficient approach most welcome. Thanks Jim =============================== Dr. Jim Maas University of East Anglia [[alternative HTML version deleted]] ______________________________________________ R-help@r-project.org mailing list https://stat.ethz.ch/mailman/listinfo/r-help PLEASE do read the posting guide http://www.R-project.org/posting-guide.html and provide commented, minimal, self-contained, reproducible code.