title: r, assign an NA value to each row in my b column corresponding to NA in my a column
body: <p>i'm trying to assign an NA value to each row in my b column corresponding to NA in my a column. 
  The columns are in a data frame df.</p>
  
  <p>But when i do the following code, all my b column gets NA.</p>
  
  <p>What should i change ?</p>
  
  <pre><code>  for(i in 1:nrow(df)) 
  {
    row &lt;- df[i,]
    is.na(df$`a`) &lt;- (df$b  &lt;- NA)
  }
  </code></pre>