Reputation: 921
I have a matrix named song with a row for each word occurring in five songs lyrics and a column of counts for each song. I would like to create an index giving which rows of the matrix correspond to a word in x
x = c("is", "the", "I", "you")
I did
song[is.element(song, x),]
but this gives me another matrix which the value is true.
Upvotes: 0
Views: 51