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

as.qmatrix is not working with R version >= 4 #29

Open
haneenih7 opened this issue Jun 2, 2023 · 1 comment
Open

as.qmatrix is not working with R version >= 4 #29

haneenih7 opened this issue Jun 2, 2023 · 1 comment

Comments

@haneenih7
Copy link

Hello developers,

The "as.qmatrix" function in tess3r is not working in R version 4 and above (I tested it in R 3.5.2 and it worked fine)

as.qmatrix(q4)
Error in if (class(Q) != "matrix") Q <- as.matrix(Q) : 
  the condition has length > 1

This issue because there was a change in R 4.0.0 and above, matrix objects now also inherit from class "array"

class(qq4)
[1] "matrix" "array" 

It should be giving only "matrix" so the as.qmatrix function would work.

I wonder how to solve this issue? I think this should be solved by updating the as.qmatrix function in the package.

Thanks a lot!

@francoio
Copy link
Collaborator

francoio commented Jun 3, 2023

hi,
thanks for reporting the error. The "as.qmatrix" function was modified in order to fix this issue.
best wishes
olivier

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