I have randomly generated a submatrix “train” from “mat” using the following:
train <- mat[sample(nrow(mat), size = 317, replace = FALSE),]
My question is, how do I then create “test” as a submatrix of “mat” which excludes the matrix “train”?
Thanks!