TABLE_COLUMNS_PERMUTE
Scale a Table Dataset


TABLE_COLUMNS_PERMUTE is a FORTRAN90 program which reads a text file, each of whose lines contains COL_NUM "words" or items. It accepts a permutation from the user, and writes out a copy of the file after permuting the columns.

For instance, suppose the file looks like this:

        # Comments look like this and are ignored.
        #
         cat  dog  horse
           1    2      3
         xxx   yy      z
      
If we ran the program, and specified the permutation "2 3 1", then the new file would be
        # Comments look like this and are ignored.
        #
           horse cat  dog
               3   1    2
               z xxx   yy
      
Notice that the permutation information specified that column 1 should move to column 2.

The input data is treated abstractly. It is assumed to be separated by blanks, and each item, when permuted, will also include the initial blanks. For this reason, it's best if the first entry of each data line is a blank, so that the first column of data will be properly delimited after being moved.

Usage:

table_columns_permute file.txt
reads the user's data file file.txt, prompts for a permutation vector from the user, and then writes the scaled data to a file which will be called file.permuted.txt.

Licensing:

The computer code and data files described and made available on this web page are distributed under the GNU LGPL license.

Languages:

TABLE_COLUMNS_PERMUTE is available in a FORTRAN90 version.

Related Data and Programs:

FILE_COLUMN_REVERSE, a FORTRAN90 program which creates a copy of a file in which the columns are reverse, that is, the characters on each line appear in reverse order.

FILE_TRANSPOSE, a FORTRAN90 program which makes a "transposed" copy of a file, in which the I-th "word" of the J-th line becomes the J-th word of the I-th line.

TABLE_BARPLOT_PPMA, a FORTRAN90 program which reads a table file and creates an ASCII PPM bargraph of the data.

TABLE_BORDER, a FORTRAN90 program which can be used to add a border (of zero values) to a table file.

TABLE_COLUMNS, a FORTRAN90 program which can extract specific columns of data from a table file.

TABLE_DELAUNAY, a FORTRAN90 program which computes the Delaunay triangulation of a set of points.

TABLE_HISTOGRAM, a FORTRAN90 program which can make a histogram of a set of points stored in a table file.

TABLE_IO, a FORTRAN90 library which supplies the routines used to read the TABLE file.

TABLE_LATINIZE, a FORTRAN90 program which reads a file of points and creates a "latinized" version by adjusting the data.

TABLE_MERGE, a FORTRAN90 program which reads a file of points, and removes duplicates, and points that are close to each other.

TABLE_ORTHONORMALIZE, a FORTRAN90 program which reads a file of points and orthonormalizes the columns.

TABLE_QUALITY, a FORTRAN90 program which reads a file of points and computes the quality of dispersion.

TABLE_RECORD_MATCH, a FORTRAN90 program which finds close records in a table file.

TABLE_SCALE, a FORTRAN90 program that multiplies the entries of a table file by a scale vector.

TABLE_SHIFT, a FORTRAN90 program which can be used to shift the entries of a table file by a shift vector.

TABLE_STATS, a FORTRAN90 program which reads a table file and compute certain statistics.

TABLE_TET_MESH, a FORTRAN90 program which reads a table file of 3D data, and compute a tetrahedral mesh.

TABLE_TOP, a FORTRAN90 program which reads a table file of M-dimensional data and make a table of plots of all pairs of coordinates.

TABLE_UNBORDER, a FORTRAN90 program which removes the border from a table file.

TABLE_UNIFORM_NOISE, a FORTRAN90 program which adds a uniform noise term to the data in a table file.

TABLE_VORONOI, a FORTRAN90 program which computes information about the Voronoi diagram of the points.

Source Code:

Examples and Tests:

TABLE7X10 is a file of 7 lines of text, each containing 10 columns of data. Files you may copy include:

List of Routines:

You can go up one level to the FORTRAN90 source codes.


Last revised on 18 January 2007.