| To: | s-news@lists.biostat.wustl.edu |
|---|---|
| Subject: | Calculation done on rows for select columns |
| From: | "Overstreet, Jason (FL51)" <Jason.Overstreet@honeywell.com> |
| Date: | Mon, 23 Jan 2006 10:56:18 -0700 |
|
I have a data frame as shown below called xy: > xy x.1 x.2 x.3 y.1 y.2 y.3 1 1 5 9 2 10 18 2 2 6 10 4 12 20 3 3 7 11 6 14 22 4 4 8 12 8 16 24 > I was wondering what would be an easy way to have the mean and variance calculated and stored as follows: > xy x.1 x.2 x.3 mean.x var.x y.1 y.2 y.3 mean.y var.y 1 1 5 9 5 16 2 10 18 10 64 2 2 6 10 6 16 4 12 20 12 64 3 3 7 11 7 16 6 14 22 14 64 4 4 8 12 8 16 8 16 24 16 64 > Statistician Honeywell DSES (727) 539-3964 |
| <Prev in Thread] | Current Thread | [Next in Thread> |
|---|---|---|
| ||
| Previous by Date: | Re: "cumsum" for matrices, Patrick Burns |
|---|---|
| Next by Date: | Re: Calculation done on rows for select columns, Tim Hesterberg |
| Previous by Thread: | "cumsum" for matrices, Schwarz,Paul |
| Next by Thread: | Re: Calculation done on rows for select columns, Tim Hesterberg |
| Indexes: | [Date] [Thread] [Top] [All Lists] |