combine combinations of vectorsin r code example Example: R grid all possibilites between two vectors a <- c(1:10) b <- c(1:10) expand.grid(a,b)