title: More efficient way for modifying values across multiple lines with dplyr
body: <p>After learning the basics of data transformation in R, I'm practising now on a a dataset. I do have four variables with the same values and I want to modify the numeric values into character strings. I found the function case_when() on this website and applied that to each column, but I would really like to do that faster.</p>
  
  <p>The data looks like that:</p>
  
  <pre><code> climate_change air_quality water_polution trash
              &lt;dbl&gt;       &lt;dbl&gt;          &lt;dbl&gt; &lt;dbl&gt;
   1              3           2              2     1
   2              3           3              3     3
   3             NA          NA             NA    NA
   4             NA          NA             NA    NA
   5              1           1              1     1
   6              2           1              4     2
   7              2           3              3     2
   8             NA          NA             NA    NA
   9              3           3              2     2
  10             NA          NA             NA    NA
  </code></pre>
  
  <p>And I used this code:</p>
  
  <pre><code>dataset &lt;- dataset %&gt;%
    mutate(climate_change = case_when(
      climate_change %in% c(1) ~ "A very serious problem",
      climate_change %in% c(2) ~ "A somewhat serious problem",
      climate_change %in% c(3) ~ "Not a very serious problem",
      climate_change %in% c(4) ~ "Not at all a serious problem"),
      air_quality = case_when(
        air_quality %in% c(1) ~ "A very serious problem",
        air_quality %in% c(2) ~ "A somewhat serious problem",
        air_quality %in% c(3) ~ "Not a very serious problem",
        air_quality %in% c(4) ~ "Not at all a serious problem"),
      water_polution = case_when(
        water_polution %in% c(1) ~ "A very serious problem",
        water_polution %in% c(2) ~ "A somewhat serious problem",
        water_polution %in% c(3) ~ "Not a very serious problem",
        water_polution %in% c(4) ~ "Not at all a serious problem"),
      trash = case_when(
        trash %in% c(1) ~ "A very serious problem",
        trash %in% c(2) ~ "A somewhat serious problem",
        trash %in% c(3) ~ "Not a very serious problem",
        trash %in% c(4) ~ "Not at all a serious problem"))
  </code></pre>
  
  <p>In addition to the four values (1-4) these variables have two types of missing values (88, 99). I have left out the missing values in the case_when() function as these seem to be coded into NA automatically. But are there any downsides in not specifically code these values into NA?</p>
  
  <p>Greetings</p>