R: How to recode multiple values in dplyr? : <p>How can I make the following changes for multiple or all variables?</p>

<ul>
<li>change "yes" to 1</li>
<li>change "no" to 0</li>
<li>keep NAs</li>
</ul>

<p>I tried recode but it seems not to be appliable to dataframes.</p>
