which()
match(a, b)
dim(num1) <- c(4, 5)
attributes(num1)
## $dim ## [1] 4 5
num1
## [,1] [,2] [,3] [,4] [,5] ## [1,] 1 5 9 13 17 ## [2,] 2 6 10 14 18 ## [3,] 3 7 11 15 19 ## [4,] 4 8 12 16 20
class(num1)
## [1] "matrix" "array"
my_matrix <- num1