Be sure to post your question as a
reprex (FAQ: What's a reproducible example (`reprex`) and how do I do one?).
When you do, you'll note the code were you setup the matrix produces an error message:
#> Error: <text>:5:5: unexpected symbol
#> 4: c(word1,word2,word3,word4,word5,word6)
#> 5: nrow
Created on 2018-04-23 by the reprex package (v0.2.0).
- Note the double commas after
nrow=2, there should be only one there. and one comma after
- Also character-strings in R need to be surrounded by quotation marks. So your vector should be something like
c("word1","word2","word3","word4","word5","word6"), unless you assigned a string to