-
Notifications
You must be signed in to change notification settings - Fork 4
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 in Ops.factor(Var1, Var2) : level sets of factors are different #7
Comments
Hi, Thanks you for bringing up your issue. It looks like a conflict or incompatibility between your population name and the code. How do you name your populations at the beginning (in read.Genepop or read.Structure)? If you are using numbers (e.g., pop.names = c("1","2","3")), try letters instead. (e.g, pop.names = c("A","B","C")). Please let me know if it helps. Thanks. |
I am having the same issue using version 1.1.6. my I pulled the source code for the function to run it line by line to see where the hangup is. It happens in this line
using ordered instead of levels to get the factor levels set seems to be able to deal with the fact that the predicted population can end up "missing" a level (e.g. I have four source population but they are only assigned to three causing the error) because even if a population name isn't in the vector the factor level is preserved. |
Hi Shannon, Thank you for reporting the issue. I see what you're saying. I have updated the function and package to v1.1.7. I adopted the code from previous version and made some changes. It worked for my small test data. Please update your package and let me know if it works for you or not. Thanks!! Alex |
I also came across another "bug" (it might just be something to explicitly add to the documentation). I was running baseline assessments using a non-genetic data set and got an error involving
It might be helpful to explicitly add this to the documentation. |
Thanks for your suggestions. I have added some text in our tutorial page at prepare non genetic data section, as well as in the example page regarding the factor data type issue. |
I used version1.1.5 installed from assignPOP-1.1.5.tar.gz. I meet following error:
Monte-Carlo cross-validation done!!
60 assignment tests completed!!
The text was updated successfully, but these errors were encountered: