which.max(apply(mat, 1, prod))
Gabor
On Wed, Jul 04, 2007 at 09:18:41AM -0700, Yemi Oyeyemi wrote:
I am new in R and I want to solve this problem;
I have a matrix X (with n-rows and p-colums) my problem is to obtain the
products of the vectors of rows and print out only the maximum value
Yemi,
Try
which.max(apply(X,1,prod))
(or possibly abs(apply(X,1,prod)) if you're only interested in unsigned product
max.
S
Yemi Oyeyemi [EMAIL PROTECTED] 04/07/2007 17:18:41
I am new in R and I want to solve this problem;
I have a matrix X (with n-rows and p-colums) my problem is to