title: Linear model with categorical variables in R
body: <p>I am trying to fit a lineal model with some categorical variables </p>
  
  <pre><code>model &lt;- lm(price ~ carat+cut+color+clarity)
  summary(model)
  </code></pre>
  
  <p>The answer is:</p>
  
  <pre><code>Call:
  lm(formula = price ~ carat + cut + color + clarity)
  
  Residuals:
       Min       1Q   Median       3Q      Max 
  -11495.7   -688.5   -204.1    458.2   9305.3 
  
  Coefficients:
               Estimate Std. Error t value Pr(&gt;|t|)    
  (Intercept) -3696.818     47.948 -77.100  &lt; 2e-16 ***
  carat        8843.877     40.885 216.311  &lt; 2e-16 ***
  cut.L         755.474     68.378  11.049  &lt; 2e-16 ***
  cut.Q        -349.587     60.432  -5.785 7.74e-09 ***
  cut.C         200.008     52.260   3.827 0.000131 ***
  cut^4          12.748     42.642   0.299 0.764994    
  color.L      1905.109     61.050  31.206  &lt; 2e-16 ***
  color.Q      -675.265     56.056 -12.046  &lt; 2e-16 ***
  color.C       197.903     51.932   3.811 0.000140 ***
  color^4        71.054     46.940   1.514 0.130165    
  color^5         2.867     44.586   0.064 0.948729    
  color^6        50.531     40.771   1.239 0.215268    
  clarity.L    4045.728    108.363  37.335  &lt; 2e-16 ***
  clarity.Q   -1545.178    102.668 -15.050  &lt; 2e-16 ***
  clarity.C     999.911     88.301  11.324  &lt; 2e-16 ***
  clarity^4    -665.130     66.212 -10.045  &lt; 2e-16 ***
  clarity^5     920.987     55.012  16.742  &lt; 2e-16 ***
  clarity^6    -712.168     52.346 -13.605  &lt; 2e-16 ***
  clarity^7    1008.604     45.842  22.002  &lt; 2e-16 ***
  ---
  Signif. codes:  0 ‘***’ 0.001 ‘**’ 0.01 ‘*’ 0.05 ‘.’ 0.1 ‘ ’ 1
  
  Residual standard error: 1167 on 4639 degrees of freedom
  Multiple R-squared:  0.9162,    Adjusted R-squared:  0.9159 
  F-statistic:  2817 on 18 and 4639 DF,  p-value: &lt; 2.2e-16
  </code></pre>
  
  <p>But I don't understand why the answers are with ".L,.Q,.C,^4, ...", something is wrong but I don't know what is wrong, I already tried with the function factor for each variable.</p>