R multiple conditions in if statement
<p>I have read many of the if statement posts but have not been able to find an answer to my simple problem. 
I would like to create a new column in the data frame 'tester' based on a multiple condition if statement.</p>

<pre><code>tester&lt;- as.data.frame(matrix(data=c(seq(1,300,by=1.5)), ncol=4))

if (tester$V3&gt; 200 &amp;&amp; tester$V4&gt;250){tester[,5] &lt;- "one"} else tester$V5 &lt;-NA
</code></pre>

<p>This gives me NAs for the entire column even though the last 17 rows are TRUE for both cases and should be "one". What is happening here? Thank you for your help! </p>