Hi Josh,
Here is one way:
with(x, aggregate(x[,-3], list(factor.level), mean, na.rm = TRUE))
HTH,
Jorge
On Sat, Mar 13, 2010 at 1:50 PM, Josh B <> wrote:
> Hi,
>
> I was hoping someone could help me with the following problem. Consider
> this toy example. For the input dataset there are four i
aggregate(x[,1:2], by=list(factor=x$factor.level), mean)
From: r-help-boun...@r-project.org [r-help-boun...@r-project.org] On Behalf Of
Josh B [josh...@yahoo.com]
Sent: 13 March 2010 18:50
To: R Help
Subject: [R] Indexing a matrix within loops
Hi,
I was h
2 matches
Mail list logo