
3 MANIP
	Manip is a data manipulation package.  It reads in a text
	file of numbers and displays them like a spreadsheet.
	You can then do simple operations on the columns and write
	them out in any format you like.
	Further help is available on the following toppics via
	the HELP command e.g. "HELP COPY"

	      @mycmds
	      Arrows
	      BLANK
	      CLEAR
	      CLOSE
	      COPY <range> <range> IF <exp>
	      DATA <range>
	      DELETE <range> IF <exp>
	      EXIT file_name <range> -TAB -SPACE -COMMA
	      FIT c3
	      Functions
	      GENERATE <pattern> <destination>
	      GOTO x y
	      INSERT <Cn> or <Rn>
	      LOAD filename <range> -0
	      LOAD filename <range>
	      LOGGING mycmds.man
	      MOVE <range> <range> IF <exp>
	      NEW
	      PARSUM <range1> <range2>
	      PROP <range> <range>
	      QUIT
	      Range (discussion on how to specify ranges)
	      Recover (recovering from power failure or crash)
	      SAVE file_name <range> -TAB -SPACE -COMMA
	      SET SIZE ncols nrows
	      SET BETWEEN " "
	      SET COLTYPE 
	      SET COLWIDTH
	      SET NCOL n
	      SET DPOINTS n
	      SET DIGITS n
	      SET WIDTH n
	      SHELL
	      SORT <range> on <exp>
	      SUM <range>
	      SWAP CnCn | RnRn
	      Usage (command line usage)

3 USAGE
    MANIP infile.dat -recover -step -commands c.log -single -size x y

    -recover	Reads keys from the file MANIP_.J1 as if they were
		typed by the user.  This will restore you to the
		point just before your pc crashed.
		The last three journal files are stored (.j1 .j2 .j3)
		simply copy the one you want to (.j1) to use it.

    -step	Used with recover,  press a space for each key you
		want to read from the journal file,  press any other
		key to stop reading the journal.

    -commands filename.man
		This reads the commands in filename.man as if they
		were typed at the keyboard.

    -single	This makes MANIP use single precision arithmetic
		and doesn't store strings at all, this enables
		three times as much data in the same amount of memory

    -size x y	Sets the initial size of the spreadsheet.  Use this
		with large datasets as it prevents the heap from
		becoming fragmented and thus lets you use much
		larger datasets.

3 RECOVER
    Manip logs everything you type to a file called MANIP_.J1
    When you use the -RECOVER option on the manip command it then
    reads keys from that file as if they were typed at the keyboard.

    -recover	Reads keys from the file MANIP_.J1 as if they were
		typed by the user.  This will restore you to the
		point just before your pc crashed.
		The last three journal files are stored (.j1 .j2 .j3)
		simply copy the one you want to (.j1) to use it.

    -step	Used with recover,  press a space for each key you
		want to read from the journal file,  press any other
		key to stop reading the journal.


3 RANGE
	Most manip commands accept a range as one or more of there
	parameters.  A range is a rectangular section of your
	spreadsheet.  A range can ether start with a 'c' or an
	'r' and this will affect how the command operates.

	If your spreadsheet has 5 columns and 10 rows then.
		c1 ==  c1c1r1r10  == 1,1  1,2  1,3  1,4  1,5  1,6 ...
		r1 ==  r1r1c1c5   == 1,1  2,1  3,1  4,1  5,1
		c1c2 ==c1c2r1r10  == 1,1  2,1  1,2  2,2  3,1  3,2 ...
		r1r2c3=r1r2c3c5   == 3,1  3,2  4,1  4,2  5,1  5,2


3 ARROWS
 The arrow keys normally move the data cursor, however if you are half
 way thru typing a command then, the left and right arrow keys allow you
 to edit the command.  Use the PAGE-UP and PAGE-DOWN keys to recall
 your last command.

 SHIFT arrow keys will jump 7 cells at a time for fast movement.

3 COPY
 For copying a section to another section. "% COPY <range1> <range2> if <exp>"
 They do not have to be the same shape. The pointers to both rangers
 are increased even if the number is not coppied  e.g. 
	"% COPY r4r2 r1r2"
	"% COPY c1c3r6r100  c6c8 if c1<c2"

	"% COPY C1 C2 IF C1<4"
	c1 	c2
	1       1
	2       2
	5       -
	3       3
	9       -


