-
Notifications
You must be signed in to change notification settings - Fork 5
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
MDSJWrapper fails to scan distance matrix #37
Comments
I have managed to trace the problem. It is caused by the Java VM, because it is using my locale settings and the scanner function does not recognize commas as decimal separators. (Instead it would expect periods) |
ah ha! thank you! this probably explains #29 , which I haven't been otherwise able to reproduce. Were you also seeing the error message from MDSJ layout? |
Yes, the output looks like this:
My temporary solution was to trace edit network.layout.animate.MDSJ 45 command = paste("java -cp ", paste(mdsj.path, file.path(mdsj.path,
46 "mdsj.jar"), sep = sep), "MDSJWrapper", n, dim, verbosity,
47 max_iter, filename, coord.file) to: 45 command = paste("java -Duser.language=en -cp ", paste(mdsj.path, file.path(mdsj.path,
46 "mdsj.jar"), sep = sep), "MDSJWrapper", n, dim, verbosity,
47 max_iter, filename, coord.file) But in the long term, scanner.useLocale(Locale.US); could be the best option to fix in the MDSJWrapper class. My another attempt was to set the JAVA_TOOL_OPTIONS global environment variable in Windows to apply "-Duser.language=en" for java runs globally. But it outputs a "Picked up JAVA_TOOL_OPTIONS: -Duser.language=en” line before every java execution, and that was messing up the MDSJWrapper output (even if the coordinates were good, the added line offset the whole output, and the R parser could not handle it). This means, that in situations, when the JAVA_TOOL_OPTIONS or _JAVA_OPTIONS environment variables are set, the R parser will fail to read the output correctly. And there may be plenty of situations, when something sets those environment variables: https://www.google.com/search?q=picked+up+java_tool_options |
Greetings,
I do have some problem with the network.layout.animate.MDJS(). Even if the output to the MDSJWrapper.class should be valid with a layout.distance() generated matrix, the MDSJWrapper outputs "distance matrix is missing entries?" for all entries, and the layout output coords will be random.
To reproduce, just use the example in the Statnet tutorial (https://statnet.github.io/Workshops/ndtv_workshop.html#adjusting-spacing-of-isolates-and-components):
It will not result the desired output, instead just a random layout.
Version info:
The text was updated successfully, but these errors were encountered: