expand.grid
expand.grid() function creates a data frame from all combinations of the supplied vectors or factors. subtype <- c("green","red","yellow") height <- c("3.2","2.5","6.1") sex <- c("M","F","F") expand.grid(subtype,height,sex)