RunRcode(RscriptFil​eName,Rpath)

버전 1.4 (4.94 KB) 작성자: Wei-Rong Chen
This function calls R to run R script (.r file) under Matlab
다운로드 수: 3.4K
업데이트 날짜: 2017/12/14

라이선스 보기

This function calls R to run R script (.r file) under Matlab, and returns 'runR.log' in the same folder with the input R script file.
This code only works in Windows environments. It might work in Mac by modifying 'FindRpath'.
'RscriptFileName' : path + filename of the R script to be run.
'Rpath' (optional) : the path for the installed 'R.exe'. e.g. Rpath = 'C:\Program Files\R\R-3.1.1\bin';
If 'Rpath' is not provided, 'FindRpath' will be executed to automatically find the path for R in Windows Program Files folder.
Example:
>> Rpath = 'C:\Program Files\R\R-3.1.1\bin';
>> RscriptFileName = 'D:\test\lmm.R';
>> RunRcode(RscriptFileName, Rpath);
or just >> RunRcode(RscriptFileName);

인용 양식

Wei-Rong Chen (2024). RunRcode(RscriptFileName,Rpath) (https://www.mathworks.com/matlabcentral/fileexchange/50071-runrcode-rscriptfilename-rpath), MATLAB Central File Exchange. 검색됨 .

MATLAB 릴리스 호환 정보
개발 환경: R2014a
모든 릴리스와 호환
플랫폼 호환성
Windows macOS Linux
카테고리
Help CenterMATLAB Answers에서 R Language에 대해 자세히 알아보기
태그 태그 추가
r

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!
버전 게시됨 릴리스 정보
1.4

Dec-14-2017 Support parallel processing (e.g., parfor) (run several R codes simultaneously)

1.3.0.0

Fixed a bug.

1.2.0.0

Fixed a bug.

1.1.0.0

Updated

1.0.0.0