Next: addpoints() Up: MacAnova Help File Previous: adddatapath()   Contents


addmacrofile(fileName [,T]), fileName a quoted string or CHARACTER
  vector specifying one or more additional files to be searched by

Keywords: macros, files
addmacrofile(fileName) adds fileName at the start of CHARACTER vector
MACROFILES which contains the names of files to be searched for macros.
fileName must be a quoted string or CHARACTER scalar.  Because fileName
is added at the startof MACROFILES, the file will be the first one
searched for a macro.

addmacrofile(fileName,T) does the same except the file name is added at
the end of MACROFILES so the file will be searched last.

When fileName is a simple file name containing no directory or folder
information (for example, "mydata.dat" but not "./mydata.dat" or
":mydata.dat"), the file is first assumed to be in the default
directory.  If not found there, MacAnova looks for it in the folders or
directories listed in variable DATAPATHS. See topics 'DATAPATHS',
adddatapath(), 'file_names', 'files', 'macro_files'.

For both usages, fileName can also be a CHARACTER vector, each element
of which specifies a file to be searched.

When MACROFILES does not already exist, addmacrofile(fileName) creates

addmacrofile("" [,T] does the same, except you pick the file
interactively using a file navigation dialog box.  The complete path
name (file name with directory information) of the selected file will be
added to MACROFILES.  This works only in windowed versions (Windows,
Macintosh, Motif).  An equivalent usage is
addmacrofile(getfilename(type:"text") [,T]).  See getfilename().

If the first argument is a CHARACTER vector, on windowed versions, any
of its elements can be "".

  Cmd> addmacrofile("survival.mac")

  Cmd> addmacrofile("C:/mvmacros/survival.mac",T) # for DOS/Windows

  Cmd> addmacrofile("MyDisk:MVMacros:Survival.mac",T) # on a Mac

  Cmd> addmacrofile("~/mvmacros/survival.mac",T) # on Linux/Unix

  Cmd> addmacrofile("") # file added to be selected in dialog box

See also topics getfilename(), getmacros(), 'macros'.

Gary Oehlert 2003-01-15