Here is a solution.
# the data
dat <- data.frame(X = c("Program Manager", "Program Coordinator",
"Senior Manager", "Senior Associate",
"Senior Researcher"),
stringsAsFactors = FALSE)
# count words
table(unlist(strsplit(dat$X, " +")))
The result:
Associate Coordinator Manager Program Researcher Senior
1 1 2 2 1 3
With as.data.frame
the result can be converted to a data frame.
tab <- table(unlist(strsplit(dat$X, " +")))
as.data.frame(tab)
The result:
Var1 Freq
1 Associate 1
2 Coordinator 1
3 Manager 2
4 Program 2
5 Researcher 1
6 Senior 3