---
name: "pkstatascii"
section: "1"
platform: "linux"
package: "pktools"
version: "2.6.7.6+ds-6+b3"
release: "Debian 13 (Trixie)"
platforms: ["linux"]
url: "https://new.carta.tech/pkstatascii"
---

# pkstatascii(1)

program to calculate basic statistics from text file

## NAME

pkstatascii - program to calculate basic statistics from text file

## SYNOPSIS

FC**pkstatascii**F\[0\]  FC**-i**F\[0\] *input* \[FC**-c**F\[0\] *column*\] \[*options*\] \[*advanced options*\]

## DESCRIPTION

**pkstatascii** calculates basic statistics of a data series in a text file.

## OPTIONS

- FC**-i**F\[0\] *filename*, FC**--input**F\[0\] *filename*

  name of the input text file

- FC**-size**F\[0\], FC**--size**F\[0\]

  sample size

- FC**-rnd**F\[0\] *number*, FC**--rnd**F\[0\] *number*

  generate random numbers

- FC**-dist**F\[0\] *function*, FC**--dist**F\[0\] *function*

  distribution for generating random numbers, see http://www.gn/software/gsl/manual/gsl-ref\_toc.html#TOC320 (only uniform and Gaussian supported yet)

- FC**-rnda**F\[0\] *value*, FC**--rnda**F\[0\] *value*

  first parameter for random distribution (mean value in case of Gaussian)

- FC**-rndb**F\[0\] *value*, FC**--rndb**F\[0\] *value*

  second parameter for random distribution (standard deviation in case of Gaussian)

- FC**-mean**F\[0\], FC**--mean**F\[0\]

  calculate mean

- FC**-median**F\[0\], FC**--median**F\[0\]

  calculate median

- FC**-var**F\[0\], FC**--var**F\[0\]

  calculate variance

- FC**-stdev**F\[0\], FC**--stdev**F\[0\]

  calculate standard deviation

- FC**-skew**F\[0\], FC**--skewness**F\[0\]

  calculate skewness

- FC**-kurt**F\[0\], FC**--kurtosis**F\[0\]

  calculate kurtosis

- FC**-sum**F\[0\], FC**--sum**F\[0\]

  calculate sum of column

- FC**-mm**F\[0\], FC**--minmax**F\[0\]

  calculate minimum and maximum value

- FC**-min**F\[0\], FC**--min**F\[0\]

  calculate minimum value

- FC**-max**F\[0\], FC**--max**F\[0\]

  calculate maximum value

- FC**-hist**F\[0\], FC**--hist**F\[0\]

  calculate histogram

- FC**-hist2d**F\[0\], FC**--hist2d**F\[0\]

  calculate 2-dimensional histogram based on two columns

- FC**-nbin**F\[0\] *value*, FC**--nbin**F\[0\] *value*

  number of bins to calculate histogram

- FC**-rel**F\[0\], FC**--relative**F\[0\]

  use percentiles for histogram to calculate histogram

- FC**-kde**F\[0\], FC**--kde**F\[0\]

  Use Kernel ⟨http://pktools.nongnu.org/html/classKernel.html⟩ density estimation when producing histogram. The standard deviation is estimated based on Silverman's rule of thumb

- FC**-cor**F\[0\], FC**--correlation**F\[0\]

  calculate Pearson produc-moment correlation coefficient between two columns (defined by FC**-c**F\[0\] \<col1\> FC**-c**F\[0\] \<col2\>)

- FC**-rmse**F\[0\], FC**--rmse**F\[0\]

  calculate root mean square error between two columns (defined by FC**-c**F\[0\] \<col1\> FC**-c**F\[0\] \<col2\>)

- FC**-reg**F\[0\], FC**--regression**F\[0\]

  calculate linear regression between two columns and get correlation coefficient (defined by FC**-c**F\[0\] \<col1\> FC**-c**F\[0\] \<col2\>)

- FC**-regerr**F\[0\], FC**--regerr**F\[0\]

  calculate linear regression between two columns and get root mean square error (defined by FC**-c**F\[0\] \<col1\> FC**-c**F\[0\] \<col2\>)

- FC**-v**F\[0\] *level*, FC**--verbose**F\[0\] *level*

  verbose mode when positive

Advanced options

- FC**-src\_min**F\[0\] *value*, FC**--src\_min**F\[0\] *value*

  start reading source from this minimum value

- FC**-src\_max**F\[0\] *value*, FC**--src\_max**F\[0\] *value*

  stop reading source from this maximum value

- FC**-fs**F\[0\] *separator*, FC**--fs**F\[0\] *separator*

  field separator.

- FC**-r**F\[0\] *startrow* \[FC**-r**F\[0\] *endrow*\], FC**--range**F\[0\] *startrow* \[FC**--range**F\[0\] *endrow*\]

  rows to start/end reading. Use FC**-r**F\[0\] 1 FC**-r**F\[0\] 10 to read first 10 rows where first row is header. Use 0 to read all rows with no header.

- FC**-o**F\[0\], FC**--output**F\[0\]

  output the selected columns

- FC**-t**F\[0\], FC**--transpose**F\[0\]

  transpose input ascii vector (use in combination with FC**--output**F\[0\])

- FC**-comment**F\[0\] *character*, FC**--comment**F\[0\] *character*

  comment character
