The Origin Forum
File Exchange
Try Origin for Free
The Origin Forum
Home | Profile | Register | Active Topics | Members | Search | FAQ | Send File to Tech support
 All Forums
 Origin Forum for Programming
 LabTalk Forum
 find duplicates and average

Note: You must be registered in order to post a reply.
To register, click here. Registration is FREE!

Screensize:
UserName:
Password:
Anti-Spam Code:
Format Mode:
Format: BoldItalicizedUnderlineStrikethrough Align LeftCenteredAlign Right Horizontal Rule Insert HyperlinkUpload FileInsert Image Insert CodeInsert QuoteInsert List
   
Message:

* HTML is OFF
* Forum Code is ON
Smilies
Smile [:)] Big Smile [:D] Cool [8D] Blush [:I]
Tongue [:P] Evil [):] Wink [;)] Clown [:o)]
Black Eye [B)] Eight Ball [8] Frown [:(] Shy [8)]
Shocked [:0] Angry [:(!] Dead [xx(] Sleepy [|)]
Kisses [:X] Approve [^] Disapprove [V] Question [?]

 
Check here to subscribe to this topic.
   

T O P I C    R E V I E W
OndrejMM Posted - 01/15/2012 : 11:30:30 PM
Hi guys, can you please help me with the following problem, I do have a set of data where for the same "A" value I do have two different "B","C", "D" values, and I would need to indentify rows with the same value e.g. there are two rows with A=1 and then I would need to average B values, C values and D values for these two row with A=1, so I end up with only one row with A=1 and averaged B, C and D values,... any hit will help, many thanks, ondrej

A B C D
1 14.4561 -93.8697 206.776
1 -38.9017 -69.9726 -10.9376
2 13.9162 -300.141 -160.494
2 9.13727 -240.436 -57.882
3 -0.39605 -386.586 -318.499
3 -0.99545 -291.562 -226.749
4 1.02282 -245.995 -111.535
5 136.053 482.956 398.216
5 -169.691 525.74 254.695
6 86.7529 4.10239 10.0711
6 -76.1291 -0.19307 -428.4
7 -53.6981 -73.7551 -423.139
8 -0.71717 482.108 -64.2701
9 -15.2889 -220.914 -220.184
9 -12.7918 -393.708 -551.502
10 -0.66855 -171.342 -149.216
11 11.5546 -299.162 -482.592
2   L A T E S T    R E P L I E S    (Newest First)
OndrejMM Posted - 01/16/2012 : 6:52:05 PM
great! thanks a lot,... any chance there is also a smart way of merging two datasets with the same X values, however one dataset doesn't have necessary all the X values,... e.g.: dataset 2 doesn't contain X=87,88

Dataset 1:
X Y1 Y2
85 84.15 424.15842
86 101.725 286.04916
87 103.875 286.04916
88 103.875 292.0466
89 101.725 279.74985
90 103.875 279.74985
91 103.875 259.54916
92 101.725 259.54916


Dataset 2
X1 Y3 Y4 Y5
85 0.0043 5.75021 2.88632
86 -12.7545 62.9425 294.868
89 0.7576 273.28 371.89
92 -4.52414 366.2 301.627
94 -13.8054 339.679 322.991
97 -1.76736 349.957 298.373
98 -104.109 -255.563 -310.918
99 -115.444 -275.601 -234.222


couturier Posted - 01/16/2012 : 5:05:10 PM
Analysis:Data Manipulation:REduce Duplicate X Data will exactly do this.

You can set up what you need in dialog and then choose Generate Script to use it in your own script

The Origin Forum © 2020 Originlab Corporation Go To Top Of Page
Snitz Forums 2000