Stephen Grubb
2009-Dec-03 19:54 UTC
[R] corrupted matrix data.. sporadic result appears to be pairs of decimal numbers glommed together
Hello, We are occasionally getting matrix results that appear to be corrupted... here are the last several rows of an example. These are supposed to be floating point numbers. [25015,] 1.820848e-01-3.2090e-06i [25016,] 2.178046e-01-4.8140e-06i [25017,] 1.820848e-01-3.2090e-06i [25018,] 1.820848e-01-3.2090e-06i [25019,] 1.144594e-01-1.6657e-06i [25020,] 1.820848e-01-3.2090e-06i [25021,] -1.293271e-01+4.3889e-06i [25022,] 1.144594e-01-1.6657e-06i [25023,] 1.820848e-01-3.2090e-06i [25024,] 1.820848e-01-3.2090e-06i [25025,] 1.173487e-01-4.4415e-07i [25026,] 1.820848e-01-3.2090e-06i [25027,] 1.375304e-01-3.6167e-06i [25028,] 1.820848e-01-3.2090e-06i [25029,] -1.293271e-01+4.3889e-06i [25030,] 1.820848e-01-3.2090e-06i [25031,] 1.820848e-01-3.2090e-06i [25032,] 1.820848e-01-3.2090e-06i [25033,] 1.820848e-01-3.2090e-06i Any general idea what may be going on here? It is a sporadic problem... it occurs maybe 2% or 3% of the time when running this particular script on various data. I apologize for not including a pared-down example that reproduces the problem.... we are using an R script written elsewhere on large data sets. If someone wants more specifics please follow up. Steve Grubb
jim holtman
2009-Dec-03 22:56 UTC
[R] corrupted matrix data.. sporadic result appears to be pairs of decimal numbers glommed together
Those appear to be complex numbers; some place in your script you must be computing something that return a complex number. Do an str on the matrix to see what it says; see if it says this:> x.1[,1] [,2] [1,] 0.1820848-0.0000032i 0.1820848-0.0000032i [2,] 0.1820848-0.0000032i 0.1820848-0.0000032i> str(x.1)cplx [1:2, 1:2] 0.182-0i 0.182-0i 0.182-0i ...>If it does, look closely at your script. On Thu, Dec 3, 2009 at 2:54 PM, Stephen Grubb <Stephen.Grubb at jax.org> wrote:> Hello, > > We are occasionally getting matrix results that appear to be corrupted... here are the last several rows of an example. ?These are supposed to be floating point numbers. > > [25015,] ?1.820848e-01-3.2090e-06i > [25016,] ?2.178046e-01-4.8140e-06i > [25017,] ?1.820848e-01-3.2090e-06i > [25018,] ?1.820848e-01-3.2090e-06i > [25019,] ?1.144594e-01-1.6657e-06i > [25020,] ?1.820848e-01-3.2090e-06i > [25021,] -1.293271e-01+4.3889e-06i > [25022,] ?1.144594e-01-1.6657e-06i > [25023,] ?1.820848e-01-3.2090e-06i > [25024,] ?1.820848e-01-3.2090e-06i > [25025,] ?1.173487e-01-4.4415e-07i > [25026,] ?1.820848e-01-3.2090e-06i > [25027,] ?1.375304e-01-3.6167e-06i > [25028,] ?1.820848e-01-3.2090e-06i > [25029,] -1.293271e-01+4.3889e-06i > [25030,] ?1.820848e-01-3.2090e-06i > [25031,] ?1.820848e-01-3.2090e-06i > [25032,] ?1.820848e-01-3.2090e-06i > [25033,] ?1.820848e-01-3.2090e-06i > > Any general idea what may be going on here? > > It is a sporadic problem... it occurs maybe 2% or 3% of the time when running this particular script on various data. > > I apologize for not including a pared-down example that reproduces the problem.... we are using an R script written elsewhere on large data sets. ?If someone wants more specifics please follow up. > > Steve Grubb > ______________________________________________ > R-help at r-project.org mailing list > https://stat.ethz.ch/mailman/listinfo/r-help > PLEASE do read the posting guide http://www.R-project.org/posting-guide.html > and provide commented, minimal, self-contained, reproducible code. >-- Jim Holtman Cincinnati, OH +1 513 646 9390 What is the problem that you are trying to solve?