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

files

Keywords: files, input, output, missing values
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 current default
directory or folder, unless the supplied file name is a "path" name,
specifying a directory or folder and a file.  If it does not find it
there it then looks in the directories or folders in CHARACTER vector
DATAPATHS.  See topic 'DATAPATHS'.

On Windows, DOS and Unix/Linux, the initial default directory is the
default directory at the time MacAnova is started up (on DOS, this might
be different if MacAnova is started by a *.BAT file that includes a CD
command).

On a Macintosh, if you start MacAnova by clicking on a save workspace
file (see save()) or a file containing a saved output/command window
(see topic 'macintosh'), the default directory is the folder containing
the file you clicked on.  Otherwise, the initial default directory is
the folder where the executable application is located.

                     Changing the default directory
On Unix/Linux, once you have started up MacAnova, you cannot change the
default directory.

In the limited memory DOS version (BCPP), you change the default
directory by, for example,
  Cmd> shell("cd e:\\classes\\stat1001",interact:T)
or
  Cmd> !cd e:\classes\stat1001
This does not currently work in the extended memory version (DJPP) or
Windows version.  See shell().  In both forms, '\' is required; '/'
won't do.

In the Windowed versions (Macintosh, Windows, Motif), 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 and batch files must be plain text (ASCII)
files.  If you create them using a word processor, be sure to specify
text format when you save them.  On any computer, MacAnova can correctly
read text files 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 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.

The default help file, usually "macanova.hlp" in the same directory as
MacAnova, 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'.

You can change the file used by help() by means of keywords 'file',
'orig' and 'alt'.

You can use macro gethelp() to search all the files whose names are in
pre-defined CHARACTER vector HELPFILES and macro addhelpfile() to add a
file name to HELPFILES.

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


Gary Oehlert 2003-01-15