Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

invalid class “splrMatrix” object: superclass "mMatrix" not defined in the environment of the object's class #64

Closed
youngser opened this issue Mar 30, 2024 · 3 comments
Assignees

Comments

@youngser
Copy link
Collaborator

youngser commented Mar 30, 2024

Here is an error I'm getting with center_graph:

> A <- sample_correlated_gnp_pair(n = 10, corr = .5, p = .5)$graph1
> center_graph(A, scheme = "center")
Error in validObject(.Object) : 
  invalid class “splrMatrix” object: superclass "mMatrix" not defined in the environment of the object's class

and I got a similar error with gm:

> AB <- sample_correlated_gnp_pair(n = 10, corr = .5, p = .5)
> A = AB$graph1
> B = AB$graph2
> gm(A, B)
Error in validObject(.Object) : 
  invalid class “splrMatrix” object: superclass "mMatrix" not defined in the environment of the object's class

and this:

> gm(A, B, start='convex')
Error in validObject(.Object) : 
  invalid class “splrMatrix” object: superclass "mMatrix" not defined in the environment of the object's class

Maybe this is not directly related, but this option also gives an error:

> gm(A, B, start='rds_perm_bari')
Error in rds_perm_bari_start(nns, ns, soft_seeds, ...) : 
  unused arguments (A = new("dgCMatrix", i = c(2, 4, 5, 6, 9, 2, 3, 4, 5, 7, 8, 9, 0, 1, 3, 5, 6, 8, 1, 2, 4, 5, 6, 7, 0, 1, 3, 5, 8, 0, 1, 2, 3, 4, 6, 7, 9, 0, 2, 3, 5, 7, 1, 3, 5, 6, 8, 1, 2, 4, 7, 9, 0, 1, 5, 8), p = c(0, 5, 12, 18, 24, 29, 37, 42, 47, 52, 56), Dim = c(10, 10), Dimnames = list(NULL, NULL), x = c(1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1), factors = list()), B = new("dgCMatrix", 
    i = c(2, 4, 5, 7, 9, 2, 3, 4, 5, 7, 9, 0, 1, 3, 6, 7, 8, 1, 2, 6, 7, 9, 0, 1, 5, 6, 8, 9, 0, 1, 4, 6, 2, 3, 4, 5, 7, 9, 0, 1, 2, 3, 6, 9, 2, 4, 9, 0, 1, 3, 4, 6, 7, 8), p = c(0, 5, 11, 17, 22, 28, 32, 38, 44, 47, 54), Dim = c(10, 10), Dimnames = list(NULL, NULL), x = c(1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1), factors = list()))

Here is my R environment.

> sessionInfo()
R version 4.3.2 (2023-10-31)
Platform: aarch64-apple-darwin20 (64-bit)
Running under: macOS Sonoma 14.2.1

Matrix products: default
BLAS:   /Library/Frameworks/R.framework/Versions/4.3-arm64/Resources/lib/libRblas.0.dylib 
LAPACK: /Library/Frameworks/R.framework/Versions/4.3-arm64/Resources/lib/libRlapack.dylib;  LAPACK version 3.11.0

locale:
[1] en_US.UTF-8/en_US.UTF-8/en_US.UTF-8/C/en_US.UTF-8/en_US.UTF-8

time zone: America/New_York
tzcode source: internal

attached base packages:
[1] stats     graphics  grDevices utils     datasets  methods   base     

other attached packages:
[1] iGraphMatch_2.0.3

loaded via a namespace (and not attached):
 [1] compiler_4.3.2  magrittr_2.0.3  Matrix_1.6-5    cli_3.6.2       igraph_2.0.3   
 [6] glue_1.6.2      Rcpp_1.0.11     grid_4.3.2      lifecycle_1.0.4 pkgconfig_2.0.3
[11] rlang_1.1.2     lattice_0.22-5   
@dpmcsuss
Copy link
Owner

dpmcsuss commented Apr 3, 2024

Can you try updating to iGraphMatch 2.0.4?

@youngser
Copy link
Collaborator Author

youngser commented Apr 6, 2024

It's better except the last one, which still gives the same error !?
Thanks!

@dpmcsuss
Copy link
Owner

dpmcsuss commented Apr 9, 2024

Ahh, that is actually a bug. You can avoid it for now using start <- init_start(nns = 10, start = 'rds_perm_bari') and then setting start = start in the gm call.

I'll have to fix this though.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants