I have the following vector:
vector1 <- c("Frank frank", "Frank", "Fred", "frank")
I wish to determine how many times the word 'Frank' or 'frank' appear in the vector. I want to count individual occurrences and keep track of how many times this pattern appears in each character string within the vector.
The result should look like this:
2 1 0 1
Thanks!