Thank you!
Sigalit.

On 11/1/07, Tobias Verbeke <tobias.verbeke@telenet.be> wrote:
>
> sigalit mangut-leiba wrote:
>
> > I want to compute the average of 6 variables,
> > my data looks like this:
> >
> >     t0    t1   t2    t3   t4   t5
> > 1  32   34  36   40   38  40
> > 2  35   37  38   36   33  39
> > .
> > .
> > .
> > I want the mean of t0-t5 for each row (observation).
>
> If your data are available in a matrix mymat,
> you can use
>
> apply(mymat, 1, mean) # see ?apply
>
> or (more efficient)
>
> rowMeans(mymat)
>
> HTH,
> Tobias
>
>
> > thank you,
> > sigalit.
> >
> >       [[alternative HTML version deleted]]
> >
> > ______________________________________________
> > R-help@r-project.org mailing list
> > https://stat.ethz.ch/mailman/listinfo/r-help
> > PLEASE do read the posting guide
> http://www.R-project.org/posting-guide.html
> > and provide commented, minimal, self-contained, reproducible code.
> >
> >
>
>

	[[alternative HTML version deleted]]

