quick build matrix in R