Try this also:
pmin(data.set[,1:100], data.set[,101:200])/colSums(data.set[,101:200])
On Fri, Jan 29, 2010 at 2:25 PM, Thiem Alrik wrote:
> Dear Mailing List Members,
>
> the problem I've been grappling with für quite some time now is the following:
>
> I have a 100 rows x 200 columns matrix.
On Jan 29, 2010, at 11:25 AM, Thiem Alrik wrote:
Dear Mailing List Members,
the problem I've been grappling with für quite some time now is the
following:
I have a 100 rows x 200 columns matrix.
data.set <- matrix(rnorm(2, 100, 200))
I am guessing that you wanted to type:
data.set <
Hi:
Using an inelegant loop...
df <- matrix(rnorm(2), 100, 200)
res <- numeric(100)
for (i in 1:100)
res[i] <- sum(pmin(df[, i], df[, 100 +i]))/sum(df[, 100 + i])
res
HTH,
Dennis
On Fri, Jan 29, 2010 at 8:25 AM, Thiem Alrik wrote:
> Dear Mailing List Members,
>
> the problem I've been gr
3 matches
Mail list logo