3 DELETE
 For deleteing entire rows or columns.  "% DELETE <range> [IF <exp>]"
 e.g. 	"% DELETE c1c3 IF r1>3.and.r2=0
	"% DELETE r1"
 Numbers are shuffled in from the right to take the place of the
 deleted range.

3 DATA
 Data entry mode is usefull for entering data.  After typing in
 "% DATA c1c3" or "% DATA C2" you can then enter data and pressing
 <cr> will move you to the next valid data position.
 In this mode text or numbers can be entered.
 Press ESC to get back to command mode.

3 FIT
  "FIT C3" will fit a least squares regression line to the data
   in columns c3 and c4 (x values taken from c3) and print
   out the results.

3 EXIT 
 EXIT saves the data in your input file spec and exits to DOS.  You
 can optionally specify an output file as well. eg. "% EXIT myfile.dat

 The command "EXIT myfile.dat c3c5r1r3" will write out that range of
 numbers to the file.

 By default manip will write columns seperated by spaces.

 The command "EXIT myfile.dat -TAB" will put a single tab between
 each column of numbers and "EXIT myfile.dat -COMMA" will put a
 comma and a space between each number.  (these two options are
 usefull if your data file is very big and you don't want to waste
 diskspace with the space characters.)  NOTE: The settings stay
 in effect for future saves and exits.

 You can make it line up the columns on the decimal point by typing in the
 command. "SET DPOINTS 3"

 You change the width of each column or completely remove the spaces
 between columns with the command. "SET WIDTH 10"  (or set width 0)

 You can change the number of significant digits displayed with
 the command "SET DIGITS 4"


3 SAVE
 Saves all or part of your data.
 "SAVE myfile.dat"

 The command "SAVE myfile.dat c3c5r1r3" will write out that range of
 numbers to the file.

 By default manip will write columns seperated by spaces.

 The command "SAVE myfile.dat -TAB" will put a single tab between
 each column of numbers and "SAVE myfile.dat -COMMA" will put a
 comma and a space between each number.  (these two options are
 usefull if your data file is very big and you don't want to waste
 diskspace with the space characters)   NOTE: The settings stay
 in effect for future saves and exits.

 You can make it line up the columns on the decimal point by typing in the
 command. "SET DPOINTS 3"

 You change the width of each column or completely remove the spaces
 between columns with the command. "SET WIDTH 10"  (or set width 0)

 You can change the number of significant digits displayed with
 the command "SET DIGITS 4"

3 GOTO
 For moving the cursor directly to a point in your array.
 e.g. 	"% GOTO x y"

3 CLEAR
	"% CLEAR C2C3" Clears the given range of all values

3 BLANK
	"% BLANK C2C3" Clears the given range of all values

3 NEW
 Clears the spread sheet of all data and frees memory.

3 INSERT
 Inserts a new column or row and shifts all others over.
 e.g. 	"% INSERT c5" or "% INSERT r2".

3 LOAD
 Load data into columns. eg. "% LOAD filename" loads all data into corresponding
 columns.  "% LOAD filename c3" load first column of data into c3 etc.

 "LOAD myfile.dat c3 -LIST"
 This commmand will load the the data into a single column or range
 (even if it is several columns wide in the data file)

3 MOVE
 For copying a section to another section. "% MOVE <range1> <range2> if <exp>"
 They do not have to be the same shape. The pointer to the destination
 is only increased if the line or column is coppied e.g.
	"% MOVE c1 c2c3"
	"% MOVE r4r2 r1r2"
	"% MOVE c1c3r6r100  c6c8 if c1<c2"

	"% MOVE C1 C2 IF C1<4"
	c1 	c2
	1       1
	2       2
	5       3
	3       -
	9       -

	(See COPY command)

3 SORT 
 Sort entire rows of the data based on the data in a particular column.
 FORMAT: SORT <range> ON <exp>
 e.g.	"% SORT c8 on c9"
	"% SORT c1c8 on -c8"
	"% SORT c1c3 on c2  " 	!for sorting strings

 This command works out how to sort the column (or exp) specified
 in the ON part of the command.  It then does that operation to
 the range specified. e.g. "SORT C1 ON C1"  will sort column one.

 Use the additional qualifier -STRINGS if you want to sort a
 column with strings in it. e.g. "sort c1 on c2 -strings"

