Error in rbind(info, getNamespaceInfo(env, “S3methods”)) when installing factoextra

后端 未结 1 722
清酒与你
清酒与你 2021-02-10 17:41

I\'m trying to install the \"factoextra\" package using a local source tar ball on Windows. I can install other packages in the same way with no problem. However, when install

相关标签:
1条回答
  • 2021-02-10 17:57

    I found this thread: http://r.789695.n4.nabble.com/Error-in-rbind-info-getNamespaceInfo-env-quot-S3methods-quot-td4755490.html, which leads me to how I solved a similar issue on my machine.

    I found that a broken version of the package was installed on my system and had to be removed manually before I could install a clean version.

    Find if and where factoextra is installed (it might be on your system, just outdated or broken):

    find.package("factoextra")
    

    If it's there already (just broken), you can try to remove it with:

    remove.packages("factoextra")
    

    If remove.packages() fails even though find.packages() says the package is there, use the path returned by find.packages() to use your OS' file system to find and delete the package - just be careful only to delete stuff you know is broken.

    Once the old, broken package is removed, use install.packages("factoextra") and it should work.

    I had several packages that were broken in this way. If that's the case for you, you can identify which packages to remove and install this way by using something like:

    allPackages <- installed.packages()[, 1]
    findBrokenPackages <- function(packages) {
        for (p in packages) {
            tryCatch(ncol(asNamespace(p)$.__NAMESPACE__.$S3methods),
                     error = function(e) print(c(p, e)))
        }
    }
    findBrokenPackages(allPackages)
    

    This will print out any packages that have the same issue. I would suggest removing all broken packages before trying to use install.packages() again.

    0 讨论(0)
提交回复
热议问题