Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
我用 stringdistmatrix(c() 打印了一个矩阵。效果很好,但现在我需要 R 向我展示所有值 <=3 的情况。如何在矩阵中搜索这些值?
提前致谢!
将输出定义为矩阵和索引?
d <- as.matrix(stringdistmatrix(c('foo','bar','boo','baz'))) d[d<=3]