which()
match(a, b)
alt <- cbind(patients, my_matrix) alt
## patients ## [1,] "Bill" "1" "5" "9" "13" "17" ## [2,] "Gina" "2" "6" "10" "14" "18" ## [3,] "Kelly" "3" "7" "11" "15" "19" ## [4,] "Sean" "4" "8" "12" "16" "20"