您的位置:首页 > 编程语言 > MATLAB

Reach for your Matlab data with R

2016-07-31 11:52 375 查看
If you work with both Matlab and R, the R.matlab package maintained by Henrik Bengtsson on
CRAN helps you to connect the two environments by allowing you to read and write Matlab's MAT data file format from R (even if you don't have Matlab installed). This allows you to pass data between Matlab and R via the filesystem.

But if you want to build an integrated R/Matlab workflow, and call Matlab functions directly from R, there is also the reach
packageby Christoph Schmidt (available on Github). The reach package works with a Matlab installation behind the scenes, by writing scripts for batch execution by Matlab, and exchanging data via files. (This is a simpler integration than the beta Java-based
connectivity also provided by R.matlab, but Christoph claims this interface is more robust.) This is all transparent to the user though, who with just R functions is able to:
call and execute Matlab functions seamlessly as if they were R functions and return their results directly into the R session
convert .mat files into .RData files, and even batch-convert all .mat files contained within a folder
launch Matlab scripts, and import the results back into R
execute Matlab functions and print their results at the command line
exchange list and matrix objects between the two systems

I don't have access to Matlab, so I wasn't able to try R.matlab or the "reach" packagage myself. But if you try it out, let us know how it works.

github (schmidtchristoph): reach
内容来自用户分享和网络整理,不保证内容的准确性,如有侵权内容,可联系管理员处理 点击这里给我发消息
标签:  matlab
相关文章推荐