Skip to content

The package or namespace load for 'ANCOMBC' failed: 'namespace:CVXR' does not export the 'solve' object. #332

Description

@0in0the0clouds0yl

Problem Description

An error occurred when loading the ANCOMBC package, indicating that there is no exported object named 'solve' in the CVXR namespace.

Error Message ```r

library(ANCOMBC)

Error: package or namespace load failed for ‘ANCOMBC’:

The object 'solve' is not exported from 'namespace:CVXR'

Running environment
R version: [4.3.3]
ANCOMBC version: [2.8.1]
CVXR version: [1.8.1]
Operating system: [Windows]

The attempted solutions
Option A
#1. Reinstall CVXR remove.packages("CVXR")
install.packages("CVXR")

2. Update all dependencies update.packages(ask = FALSE)

3. Reinstall ANCOMBC from Bioconductor if (! require("BiocManager", quietly = TRUE))

install.packages("BiocManager")
BiocManager::install("ANCOMBC", force = TR)

#4.library(ANCOMBC)

Error: package or namespace load failed for ‘ANCOMBC’:

The object 'solve' is not exported from 'namespace:CVXR'

Option B

Temporarily downgrade CVXR to the older version with solve export functionality.

install.packages("https://cran.r-project.org/src/contrib/Archive/CVXR/CVXR_1.0-XX.tar.gz",
repos = NULL, type = "source")

Warning in install.packages :
cannot open URL 'https://cran.r-project.org/src/contrib/Archive/CVXR/CVXR_1.0-XX.tar.gz': HTTP status was '404 Not Found'
Error in download.file(p, destfile, method, mode = "wb", ...) :
Failed to open the URL'https://cran.r-project.org/src/contrib/Archive/CVXR/CVXR_1.0-XX.tar.gz'

Option C

1.install.packages("Matrix") # The "solve" function might also rely on the Matrix package

2.library(conflicted)

conflict_prefer("solve", "Matrix")
[conflicted] Will prefer Matrix::solve over any other package.
#3.library(ANCOMBC)
Error: package or namespace load failed for ‘ANCOMBC’:
The object 'solve' is not exported from 'namespace:CVXR'

Before upgrading the R version, ANCOMBC was functioning properly. Is it necessary to downgrade the R version?

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions