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

Error message: "No layout function defined for objects of class <matrix>" #27

Closed
srinivasbalachander opened this issue May 14, 2023 · 2 comments

Comments

@srinivasbalachander
Copy link

Hello Sid,

Greetings - thanks for your great package!

Everything was working fine till today - I updated my R version (to 4.3.0) and all packages.

I now keep getting this error message, for all examples/vignettes that you've provided.

brainconn(atlas ="schaefer300_n7", conmat=example_unweighted_undirected, view="ortho")
Error in handlers[[1L]]():
! No layout function defined for objects of class
Run rlang::last_trace() to see where the error occurred.

I think there's an issue with create_layout from ggraph, which for some reason takes data.frame objects but not matrices.

I tried modifying your build_plot function, in the lines with the create_layout function, I added as.data.frame(conmat) - things worked fine after that.

Hope this is helpful!

Best regards,

Srinivas B

@sidchop
Copy link
Owner

sidchop commented May 23, 2023

Hi Srinivas - sorry for the delay. The latest PR should have fixed this error.

@sidchop sidchop closed this as completed May 23, 2023
@ntcnv
Copy link

ntcnv commented Jan 17, 2024

Hello. I followed that strategy too to manage with the same error. But unfortunately I am still figthting to find out a solution. I do not know whether something went wrong during installation, but I do not what to do. Could you please help me out? Do you have some recomandations to follow before installing, some argument to specify and that you suggest, just to make sure I made the fine process?

When I installed the package I used the following options

remotes::install_github("sidchop/brainconn", force = TRUE,
build_vignettes = TRUE, build = FALSE)

but if after installation I run the help() of function with ?brainconn I can see
image

I cannot understand what it is going wrong

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

3 participants