Next: data_files Up: MacAnova Help File Previous: cumstudrng()   Contents

customize

Keywords: control, general
There are two ways to customize some aspects of MacAnova -- setting
environmental variable MACANOVA (not on a Macintosh) and/or preparing a
special startup file MacAnova.ini (.macanova.ini on Unix/Linux).

                    Environmental Variable MACANOVA
On DOS/Windows and Unix/Linux computers, MacAnova recognizes and uses
the value of an environmental variable MACANOVA.  Its value should be a
list of command line options such as '-l 26 -w 75 -q' (see topic
'launching' for details on command line options).  These are scanned
before the command line options and thus are overridden by options on
the command line.  You can change the default values of several
pre-defined variables and options.  One limitation is that there can be
no embedded spaces in option values such as file names.

On DOS/Windows, to use this feature you need to put a line like the
following in your AUTOEXEC.BAT file.
  SET MACANOVA=-l 26 -w 75 -mpath c:\macanova\macros
Include only options or file or path names whose defaults you want to
change.

If your Unix/Linux shell is csh or a variant such as tcsh, you should
put a line similar to the following in file .cshrc in your home
directory:
  setenv MACANOVA '-l 26 -w 75 -mpath ~/macanova/macros'

If your Unix/Linux shell is sh, bash or a variant such as ksh, you
should put a line similar to the following in file .profile in your home
directory:
  MACANOVA='-l 26 -w 75 -mpath ~/macanova/macros';export MACANOVA

One purpose of this option is to make it easier to use a Unix/Linux
binary executable file on a computer configured differently from the one
for which it was compiled.  By including
    -help helpFile -mpath macroPath -dpath dataPath
in variable MACANOVA, where helpFile includes the complete path name
(directory and file name) for the help file, and macroPath and dataPath
are the complete path names for directories where macro and data files
are kept, all compiled installation dependent information is suppressed.
This could be set in an installation's /etc/csh.login and /etc/profile
files.  It's o.k. for macroPath and dataPath to be the same.

Another use for MACANOVA is to make sure some standard macros are read
in or variables created by including '-e Command' in the environmental
variable (see 'launching').  For example, in Unix/Linux, one of
  setenv MACANOVA "-e getmacros(ffplot,tsplot,spectrum,quiet:T)" [csh]
or
  MACANOVA="-e getmacros(tsplot,ffplot,quiet:T)";export MACANOVA [sh]
ensures macros tsplot() and ffplot() will always be available.  Warning:
The command cannot contain any spaces or tabs.

                  Customizing by Using a Startup File
When MacAnova is launched, it searches for a "startup" file with a
special name (see below).  If it is found, MacAnova assumes the file
contains MacAnova commands and executes it with an implicit
batch(startupFile, echo:F) command before the first prompt (see batch(),
launching).

Under Unix/Linux, the startup file has name ".macanova.ini" (the
starting period is important) and should be in the user's home
directory.

On a DOS/Windows computer, the startup file is "MACANOVA.INI" which
should be in the same directory as MACANOBC.EXE, MACANODJ.EXE and/or
MACANOWX.EXE.  See topic 'dos_windows'.

On a Macintosh the startup file is "MacAnova.ini" and should be in the
same Folder as the MacAnova application.

See topic 'launching' for information on how to specify an alternative
startup file using command line flag -f (not on Macintosh).

The use of a startup file is completely optional.  If you have one, you
can put commands in it to set options such as the default output
formatting, file names to replace the default values of variables
DATAFILE, MACROFILES, DATAPATHS (see topic 'DATAPATHS'), and HOME (see
topic 'file_names') and the units (radians, degrees, or cycles) to be
used by trigonometric functions (see topic 'options').  You can also
include commands to create macros or read in macros that will thus
always be available whenever you launch MacAnova.

If you run a Unix/Linux version of MacAnova through a terminal emulating
program that can switch into and out of Tektronix 4014 emulation mode,
you may want to use a startup file that sets option 'tektest' to specify
the character strings that control such switches.  See subtopic
'options:"tektest"'.  This is not necessary when you are running in an
xterm window.

Note: setoptions(prompt:newprompt) has no effect in a startup file.  See
topics setoptions(), 'options'.

The version of the startup file distributed with MacAnova does nothing
as it stands, since every action in it is in an if(F){...} clause.  You
can activate actions in the file by editing it to change some or all of
the if(F){...} to if(T){...} using any text editor.  If you use a word
processor, the file must be saved as a text or ASCII file.

Here is a simple example of a possible MacAnova startup file (the line
numbers are for reference but are not part of the file)

Line #
  1    setoptions(nsig:6,angles:"cycles",pvals:T,fstats:T,restoredel:F)
  2    DATAFILE <- "timeser.dat"
  3    addmacrofile("mytser.mac")
  4    adddatapath("MyDisk:Time Series:Data") #Macintosh form
  5    ls <- macro("listbrief($0)")
  6    if(isdefined(DEGPERRAD)){delete(DEGPERRAD,lockedok:T)}

If this were your startup file, it would have the following effects:
Line 1:
  Output will be printed with 6 significant digits (option 'nsig')
  Trigonometric functions will assume that angles are measured in cycles
    with 1 equivalent to 2*pi (option 'angles')
  Output from GLM functions such as anova(), regress(), and glmfit()
    will include P values, and where appropriate, F-statistics (options
    'pvals' and 'fstats')
  Command restore() will not delete existing variables unless they are
    overwritten or unless keyword phrase 'delete:T' is used on restore()
    (option 'restoredel')
Line 2:
  Pre-defined CHARACTER variable DATAFILE will be redefined to be
    "timeser.dat".  This will result in pre-defined macro getdata()
    retrieving data from file "timeser.dat".
Line 3:
  Pre-defined CHARACTER vector MACROFILES will start with "mytser.mac",
    ensuring that pre-defined macro getmacros() will search file
    mytser.mac before the standard macro files.
Line 4:
  Predefined CHARACTER variable DATAPATHS will have folder "MyDisk:Time
    Series:Data" added to it as an additional place to search for data
    or macro files to be read.  On a DOS/Windows computer the name would
    be something like "C:/TSeries/Data" and in Unix/Linux it would
    probably be something like "~/TimeSeries/Data".  See topic
    'DATAPATHS'.
Line 5:
  Macro ls will be an "alias" for command listbrief()
Line 6:
  Pre-defined REAL constant DEGPERRAD with value 180/pi will be deleted.
  'lockedok:T' is required since DEGPERRAD is a locked variable.


Gary Oehlert 2003-01-15