title: How to change multiple column values in R?
body: <p>I am trying to change some specific values in a column from 0 to 1 using dplyr. I'm working with a state park dataset and created a binary column (Swimming) for whether it has a beach / swimming. </p>
  
  <p>The code below is what I've tried so far:</p>
  
  <pre><code>data.frame %&gt;% mutate(Swimming = replace(Swimming, Park == c("Park1", "Park4", "Park8"), 1))
  </code></pre>
  
  <p>The code changed Park1$Swimming from 0 to 1, but not the other parks. This is a simplified version of the dataset; there are closer to 30 parks I'm trying to change the swimming column for. Thanks in advance for any help.</p>