Conditional Replace Values : <p>I have a data set called NFL. I am trying to flag PlayType by "Sack", replace the NA in PlayerPosition with "QB", and then go back to normal. I can't figure out the code to make it happen. So far I have this which is wrong:</p>

<pre><code> NFL$PlayerPosition[NFL$PlayType == "Sack"] &lt;- "QB"
</code></pre>
