The function generates a dot-text file.
In order to view the corresponding graph, the user needs a dot-file converter and pdf/postscript viewer. Two environment variables have to be set also: R_DOTVIEWER and R_PDFVIEWER with
the full path to the executable routines. If Graphviz is installed and environment variable R_DOTVIEWER is set with the full
path to the dot executable file (the routine that converts a dot-text file to a postscript or pdf), a pdf or postscript file is created depending whether object is a catNetwork or a list of catNetwork.
Next, if a pdf-viewer is available, the created postscript or pdf file is shown.
If file is not specified, then the function just prints out the resulting string
which otherwise would be written into a file.