Help with calculate statistics between two column info
Input file
Desired output result
I have long list of input file as shown above.
I would like to use the info at second column minus first column to get the distance result.
The theory behind to manual calculate to get the Desired output result
As shown above, 19087 is calculated by 159817366(second info at column two)-159797120(first info at column two)-1159(first info at column one).
All the input file, column 2 sure have at least two info.
The theory to get the each number is calculated by use the front record (second info) in column two minus the back record (first info) in column two and first record (first info) in column one, and so forth
Hi I have fakebook.csv as following:
F1(current date) F2(popularity) F3(name of book) F4(release date of book)
2006-06-21,6860,"Harry Potter",2006-12-31
2006-06-22,,"Harry Potter",2006-12-31
2006-06-23,7120,"Harry Potter",2006-12-31
2006-06-24,,"Harry Potter",2006-12-31... (0 Replies)
Hi, I am having the file which contains the following two columns.
518 _factorial
256 _main
73 _atol
52 ___do_global_ctors
170 ___main
52 ___do_g
How can calculate the percentage of each value in the first column ?
first need to get the sum of the first column and... (3 Replies)
Input file
11916 30640 9320 51876
5690 15874 4723 26287
5121 12269 2569 19959
9 71 6 86
Desired output file
11916 30640 9320 51876
5690 15874 4723 26287
5121 12269 2569 19959
9 71 6 86
22736 58854 16618 98208
Last part is the total up of first three data.
I used the following... (6 Replies)
Hi All,
Thanks all for the continued support so far.
Today, I need to find the most occurring string/number(also called mode in statistics terminology) for each column in a data file (.csv type).
For one column of data(1.txt) like below
Sample
1
2
2
3
4
1
1
1
2
I can find the mode... (6 Replies)
Hi,
I would like to calculate the average of column 'y' based on the value of column 'pos'.
For example, here is file1
id pos y c
11 1 220 aa
11 4333 207 f
11 5333 112 ee
11 11116 305 e
11 11117 310 r
11 22228 781 gg
11 ... (2 Replies)
Hello dears,
I have a log file with records like below and want to get a average of one column based on the search of one specific keyword.
2015-02-07 08:15:28 10.102.51.100 10.112.55.101 "kevin.c" POST ... (2 Replies)
I would like to have some help in calculating 5th percentile value of column 2 for each site, the input is like below:site val1 val2
002 10 25.3
002 20 25.3
002 30 25.3
002 40 20
002 50 20
002 60 20
002 70 20
002 80 30
002 90 30
002 100 30
002 120 30
003 20 30.3
003 20 30.3
003 30 20... (2 Replies)
PSC(1) General Commands Manual PSC(1)NAME
psc - prepare sc files
SYNOPSIS
psc [-fLkrSPv] [-s cell] [-R n] [-C n] [-n n] [-d c]
DESCRIPTION
Psc is used to prepare data for input to the spreadsheet calculator sc(1). It accepts normal ascii data on standard input. Standard out-
put is a sc file. With no options, psc starts the spreadsheet in cell A0. Strings are right justified. All data on a line is entered on
the same row; new input lines cause the output row number to increment by one. The default delimiters are tab and space. The column for-
mats are set to one larger than the number of columns required to hold the largest value in the column.
OPTIONS -f Omit column width calculations. This option is for preparing data to be merged with an existing spreadsheet. If the option is not
specified, the column widths calculated for the data read by psc will override those already set in the existing spreadsheet.
-L Left justify strings.
-k Keep all delimiters. This option causes the output cell to change on each new delimiter encountered in the input stream. The
default action is to condense multiple delimiters to one, so that the cell only changes once per input data item.
-r Output the data by row first then column. For input consisting of a single column, this option will result in output of one row
with multiple columns instead of a single column spreadsheet.
-s cell
Start the top left corner of the spreadsheet in cell. For example, -s B33 will arrange the output data so that the spreadsheet
starts in column B, row 33.
-R n Increment by n on each new output row.
-C n Increment by n on each new output column.
-n n Output n rows before advancing to the next column. This option is used when the input is arranged in a single column and the
spreadsheet is to have multiple columns, each of which is to be length n.
-d c Use the single character c as the delimiter between input fields.
-P Plain numbers only. A field is a number only when there is no imbedded [-+eE].
-S All numbers are strings.
-v Print the version of psc
SEE ALSO sc(1)AUTHOR
Robert Bond
PSC 7.16 19 September 2002 PSC(1)