0

I am brand new to this so please forgive my inexperience...I'm trying to learn.

I'm attempting to install an R package called "Doublet Finder" using the specified code given on the Github site.

When I do this, I get this error immediately:

Error in rbind(info, getNamespaceInfo(env, "S3methods")) : number of columns of matrices must match (see arg 2)

Being new to R, I'm not sure what this error means and when I google this something similar comes up and the individual removed and re-installed ALL of their libraries...that seems crazy. Does anyone have advice on what this could be, how to fix it, or why the package won't install?

  • Could you give us the code you are using to install the package? – Tea Tree Mar 17 '20 at 23:56
  • (1) Are you talking about https://github.com/chris-mcginnis-ucsf/DoubletFinder? (2) What code are you attempting that gives this error? Please make this question *reproducible*. This includes sample code (including listing non-base R packages), sample *unambiguous* data (e.g., `dput(head(x))` or `data.frame(x=...,y=...)`), and expected output. Refs: https://stackoverflow.com/questions/5963269, https://stackoverflow.com/help/mcve, and https://stackoverflow.com/tags/r/info. – r2evans Mar 17 '20 at 23:58
  • Yes, I am running the following line to install the package: devtools::install_github('chris-mcginnis-ucsf/DoubletFinder') and I get this error – L_Neuro Mar 18 '20 at 13:43

1 Answers1

0

Your problem seems to be fairly similar to this one. It might be the case that the dependencies (packages that Doublet Finder relies on) are outdated. What you can try is to follow these steps to uninstall and reinstall all packages with the hope that by updating packages there isn't a version mismatch.

This code is copied from the website above:

ip <- as.data.frame(installed.packages(lib.loc = .libPaths()[1]), 
                    stringsAsFactors = FALSE)
head(ip)
str(ip)
path.lib <- unique(ip$LibPath)

# create a vector with all the names of the packages you want to remove
pkgs.to.remove <- ip[,1]
head(pkgs.to.remove)
str(pkgs.to.remove)

sapply(pkgs.to.remove, remove.packages, lib = path.lib)
sapply(pkgs.to.remove, install.packages, lib = path.lib)
Tea Tree
  • 882
  • 11
  • 26
  • Thanks for the response. I guess I'm just a bit confused as to what the dataframe is, considering all that I am doing is trying to install the package with this line: devtools::install_github('chris-mcginnis-ucsf/DoubletFinder') – L_Neuro Mar 18 '20 at 13:44