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: number of labels must equal number of states in the alphabet #68

Closed
loxavia opened this issue Apr 5, 2023 · 4 comments
Closed

Comments

@loxavia
Copy link

loxavia commented Apr 5, 2023

I am getting this error on plots that were perfectly plotting before and that seems to happen with different versions of the package and different R installations.

mssplot(mhmm_fit_3cl$model, plots = "both", type = "I", sortv = "mds.hidden")

Error:
[!] number of labels must equal number of states in the alphabet

@helske
Copy link
Owner

helske commented Apr 5, 2023

This might be due to some recent changes in TraMineR, but it's bit difficult to know the exact cause of the error as for example mssplot(mhmm_biofam, plots = "both", type = "I", sortv = "mds.hidden") does not throw errors on my end. Can you provide reproducible example?

@loxavia
Copy link
Author

loxavia commented Apr 5, 2023

Thank you for the rapid response, I can send it privately, since the data can't be shared publicly,
Here is my email mohammed.saqr@uef.fi if you don't want to share the email here.

@helske
Copy link
Owner

helske commented Apr 5, 2023

Thanks, you can send it to jouni.helske@iki.fi.

helske added a commit that referenced this issue Apr 5, 2023
@helske
Copy link
Owner

helske commented Apr 5, 2023

The issue was due to changes in hidden_paths which now respects void symbols by default (see #58), but mssplot failed with the default respect_void = TRUE. I just pushed a fix which seems to work at least in your example. Let me know if you encounter further problems.

@helske helske closed this as completed Apr 5, 2023
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