Search Results

Search: Posts Made By: johnmillsbro
6,514
Posted By johnmillsbro
i.e for input BC111111 4 8 12 ...
i.e
for input
BC111111
4
8
12
BC555555
2
4
6

output
BC111111
-4
0
4
BC555555
-2
0
2
6,514
Posted By johnmillsbro
mean= average. The format would look like the...
mean= average. The format would look like the original attachment. But each value would have the average for that set of data substracted out of each value
BC156041
56 subtract (avg all values for...
6,514
Posted By johnmillsbro
mean= average. The format would look like the...
mean= average. The format would look like the original attachment. But each value would have the average for that set of data substracted out of each value
BC156041
56 subtract (avg all values...
6,514
Posted By johnmillsbro
thanks. that appears to work. Could you explain...
thanks. that appears to work. Could you explain the code in detail so I fully grasp that? Im not sure if I understand floating numbers? Also. Now if I wanted then to take the average for each...
6,514
Posted By johnmillsbro
here is the beginning of the file i am attempting...
here is the beginning of the file i am attempting to calculate averages from. This is just the 1st couple of entries...in total there are 25,000 BCxxxxxx entries.

thanks
6,514
Posted By johnmillsbro
even if I pre-sort them...the ID numbers are not...
even if I pre-sort them...the ID numbers are not continous. i.e. (BC100100, BC100199, etc)

-J
6,514
Posted By johnmillsbro
it gives an output for some of the IDs..but most...
it gives an output for some of the IDs..but most recieve NA..?
thanks
6,514
Posted By johnmillsbro
Thanks....that removed the error..but I still...
Thanks....that removed the error..but I still need to figure out how to get the average for each ID...
6,514
Posted By johnmillsbro
yes...I tried it...but I get a fatal error;...
yes...I tried it...but I get a fatal error; division by zero attempted.FNR=288

Line 288 happens to be the line with the ID for the second set of data in the column...
any ideas?
thanks...
6,514
Posted By johnmillsbro
Thanks Rubin..I think I left out some info...
Thanks Rubin..I think I left out some info though. Your script works great but not for my data...I think the reason is...

1.) My IDs are not linear (i.e. ID001, ID002..rather random ID005,...
6,514
Posted By johnmillsbro
averaging column values with awk
Hello. Im just starting to learn awk so hang in there with me...I have a large text file formatted as such everything is in a single column

ID001
value 1
value 2
value....n
ID002
value 1...
Showing results 1 to 11 of 11

 
All times are GMT -4. The time now is 04:44 AM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy