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}