Search Results

Search: Posts Made By: PMFCG
2,437
Posted By PMFCG
Ok, so I tried this awk ' {arr[$1]...
Ok, so I tried this
awk '
{arr[$1] += $3
count[$1] ++
}
END {for (a in arr) {print "id avg “ a " = " arr[a] / count[a]
}
}
'...
2,437
Posted By PMFCG
The first two column values are lat/long values....
The first two column values are lat/long values. They are for specific locations, so considering the first column as an id is fine, I think.

I am using UNIX on a mac (not sure if that's what you...
2,437
Posted By PMFCG
How to average the third column for each value of the first column?
So I have a large amount of comma delimited data that looks like this:

30.498001,-87.881412,0.024958
30.498001,-87.881412,0.035684
30.498001,-87.881412,,0.026
34.758781,-87.650562,0.034292...
Showing results 1 to 3 of 3

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