On Mon, 24 Mar 2003, Nurnberg-LaZerte wrote:

> I've successfully created my own function (topbot) that takes a vector as input and 
> used it with tapply()  and an input vector (data$depth) and classification factor 
> (data$profile):
> vols <- tapply(data$depth, data$profile, topbot)
> works great.
>
> But now I want to do something similar, except my function will take a 3
> column matrix with nrows() equal to the factor's length. tapply doesn't
> like this; I suspect it converts the 3 column matrox into a vector by
> ignoring the DIM atribute.
>

Use by()


        -thomas

______________________________________________
[EMAIL PROTECTED] mailing list
https://www.stat.math.ethz.ch/mailman/listinfo/r-help

Reply via email to