| To: | s-news@lists.biostat.wustl.edu |
|---|---|
| Subject: | Data Manipulation |
| From: | "Overstreet, Jason (FL51)" <Jason.Overstreet@honeywell.com> |
| Date: | Tue, 10 Jan 2006 08:35:44 -0700 |
|
One day, I will be answering questions on this list instead of asking. In the mean time, I have another data manipulation question. Below is an example of data having a variable of interest (V1) with duplicate entries for V2 and V3. I would like to have the mean value of the V1 values assigned to a single line for the V2 and V3. Current state of data: V1 V2 V3 30 a 1 32 NA 1 31 NA 1 28 a 1 2 b 2 3 b NA 1 b 2 4 b 2 2 b 2 10 c 3 12 c 3 11 c NA 13 c 3 12 c 3 45 d 4 44 d 4 52 e NA Desired result: V1 V2 V3 30.25 a 1 2.40 b 2 11.60 c 3 44.50 d 4 52 e NA Basically I have repeated measurements of varying sample size for a variable of interest (V1) which I want to take the mean. I want to assign it to a single row with a combination of the other variables. Oh, one more important thing - I have well over a hundred variables that are of type date, factor, integer and double. I just wanted a simple example for the posting. Many thanks in advance for any help.
Statistician Honeywell DSES (727) 539-3964 |
| <Prev in Thread] | Current Thread | [Next in Thread> |
|---|---|---|
| ||
| Previous by Date: | Re: Customize ticks and label of x-axis, Naomi B. Robbins |
|---|---|
| Next by Date: | Re: Data Manipulation, Overstreet, Jason (FL51) |
| Previous by Thread: | working directory, Erin Hodgess |
| Next by Thread: | Re: Data Manipulation, Overstreet, Jason (FL51) |
| Indexes: | [Date] [Thread] [Top] [All Lists] |