[R] Finding all rows of a matrix equal to vector
d.kazakiewicz at gmail.com
Sat Jul 16 11:58:39 CEST 2011
a bit ugly approach
but it works
B <- apply(A,1, FUN = function(x)paste(x, collapse = ''))
On 16.07.2011 12:29, Sebastian Lerch wrote:
> Hi everyone,
> my question might be very trivial, but I could not come up with an
> I want to find out how often a matrix contains a certain vector as row:
> How can I find out, how many times x1 is a row of A?
> Thanks in advance and best regards,
> R-help at r-project.org mailing list
> PLEASE do read the posting guide
> and provide commented, minimal, self-contained, reproducible code.
More information about the R-help