Run »
thismatrix <- matrix(c("apple", "banana", "cherry", "orange"), nrow = 2, ncol = 2) "apple" %in% thismatrix
[1] TRUE