Skip to content

gitGNU/gnu_datamash

Repository files navigation

GNU Datamash
============

GNU Datamash is a command-line program which performs basic
numeric,textual and statistical operations on input textual data files.

it is designed to be portable and reliable, and aid researchers
to easily automate analysis pipelines, without writing code or even
short scripts.

Home page: http://www.gnu.org/software/datamash


Usage
=====

See `datamash --help` for basic usage information.

See `man datamash` for examples and operation details.

For the instrucions manual, see `info datamash` or visit
  http://www.gnu.org/software/datamash/manual/



Examples
========

What's the sum and mean of the values in field 1 ?

    $ seq 10 | datamash sum 1 mean 1
    55 5.5

Given a file with three columns (Name, College Major, Score),
what is the average, grouped by college major?

    $ cat scores.txt
    John       Life-Sciences    91
    Dilan      Health-Medicine  84
    Nathaniel  Arts             88
    Antonio    Engineering      56
    Kerris     Business         82
    ...


    # Sort input and group by column 2, calculate average on column 3:

    $ datamash --sort --group 2  mean 3 < scores.txt
    Arts             68.9474
    Business         87.3636
    Health-Medicine  90.6154
    Social-Sciences  60.2667
    Life-Sciences    55.3333
    Engineering      66.5385

See more examples at http://www.gnu.org/software/datamash/examples/


Download and Installation
=========================

Download the latest source code at http://www.gnu.org/software/datamash .

General installation commands:

    $ tar -xzf datamash-[VERSION].tar.gz
    $ cd datamash-[VERSION]
    $ ./configure
    $ make
    $ make check
    $ sudo make install

See Platform/OS-specific download instructions at
  http://www.gnu.org/software/datamash/download/


To build from latest git sources, see the HACKING.md file. This file is
available when cloning from git, but is not distributed in the tar archive.
To clone the git repository run
    git clone git://git.savannah.gnu.org/datamash.git
It is also available online at
    https://git.savannah.gnu.org/cgit/datamash.git/tree/HACKING.md


BASH Auto-completion
====================

bash auto-completion script is in ./contrib/bash-completion/datamash .
If ./configure finds the needed bash-completion parameters during setup,
the bash completion script will be automatically installed to the correct
place (e.g. /usr/share/bash-completion/completions or /etc/bash.d).

Script installation can be disabled with:
    ./configure --with-bash-completion-dir=no

Or set to a specific directory with:
    ./configure --with-bash-completion-dir=[PATH]

Note when using `./configure --prefix=DIR`, the bash-completion
default directory can still be outside DIR (e.g `/usr/share/bash-completion`).
To disable or override it, use `--with-bash-completion-dir`.



Questions and Bug Reports
=========================

- Please send questions and bug reports to bug-datamash@gnu.org .
- Searchable archive at http://lists.gnu.org/archive/html/bug-datamash .
- Subscribe at https://lists.gnu.org/mailman/listinfo/bug-datamash .


Copyright and License
=====================
Copyright (C) 2013-2017 Assaf Gordon <assafgordon@gmail.com>

License: GPL Version 3 (or later).

For any copyright year range specified as YYYY-ZZZZ in this package
note that the range specifies every single year in that closed interval.

About

No description, website, or topics provided.

Resources

License

Stars

Watchers

Forks

Packages

No packages published