i used able call r matlab system call:
system('"/usr/bin/r" --no-save < myscript.r')
but now, using matlab r2012b , r version 3.0.0 (2013-04-03) -- "masked marvel", errors when loading libraries, though work fine when run shell. running macosx 10.6.8.
error in dyn.load(file, dllpath = dllpath, ...) : unable load shared object'/library/frameworks/r.framework/versions/3.0/resources/library/stats/libs/stats.so': dlopen(/library/frameworks/r.framework/versions/3.0/resources/library/stats/libs/stats.so, 6): symbol not found: __gfortran_pow_r8_i4 referenced from: /library/frameworks/r.framework/versions/3.0/resources/lib/librlapack.dylib expected in: /applications/matlab_r2012b.app/sys/os/maci64/libgfortran.2.dylib in /library/frameworks/r.framework/versions/3.0/resources/lib/librlapack.dylib during startup - warning message: package 'stats' in options("defaultpackages") not found
unset environment variable dyld_library_path
before calling r script:
>> !/usr/bin/rscript ms.r error in dyn.load(file, dllpath = dllpath, ...) : unable load shared object '/library/frameworks/r.framework/versions/3.0/resources/library/stats/libs/stats.so': dlopen(/library/frameworks/r.framework/versions/3.0/resources/library/stats/libs/stats.so, 6): symbol not found: __gfortran_pow_r8_i4 referenced from: /library/frameworks/r.framework/versions/3.0/resources/lib/librlapack.dylib expected in: /applications/matlab_r2013a.app/sys/os/maci64/libgfortran.2.dylib in /library/frameworks/r.framework/versions/3.0/resources/lib/librlapack.dylib during startup - warning message: package 'stats' in options("defaultpackages") not found error: not find function "rnorm" execution halted >> !unset dyld_library_path; /usr/bin/rscript ms.r call: lm(formula = y ~ x) coefficients: (intercept) x -0.09727 0.03573
Comments
Post a Comment