title: How to create categorical variables from text values in R
body: <p>I have a data set with a categorical variable <code>Weather</code>. This variable has 3 different text values i.e. "Dry", "Drizzle" and "Rain".</p>
  
  <p>I want to create another variable to which I can assign numeric values for these variables. For example <code>Dry</code> will be <code>1</code>, <code>Drizzle</code> will be <code>2</code> and <code>Rain</code> will be <code>3</code>.</p>
  
  <p>As a side information, the <code>weather</code> variable will be used to predict blockage in water systems, so I will use this in some sort of linear regression model. </p>