阅读背景:

检查矩阵行是否等于R中的向量,进行向量化

来源:互联网 

I'm very surprised this question has not been asked, maybe the answer will clear up why. I want to compare rows of a matrix to a vector and return whether the row == the vector everywhere. See the example below. I want a vectorized solution, no apply functions because the matrix is too large for slow looping. Suppose there are many rows as well, so I would like to avoid repping the vector.I'm very surprised this question has not been a




你的当前访问异常,请进行认证后继续阅读剩余内容。

分享到: