我正在尝试使用图表包(v 1.6)在R中重新制作流程图.我能够使用这个确切的脚本(我从图表文档中的示例中修改)制作图表,但是一旦我将R更新为3.0.0,坐标函数就会给我一个错误.这是一个例子:
library(graphics)
library(diagram)
par(mar = c(1, 1, 1, 1))
openplotmat()
elpos<-coordinates(c(1,1,2,4))
Error in (function (classes, fdef, mtable) : unable to find an inherited method for function ‘coordinates’ for signature ‘"numeric"’
Run Code Online (Sandbox Code Playgroud)
我还是R和代码等新手,所以当我运行traceback()时,我真的不明白它告诉我的是什么:
3: stop(gettextf("unable to find an inherited method for function %s for signature %s",
sQuote(fdef@generic), sQuote(cnames)), domain = NA)
2: (function (classes, fdef, mtable)
{
methods <- .findInheritedMethods(classes, fdef, mtable)
if (length(methods) == 1L)
return(methods[[1L]])
else if (length(methods) == 0L) {
cnames <- paste0("\"", sapply(classes, as.character),
"\"", collapse = …Run Code Online (Sandbox Code Playgroud)