title: Modifying the names of factors in logistic regression
body: <p>Let me start by presenting an example data.</p>
  
  <pre><code>set.seed(1)
  x1=rnorm(10)
  y=as.factor(sample(c(1,0),10,replace=TRUE))
  x2=sample(c('Young','Middle','Old'),10,replace=TRUE)
  model1 &lt;- glm(y~as.factor(x1&gt;=0)+as.factor(x2),binomial)
  </code></pre>
  
  <p>When I enter <code>summary(model1)</code>, I get</p>
  
  <pre><code> Estimate Std. Error z value Pr(&gt;|z|)
  (Intercept)              -0.1835     1.0926  -0.168    0.867
  as.factor(x1 &gt;= 0)TRUE    0.7470     1.7287   0.432    0.666
  as.factor(x2)Old          0.7470     1.7287   0.432    0.666
  as.factor(x2)Young       18.0026  4612.2023   0.004    0.997
  </code></pre>
  
  <p><strong>Please ignore the model estimates as such now since the data is fake</strong> <br/>
  Is there a way in R to change the names of the estimates appearing on the leftmost column so that they look clearer? E.g. removing the as.factor, and putting an<code>_</code> before the factor level. The output should be as follows:</p>
  
  <pre><code>                Estimate Std. Error z value Pr(&gt;|z|)
  (Intercept)      -0.1835     1.0926  -0.168    0.867
  (x1 &gt;= 0)_TRUE    0.7470     1.7287   0.432    0.666
  (x2)_Old          0.7470     1.7287   0.432    0.666
  (x2)_Young       18.0026  4612.2023   0.004    0.997
  </code></pre>