I have no idea how to even get started with this script.
I need to average field 3 for each of the unique identifiers found in field 1. However, I only want to average these rows when field 2 is equal to 1506 - 2000 (note that i replaced the values field 2 for security reasons, but the real data are sequential).
I need the results appended to each respective row.
Hi All
I like to know how can we calculate the number of rows and the average of the values present in the file. I will not know what will be the rowcount, which will be dynamic in nature of the file.
eg.
29
33
48
30
28 (6 Replies)
Hi friends
I have 100 files in my directory. Each file look like this..
Temp1 Temp2 Temp3
MAS 1 2 3
MAS 4 5 6
MAS 7 8 9
Delhi 10 11 12
Delhi 13 14 15
Delhi 16 17 ... (4 Replies)
Hi Friends,
In continuation to my earlier post
https://www.unix.com/shell-programming-scripting/99166-script-find-average-given-column-also-specified-number-rows.html
I am extending my problem as follows.
Input:
Column1 Column2
MAS 1
MAS 4 ... (2 Replies)
Dear users,
I need your support, I have a file like this:
272134.548 6680572.715
272134.545 6680572.711
272134.546 6680572.713
272134.548 6680572.706
272134.545 6680572.721
272134.543 6680572.710
272134.544 6680572.715
272134.543 6680572.705
272134.540 6680572.720
272134.544... (10 Replies)
Dear Gurus,
I have tab-delimited text files with matrix containing values. The first column is a identifier and other columns have the corresponding values. I would like to calculate the average value (total number/number of entries) for all entries from 2nd column to the last column in row... (3 Replies)
Dear All,
I have this file tab delimited
A 1 12 22
B 3 34 33
C 55 9 32
A 12 81 71
D 11 1 66
E 455 4 2
B 89 4 3
I would like to make the average every column where the first column is the same, for example,
A 6,5 46,5 46,5
B 46,0 19,0 18,0
C 55,0 9,0 32,0
D 11,0 1,0 66,0... (8 Replies)
I have a dataset with 120 columns. I would like to write a script, that takes the average of every two columns, starting from columns 2 and 3, and moving consecutively in frames of 3 columns, all the way until the last column.
The first column in the output file would be the averages of columns... (1 Reply)
Hi Friends,
My input file
Gene1 10 20 0
Gene2 5 0 15
Gene3 10 10 10
Gene4 5 0 0
If there is a zero for any gene in any column, I don't want that column to be considered which reduces the denominator value during average.
Here is my output
Gene1 10 20 0 10
Gene2 5 0 15 10
Gene3... (5 Replies)
Discussion started by: jacobs.smith
5 Replies
LEARN ABOUT NETBSD
link_field
FORMS(3) BSD Library Functions Manual FORMS(3)NAME
dup_field, free_field, link_field, new_field -- form library
LIBRARY
Curses Form Library (libform, -lform)
SYNOPSIS
#include <form.h>
FIELD *
dup_field(FIELD *field, int frow, int fcol);
int
free_field(FIELD *field);
FIELD *
link_field(FIELD *field, int frow, int fcol);
FIELD *
new_field(int rows, int cols, int frow, int fcol, int nrows, int nbuf);
DESCRIPTION
The dup_field() function duplicates the given field, including any buffers associated with the field and returns the pointer to the newly
created field. free_field() destroys the field and frees any allocated resources associated with the field. The function link_field()
copies the given field to a new field at the location frow and fcol but shares the buffers with the original field. new_field() creates a
new field of size rows by cols at location frow, fcol on the page, the argument nrows specified the number of off screen rows the field has
and the nbuf parameter specifies the number of extra buffers attached to the field. There will always be one buffer associated with a field.
RETURN VALUES
On error dup_field() and new_field() will return NULL. The functions will one of the following error values:
E_OK The function was successful.
E_BAD_ARGUMENT A bad argument was passed to the function.
E_CONNECTED The field is connected to a form.
SEE ALSO curses(3), forms(3)NOTES
The header <form.h> automatically includes both <curses.h> and <eti.h>.
BSD January 1, 2001 BSD