title: R: ifelse on string
body: <p>I am populating a new variable of a dataframe, based on string conditions from another variable. I receive the following error msg: </p>
  
  <p><code>Error in Source == "httpWWW.BGDAILYNEWS.COM" | Source ==  : 
    operations are possible only for numeric, logical or complex types</code></p>
  
  <p>My code is as follows:</p>
  
  <p><code>County &lt;- ifelse(Source == 'httpWWW.BGDAILYNEWS.COM' | 'WWW.BGDAILYNEWS.COM', 'Warren',
  ifelse(Source == 'httpWWW.HCLOCAL.COM' | 'WWW.HCLOCAL.COM', 'Henry',
  ifelse(Source == 'httpWWW.KENTUCKY.COM' | 'WWW.KENTUCKY.COM', 'Fayette',
  ifelse(Source == 'httpWWW.KENTUCKYNEWERA.COM' | 'WWW.KENTUCKYNEWERA.COM', 'Christian')
  )))</code></p>