FAQ for the RMatlab Package

  • When I try to run R inside Matlab, I get the following error:
    >> initializeR({'RMatlab' '--silent' '--vanilla'})
    initializeR({'RMatlab' '--silent' '--vanilla'})
    ??? Undefined command/function 'initializeR'.
    
    The problem is that you have to tell Matlab where to find the MEX files that makeup the Matlab-to-R interface. You do this (on Unix, at least) by setting the environment variable MATLABPATH to contain the directory containing the MEX files. These are installed in the R package directories. The simplest way to
  • When I try to run Matlab inside R, I get the following error:
    > library(RMatlab)
    Error in dyn.load(x, as.logical(local), as.logical(now)) :
            unable to load shared library "/home/sharesly/Rpackages/RMatlab/libs/RMatlab.so":
      libeng.so: cannot open shared object file: No such file or directory
    Error in library(RMatlab) : package/namespace load failed for 'RMatlab'
    
    The problem is that you have to tell R where to find the relevant Matlab shared libraries. You do this (on Unix, at least) by setting the environment variable LD_LIBRARY_PATH to contain the directory containing the necessary *.so files. For instance,
        setenv LD_LIBRARY_PATH /usr/local/matlab-7.0.1/bin/glnx86:{LD_LIBRARY_PATH}
    

  • Duncan Temple Lang <duncan@wald.ucdavis.edu>
    Last modified: Thu Nov 4 18:07:44 PST 2004