title: Generalized Inverse in R
body: <p>I can use <code>ginv</code> function from <code>MASS</code> library to get Moore-Penrose Generalisied Inverse of a matrix.</p>
  
  <pre><code>m &lt;- matrix(1:9, 3, 3)
  library(MASS)
  ginv(m)
  </code></pre>
  
  <p>In SAS we do have more than one function to get a generalized inverse of a matrix. SVD can be used to find the generalized inverse but again this is a Moore-Penrose. I wonder if there any function in R to get a generalized inverse of a matrix (which is not unique) other than Moore-Penrose Generalisied Inverse. Thanks in advance for your help and time.</p>
  
  <p><strong>Edit</strong></p>
  
  <p><strong>A generalized inverse of a matrix A is defined as any matrix G that
  satisfies the equation AGA = A.</strong></p>
  
  <p>This G is not a Moore-Penrose Generalisied Inverse so it is not unique. </p>