title: Either/Or-Arguments in R functions
body: <p>I am still new in writing function in R. </p>
  
  <p>I try to write a function that requires:
  EITHER an argument "a", OR arguments "b" and "c" together.</p>
  
  <p>Additionally this function has some arguments with default values.</p>
  
  <p>How can I handle the either/or- arguments best. If "a" is provided
  I don't need "b" and "c" and vice versa, but at least one is needed.</p>
  
  <p>Furthermore "a" is a string (fruits like "Apple", "Pear" etc.) , while "b" and "c" are values. There is dataframe in the background where for each fruit the value "b" and "c" are defined. So using the function would either need a valid fruit (argument "a") or the values "b" and "c" itself.</p>
  
  <p>The function I started with:</p>
  
  <pre><code>f &lt;- function(a,b,c,d=1,e=2)
  </code></pre>