I would like to take a few string vectors and have the frequency of the words found in the vectors as a data frame. The column names of the dataframe should be the unique words found in all of the strings combined. I have this part, it is the frequency of these words being added to the data frame that is getting me. This is a very scaled down version of what I am attempting. I have tried using table(), but I am not sure I am on the right direction.
a <- c('A', 'B', 'C', 'D', 'E')
b <- c('A', 'D', 'J', 'G', 'X')
c <- c('A', 'A', 'B', 'B', 'C', 'X')
Example Data.Frame Design
vector.name A B C D E J G X
a 1 1 1 1 1 0 0 0
b 1 0 0 1 0 1 1 1
c 2 2 1 0 0 0 0 1
sum(grepl("A", c))
– Matt