-
Notifications
You must be signed in to change notification settings - Fork 97
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
Problem with metaMDS and large input file #152
Comments
You may not tell us all relevant details of your environment. You say that "R backend will shut down" -- so what is your front-end? (R Studio, Rcmdr, emacs?). When starting a session directly from a command shell ( |
Sorry, here are the details. I use to use Rkward and in such case, it crashes (see reported bug, but people there think this is vegan's problem), in console (
The R binary is from openSUSE repository. |
I cannot reproduce your problem, and you do not provide a reproducible example. Please (1) provide a reproducible example, or (2) try without Here is what I get: > x <- matrix(runif(18*14000), nrow=18)
> m <- metaMDS(x, dist="man", k=2, try=2, auto =FALSE, noshare=FALSE,
step=FALSE, wascores=FALSE)
Run 0 stress 0.2533868
Run 1 stress 0.2808658
Run 2 stress 0.2556608 Runs smoothly and swiftly. |
Hello
Crashing this time
it works fine, so that the problem can be within the data. |
You can send the file to my email address. I will run tests and delete file. Have you run |
Well, it doesn't seem to be very useful... |
I confirm this as a bug in vegan. The underlying problem is that your data are badly scaled, and Another problem you have is that your observations are not distinct. Despite large number of columns, your rows (species in this case) are duplicated, and NMDS is under-defined: there are several alternative solutions with zero-stress. You need more different species to be able to use NMDS . |
I know the data are little bit weird - I'm still struggling with it. Thank You for fixing and advice and I'm sorry it consumes Your time. |
No worries, mate. Bug reports are the only way of fixing bugs. Your data are badly scaled, but vegan should handle all valid data. It was good that you selected Manhattan distance, though: Euclidean distance would have been unstable certainly in vegan and when I last checked, also in |
Issue #152 in github reported a case where monoMDS seqfaulted with data sets where longest dissimilarities were ~2E85 and shortest about 2E22. This commit scales down dissimilarities with very long maxima. In pricinple, this should be handled within the FORTRAN code of monoMDS, but the current kluge seems to avoid the problem, too.
This is now fixed with 62fc1cb The fundamental problem is that your data are very badly scaled: dissimilarities in magnitude 2E22 are effectively zero and indicate identical observations! I anticipate problems with several R functions with that badly scaled data. Not necessarily crashes or obvious failures, but loss of accuracy in calculations. However, |
monoMDS needed to set a guard dissimilarity which is longer than observed dissimilarity, and this could fail if observed dissimilarities were huge (in the issue #152 dissimilarities were of magnitude 2e85), and this could crash monoMDS. Fixes issue #152 reported in github. (cherry picked from commit 62fc1cb)
metab.pos.root1.concat.mrbayes has over 14000 columns and 18 rows
R console does not produce any output, it just hangs.
When I force quit R window, I get:
The R backend will be shut down immediately. This means, you can not use any more functions that rely on it. I.e. you can do hardly anything at all, not even save the workspace (but if you're lucky, R already did that). What you can do, however, is save any open command-files, the output, or copy data out of open data editors.
I use openSUSE Linux R binary and vegan is compiled locally.
The text was updated successfully, but these errors were encountered: