I have a 25x25 matrix which consists of random letters and i want to count the number of vowels in each column. I managed to do it by
count <- function(x) {
return(sum(x %in% c("a","e","i","o","u")))}
and write the function in apply(). Is there another way of doing this without using loops or %in% ?