Skip to content
Prev 326706 / 398502 Next

Sparse matrix no longer sparse (Matrix Package)

Thank you, John. I originally used dput() but the output is huge. However, here is a reproducible example of what I think very unexpected behavior of some matrix functions.
Error in Cholesky(as(A, "symmetricMatrix"), perm = perm, LDL = LDL, super = super,  : 
  error in evaluating the argument 'A' in selecting a method for function 'Cholesky': Error in asMethod(object) : 
  not a symmetric matrix; consider forceSymmetric() or symmpart()

### For fun try this
Error in asMethod(object) : 
  not a symmetric matrix; consider forceSymmetric() or symmpart()

### This does indeed work, but should I need to implement this step?

Cholesky(forceSymmetric(A %*% D))

So, there is something about changing the elements of a ddi matrix that causes subsequent problems. Is there a good reason this occurs and something I should be doing differently, or is this a bug?

Thanks

-----Original Message-----
From: John Kane [mailto:jrkrideau at inbox.com] 
Sent: Thursday, July 11, 2013 10:57 AM
To: Doran, Harold; r-help at r-project.org
Subject: RE: [R] Sparse matrix no longer sparse (Matrix Package)

The message got through but not the attachment. The R help list tends to strip off attachements for security reasons.  Files of types  txt, png, & pdf should get through.

In most cases the accepted method of sending data is to use the dput() function to output a file in the console and then copy and paste the results into your email.

So for file "dat1" one would just use dput(dat1) and paste the results into an email. 

John Kane
Kingston ON Canada