Skip to content

Search values and create a new matrix

2 messages · Jose Narillos de Santos, David Winsemius

#
On Nov 4, 2009, at 4:45 PM, Jose Narillos de Santos wrote:

            
> apply(Z, 1, function(x) R[x[1]+1, which(R[1, ]==x[2]) ] )
[1] 3 5 2
David Winsemius, MD
Heritage Laboratories
West Hartford, CT