Next: findfile() Up: MacAnova Help File Previous: file_names   Contents

files

Keywords: files, input, output, missing values
                              Introduction
This topic describes some aspects of the use of files.  Much of it is
fairly technical and not of great interest to the casual user.  It has
sections on default directories or folders and a little information on
file format.  See topics 'file_names', 'data_files', matread_file',
'vecread_file' and 'macro_files' for information on file names and
descriptions of formats for data files and macro files.  See topic
'file_names' for information on specifying file names.

                     Default directories or folders
Generally MacAnova first looks for the named file in the default
directory or folder, unless the supplied file name is a "path" name,
specifying a directory or folder and a file.  If MacAnova does not find 
the file in the current directory, it then looks in the directories or
folders in CHARACTER vector DATAPATHS.  See topic 'DATAPATHS'.

If you start MacAnova from the command line, then the initial default
directory is the current directory at the command line (on DOS, this might
be different if MacAnova is started by a *.BAT file that includes a CD
command).

                     Changing the default directory
On command line versions of MacAnova, you cannot change the default
directory after startup.

In the windowed versions of MacAnova, the default directory is changed
whenever you use the file navigation dialog box to select a file in a
different folder or directory.  Thus the first time you read a file from
a given folder, you should use "" as file name.  If you want, you can
then read other files in the same folder by specifying their names.

                              File formats
On all systems, data, macro, batch, and window files must be plain text
(ASCII) files.  These files often have a .txt extension.  If you create
them using a word processor, be sure to specify plain text format when
you save them.  On any system, MacAnova can correctly read text files
from all other systems (i.e., with Windows/DOS, Macintosh or Unix/Linux
line separating codes).  See topic 'data_files'.

See topics 'vecread_file' and 'matread_file' for information on how data
should be organized in files to be read by vecread() and read() or
matread(), respectively.

See topic 'macro_files' for information on the format of files to be
read by macroread().

See batch() for information on the format of batch files.

Files written by asciisave() are ASCII files but are not meant to be
read or edited by humans, and their format is arcane and subject to
change.  The asciisave() format is the same across computer types, so
that, for example, a DOS machine can read a Macintosh asciisave() file
and vice versa.  asciisave() files can also be emailed as is, without
encoding.

Files written by save() are binary files with formats that may differ
among computer types, but most can be read on all systems.

                               Help files
The default help file, usually "Macanova.hlp.txt" in the SharedSupport
directory below the MacAnova application, is a text file in a special
format.  The format is described near the start of the file.  If you
develop a file of macros, you could use this information to write a
special help file.  Or a macro file can be its own help file if you put
the properly formatted help after a line starting
_E_N_D_O_F_M_A_C_R_O_S_.  See topic 'macro_files'.

The help command will automatically search all the files whose names are
in pre-defined CHARACTER vector HELPFILES.  You can use addhelpfile() to
add a file name to HELPFILES.

Internally, help uses gethelp() and keywords 'file', 'orig' and 'alt'
to switch among files.

See help(), gethelp(), arimahelp(), designhelp(), graphicshelp(),
mathhelp(), mulvarhelp(), regresshelp(), tserhelp() and addhelpfile().


Gary Oehlert 2005-08-12