BayES is designed to perform some very speciﬁc tasks and it recognizes that there could be other software packages available that are more appropriate for other types of tasks. Instead of trying to do everything by itself, BayES provides interfaces to these packages to facilitate communication. This is achieved by means of software-speciﬁc interface functions, which allow the user to pass data and native code to, execute scripts in and retrieve results from each package, without ever leaving the BayES environment.
When an interface function is called in BayES, control passes to the respective software package, which starts executing the code provided by the user in the package’s native language. Once execution completes, control passes back to BayES. Depending on the particular software package, any output produced by it will be printed on the BayES console, either in real time or after execution of the external program completes. External programs to which BayES provides interfaces must be separately installed on the machine on which BayES is currently used. Furthermore, the locations of executable/binary ﬁles of these external software packages must be known to BayES.1
|BayES interface functions pass data to and retrieve results from external processes by writing temporary ﬁles in the current working directory. Upon successful completion of the external program, these ﬁles are deleted. Therefore, the user should have write access to the current working directory for the interface functions to work.|
1BayES can be made aware of the location of a package’s binary/executable either using the setbinary() function (see section B.17 for more information) or using the main menu, via Help → External Binaries.