3 SWAP
 Swap over two columns or rows.
 e.g. 	"% SWAP c1c2"
	"% SWAP r3r1"

3 SET
	      SET SIZE ncols nrows
	      SET BETWEEN " "
	      SET COLWIDTH
	      SET COLTYPE [n] DECIMAL | EXP | BOTH | DPOINTS n 
	      SET NCOL n
	      SET DPOINTS n
	      SET DIGITS n
	      SET WIDTH n

4 WIDTH
 Sets the width of padding to use for the columns when they
 are written to a file.
 The columns usually one space wider than this setting as
 the BETWEEN string is usually set to one space by default.

4 COLTYPE
 This commands allows all or individual columns to be set to
 different output types.  If colnumber is missing then that
 setting is applied to all columns.

 SET COLTYPE Ccolnumber TYPE

 Where TYPE is one of:

	DECIMAL    produces 	123.456
	EXP	   produces	1.23456e02
	BOTH       produces whichever is more suitable
	DPOINTS n  produces a fixed number of decimal places.

 e.g.
	SET COLTYPE c2 DECIMAL
	SET COLTYPE c1 EXP
	SET COLTYPE c3 DPOINTS 4

 Would print out:
	1.2e02 	  1.2    1.2000

	SET COLTYPE EXP   (column number missed out)
 Would print out:
	1.2e02    1.2e02  1.2e02

4 COLWIDTH
 Set the width of each column when displayed.
 e.g. 	"% SET COLWIDTH 12"

4 NCOL
 Set the number of columns to display.
 e.g. 	"% SET NCOL 3"

4 SIZE
  "SIZE 3 4" Truncates the spreadsheet to 3 columns and 4 rows.  This
  also sets the values to use for default ranges.

4 BETWEEN
  "SET BETWEEN "##"
  Defines the string to be printed between each column of numbers
  when written to a file.  This is normally set to a single space.

4 DPOINTS
  Sets the number of decimal places to print.  This is used for
  producing columns which line up on the decimal point.
  e.g. with DPOINTS 3.
	2.2   ->   2.200
	234   -> 234.000

  (See also SET COLTYPE) 

4 DIGITS
	Sets the number of significat digits to be displayed, e.g.
	with DIGITS 3.
		123456    becomes   123000
		0.12345   becomes   0.123

3 LOGGING
 For creating command files. e.g.
	"% LOG sin.man"
	"% c2=sin(c1)
	"% c3=c2+2
	"% close"
 Then type in "@sin" to execute these commands.

3 PROPAGATE
 This command has the same format as move. e.g
 "% PROPAGATE <source> <destination>"  The difference is that the
 source is coppied as many times as possible to fill up the destination.
 e.g. 	"% PROP c1r1r7 c2"

3 SUM
 Adds up all the numbers in a range and displays the total and average.
	"% SUM C1C3"

3 PARSUM
 Adds up one coloumn, putting the partial sum's into another coloumn.e.g.
 1,2,3,4 becomes 1,3,6,10.
	"% PARSUM C1 C4"

3 GENERATE
 For generating a patter of data e.g.   1 1 2 2 5 5 1 1 2 2 5 5 etc.
	"% GEN 2(1,2,5)30 c4"	!1 1 2 2 5 5  repeated 30 times
	"% GEN (1:100:5)5 c1"	!1 to 100 step 5,  5 times
	"% GEN (1,2,*,3:5)5 c1"	!missing values included

3 FUNCTIONS
 Calculations can be performed on rows or columns. eg "% C1=C2*3+R"
 where "R" stands for row-number and C1 and C2 are columns.
 They can also be performed on ROWS. eg "% r1=sin(r2)+log10(c)"

 c1 = cell(c+1,r)+cell(c+2,r)
 cell(1,3) = 33.3

 Valid operators and functions:       ,       +         -         ^
 *         /        <=	    >=       <>      <         >         =       )AND(
 )OR(     +         -       ABS(     ATN(    COS(      EXP(      FIX(    INT(
 LOG(     LOG10(   SGN(     SIN(     SQR(    TAN(      NOT(      RND(    SQRT( 
 .NE.    .EQ.      .LT.     .GT.     .LE.    .GE.      .NOT.     .AND.   .OR. 
 e.g. 3+4*COS(PI/180)^(3+1/30)+C1+R"

3 QUIT
 Abandon file.

3 SHELL
 Gives access to DOS.

