2021-05-06 invalid class “Graph”

2021-05-06  本文已影响0人  kke_wang

Error in validObject(.Object) :
invalid class “Graph” object: superclass "Mnumeric" not defined in the environment of the object's class

屏幕快照 2021-05-06 下午10.27.08.png

这是由于R里面有个包"Matrix"的版本问题,官方是这样说的:

A modification related to 'Mnumeric' is mentioned in the description of the update (https://cloud.r-project.org/web/packages/Matrix/news.html):
"removed the nowhere used (and unexported but still active) class union "Mnumeric" which actually trickled into many base classes properties. Notably would it break validity of factor with a proposed change in validity checking, as factors were also "Mnumeric" but did not fulfill its validity method."

而我们需要做的是不要新版本的,降回 Matrix_1.3-2 版本

remove.packages("Matrix")
packageurl <- "https://cran.r-project.org/src/contrib/Archive/Matrix/Matrix_1.3-2.tar.gz"
install.packages(packageurl, repos=NULL, type="source")
上一篇 下一篇

猜你喜欢

热点阅读