matrix_c selects all elements of the first row.I hope you find this helpful and not more confusing, but here's one way to get to your end goal of populating the checkerboard structs.matrix_c selects all elements of the first column.matrix_c results in a R slice matrix with the data on the rows 1, 2, 3 and columns 2, 3,.
Following is a function to create a matrix in R which takes three arguments: matrix(data, nrow, ncol, byrow = FALSE) We can create a matrix with the function matrix(). Note: It is possible to create more than two dimensions arrays with matrix function in R. In other words, matrix in R programming is a combination of two or more vectors with the same data type. A matrix function in R is a 2-dimensional array that has m number of rows and n number of columns.