Q: At the begining of Chapter 11 social network analysis, the
produced the error '[<-. simple_sparse_array´(as.simple_sparse_array(x),…, value= value): Only numeric subscripting is implemented.A: The "termDocMatrix" is a normal matrix, not a term-document matrix created with package tm. Sorry for the misleading statement at the beginning for section 11.1 saying that "termDocMatrix" is "a term-document matrix".
Referring to section 10.7, "myTdm2" is a term-document matrix, and then it is converted into a normal matrix "m2" with as.matrix(). "termDocMatrix" is a copy of "m2", which is used as input in section 11.1 for social network analysis.
Therefore, to use your own data of class term-document matrix, you need to convert it with as.matrix() first, before running code for social network analysis in chapter 11.