title: How to test when condition returns numeric(0) in R
body: <p>Let's imagine you would like to construct a simple test based on the condition <code>setdiff(input, 1:9)</code>.</p>
  
  <p>How can I construct an </p>
  
  <pre><code>if isnotempty(setdiff(input, 1:9)) stop ("not valid") 
  </code></pre>
  
  <p>statement which stops execution when input is <code>c(3, 12)</code> but continues when input is <code>c(2,5,7)</code> say?
  Many thanks,
  Bertie</p>