BayES BayES

B.1 Directory statements

Directory statements are used to set the working directory for BayES and the installation directories of programs for which BayES provides interfaces. Under Microsoft® Windows® systems the directory separator can be either forward slash (/) or a backslash (\). However, BayES functions that return directory names will use forward slash separators, even under Microsoft® Windows® systems.



Syntax

Arguments and performed function



setwd(d);

Sets the current working directory to the value provided in d. Specification of the working directory allows calling user-defined functions from the directory and loading/saving results without needing to quote full paths.

  • d must be a string
  • d could be absolute (eg. "C:/MyFiles/MyFolder") or relative to the current working directory (eg. "./MyFolder")



d = getwd();

d is a string with value equal to the current working directory.

  • Even under Microsoft® Windows®systems the function returns a string that uses forward slash (/) to separate directories



setbinary(<program name>, s);

This function sets the location and name of the executable/binary file of external programs for which BayES provides interfaces.

  • <program name> must one of the following ids:
    • jags
    • openbugs
    • rproject
    • stata
    • matlab
    • octave
  • s must be a string containing the full absolute path to the respective program’s binary file, the name of the binary file and its extension


Share this content:
Facebook Twitter LinkedIn Email
© 2016–20 Grigorios Emvalomatis