sidchop / brainconn

Brainconn - an R package for visualising brain connectivity data in 2D and interactive 3D
https://sidchop.github.io/brainconn/articles/brainconn.html
Other
47 stars 7 forks source link

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

Closed srinivasbalachander closed 1 year ago

srinivasbalachander commented 1 year ago

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 commented 1 year ago

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

ntcnv commented 10 months ago

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