【文件属性】:
文件名称:r2py:使用rpy2在python中包装R代码
文件大小:3KB
文件格式:ZIP
更新时间:2021-04-06 08:36:27
R
2
使用rpy2在python中包装R代码。
例子
白条纹
首先将R转换为python,
git clone https://github.com/muschellij2/WhiteStripe.git
Rscript -e ' source("R/transpile.R"); cat(transpile("WhiteStripe", list.files("WhiteStripe/man", full.names = TRUE))) ' > whitestripe.py
rm -rf WhiteStripe
然后导入并使用,
import whitestripe as ws
t1 = ws . readnii ( "T1w.nii.gz" )
ind = ws . whitestripe ( t1 , "T1" )
res = ws . whitestripe_norm ( t1
【文件预览】:
r2py-main
----R()
--------transpile.R(4KB)
----README.md(2KB)
----.gitignore(41B)