我试图修改和通过首先定义一个函数重新定义中的R包。LCMS一个函数(xcmsRaw)
my.xcmsRaw <- function(filename, profstep = 1, profmethod = "bin",
profparam = list(mzcorrf=1), # PATCH - mzcorrf is the m/z correction factor, e.g. 0.99888 for long-chain hydrocarbons
includeMSn = FALSE, mslevel=NULL,
scanrange=NULL) { ... }
然后键入
unlockBinding("xcmsRaw", as.environment("package:xcms"))
assign("xcmsRaw", my.xcmsRaw, as.environment("package:xcms"))
lockBinding("xcmsRaw", as.environment("package:xcms"))
然而,当我运行它,它给我的错误
Error in get(as.character(FUN), mode = "function", envir = envir) :
object 'profBinM' of mode 'function' was not found
由它引起的没有找到profBinM功能,这是在包装。LCMS的文件xcms.c定义的C代码功能。
我如何能解决这个问题有什么想法? (我在Windows 7下工作,,使用R版本3.0.0)