Replace Pioneer Home   All Examples   Free Download

 New request --free  RSS: Replace Pioneer Examples

665.Text data calculation -- How to calculate the absolute average value of every 2 columns?

User: Lynne -- 2010-11-26          << 664  666 >>
Hits: 3140
Type: Text data calculation   
Search all Text data calculation examples
Description:
How to calculate the absolute value of average every 2 colunm? 
There are 500 lines and 1000 columns in one text file. 
Thank you! 
Input Sample:
Line1 45.97  45.97 37.02 37.02.. 
Line2 45.00 -45.97 40.24 40.24.. 
Line3 41.00 -45.97 38.80 40.24.. 
Line4 40.34 -45.97 37.25 40.24.. 
Line5 36.27 -45.97 36.50 40.24.. 
Line6 60.09  60.09 39.16 40.24.. 
Line7 30.30  60.09 42.56 42.56.. 
Line8 71.05  71.05 44.84 44.84.. 
Line9 32.86  71.05 47.53 47.53.. 
        .     .     .     .      
        .     .     .     .      
Output Sample:
Line1 ABS((45.97+45.97)/2) ABS(37.02+37.02)/2)..   
Line2                                              
Line3                                              
Line4                                              
Line5 ABS((36.27-45.97)/2) ABS((36.50+40.24)/2)..  
Line6                                              
Line7                                              
Line8                                              
Line9                                              
Answer:
Hint: You need to Download and install "Replace Pioneer" on windows platform to finish following steps.
1. ctrl-o open source text file 
2. ctrl-h open 'replace' window 
* set 'replace unit' to 'Chars' 
* set 'replace scope' to 'Line' 
* set 'search for pattern' to: 
 
* set 'replace with pattern' to: 
 
3. click 'Replace', done!

Screenshot 1:  Replace_Window


Similar Examples:
How to calculate sum value of every column? (79%)
How to calculate the average of numbers of one column? (72%)
How to calculate one column base on value of another column? (69%)
How to calculate the average of the numbers in the same column? (69%)
How to calculate the percentage of the number in the column1? (67%)
How to calculate summary of every column in a text file? (59%)
How to calculate sum of every column and keep original columns? (58%)
How to calculate the sum of the numbers in the same column? (57%)

Check Demo of Text data calculation
Keywords:
absolute average value  abs  average  500  rage  toc  calculate  calculation  calcu  calculat  calculate average  calculate lines  search calculate replace  search replace calculate  text to columns open source  calculate text data  text columns  text to columns