Try this:
t(rowsum(t(Mat), substr(colnames(Mat), 1, 1)))
On Wed, May 21, 2008 at 2:22 PM, Gregory Gentlemen <
[EMAIL PROTECTED]> wrote:
> I am looking for an efficient way to solve the following problem. I have a
> large matrix of continuous values with a small proportion of missing values.
> Co
Hi Gregory,
Try this:
cs=substr(colnames(Mat),1,1)
res=t(apply(t(Mat),2,tapply,cs,sum,na.rm=TRUE))
dim(res)
[1] 50 5
HTH,
Jorge
On Wed, May 21, 2008 at 1:22 PM, Gregory Gentlemen <
[EMAIL PROTECTED]> wrote:
> I am looking for an efficient way to solve the following problem. I have a
> large
I am looking for an efficient way to solve the following problem. I have a
large matrix of continuous values with a small proportion of missing values.
Columns correspond to variables where each variable has two measurements, call
them A and B. The matrix is such that the columns are in sequence
3 matches
Mail list logo