我正在尝试使用R.matlab中的函数writeMat。 在矩阵上 像这样:
writeMat('C:/Users/nirgalun/Desktop/soojin/coor_cpg_matrix.mat',coor_cpg_matrix)
我得到了错误:
[2018-10-07 13:54:07] Exception: Detected non-named objects. Non-named objects will not be available in MATLAB if completed. Use writeMat(..., x=a, y=y) and not writeMat(..., x=a, y): writeMat.default("C:/Users/nirgalun/Desktop/soojin/coor_cpg_matrix.mat", , Detected non-named objects. Non-named objects will not be available in MATLAB if completed. Use writeMat(..., x=a, y=y) and not writeMat(..., x=a, y): coor_cpg_matrix)
at #02. writeMat.default("C:/Users/nirgalun/Desktop/soojin/coor_cpg_matrix.mat",
coor_cpg_matrix)
- writeMat.default() is in environment 'R.matlab'
at #01. writeMat("C:/Users/nirgalun/Desktop/soojin/coor_cpg_matrix.mat",
coor_cpg_matrix)
- writeMat() is in environment 'R.matlab'
Error: Detected non-named objects. Non-named objects will not be available in MATLAB if completed. Use writeMat(..., x=a, y=y) and not writeMat(..., x=a, y): writeMat.default("C:/Users/nirgalun/Desktop/soojin/coor_cpg_matrix.mat", , Detected non-named objects. Non-named objects will not be available in MATLAB if completed. Use writeMat(..., x=a, y=y) and not writeMat(..., x=a, y): coor_cpg_matrix)
我该如何克服?
答案 0 :(得分:1)
如错误消息和文档所述,该参数必须命名为:
writeMat('C:/Users/nirgalun/Desktop/soojin/coor_cpg_matrix.mat',coor_cpg_matrix = coor_cpg_matrix)