title: Factorization removed from variables with addition of new code
body: <p>I am working on subsetting factorizing variables in a dataset. However, when I move on to a different variable, the factorization of the variable I just worked on seems to be removed. How do I write the code so that all of the variables are permanently factorized? </p>
  
  <p>I created a test dataset to see if the problem was with the data I was working with, but the problem occurred in the test dataset as well: </p>
  
  <p>[Code][1]</p>
  
  <pre><code>rTestDataSet = subset(TestDataSet, TestDataSet$Height &lt; 5)
  rTestDataSet$Height = as.factor(rTestDataSet$Height)
  levels(rTestDataSet$Height) = c("Small", "Medium", "Large", "Massive")
  summary(rTestDataSet$Height)
  rTestDataSet = subset(TestDataSet, TestDataSet$Weight &lt; 5)
  summary(rTestDataSet$Height)
  </code></pre>