Description Usage Arguments Value See Also

This is the function `lsqnonneg`

from the package `pracma`

,
I just changed `qr.solve`

into using Moore-Penrose inverse instead
(`ginv`

from `MASS`

) as `qr.solve`

crashes for
some singular inputs. Now it won't crash but it's sometimes running for very long
time (forever?), presumably with those problematic inputs. After too many steps
the function halts and lies that the fit was terrible. I don't think this will
cause problems.

1 |

`C` |
The matrix. |

`d` |
The vector. |

`iteration_multiplier` |
The definition of "too many steps". Default value is |

A vector (`x`

) and the error (`resid.norm`

).

Embedding an R snippet on your website

Add the following code to your website.

For more information on customizing the embed code, read Embedding Snippets.