R: Update model by changing modeling function
<p>I have a <code>gls</code> model in R. I want to update it in two ways: </p>

<ol>
<li><p>Adding predictors</p></li>
<li><p><strong>Changing the function from <code>gls</code> to <code>lm</code>.</strong></p></li>
</ol>

<p>The <code>update()</code> function obviously works just fine with #1, but <strong>is there a way to update a model to change the fitting function itself???</strong></p>

<p>For example: 
I want to change <code>gls(y ~ x)</code> to <code>lm(y ~ x + z)</code>. </p>

<p>Note: 
The <code>update</code> approach is necessary b/c this process is going into a function that will have greatly different input models, so simply copying the model arguments seems difficult to implement. </p>