title: how to assign some number to certain alphabet in R?
body: <blockquote>
  <p>this is the only code i can think of</p>
  </blockquote>
  <pre><code>matik=c(70, 25, 78, 90, 67, 77, 83, 99, 45, 76, 45, 24, 55, 70, 65, 75, 68,89,55,68)
  AB=c(71:80)
  B=c(66:70)
  BC=c(61:65)
  C=c(56:60)
  D=c(41:55)
  
  matik2&lt;-matik
  if(matik&gt;=81){
    print(&quot;A&quot;)
  }else if(matik==AB){
    print(&quot;AB&quot;)
  }else if(matik==B){
    print(&quot;B&quot;)
  }else if(matik==BC){
    print(&quot;BC&quot;)
  }else if(matik==C){
    print(&quot;C&quot;)
  }else if(matik==D){
    print(&quot;D&quot;)
  }else{
    print(&quot;E&quot;)
  }
  </code></pre>
  <p>and when i run the code the result would be like this</p>
  <pre><code>[1] &quot;E&quot;
  Warning messages:
  1: In if (matik &gt;= 81) { :
    the condition has length &gt; 1 and only the first element will be used
  2: In if (matik == AB) { :
    the condition has length &gt; 1 and only the first element will be used
  3: In if (matik == B) { :
    the condition has length &gt; 1 and only the first element will be used
  4: In if (matik == BC) { :
    the condition has length &gt; 1 and only the first element will be used
  5: In if (matik == C) { :
    the condition has length &gt; 1 and only the first element will be used
  6: In matik == D :
    longer object length is not a multiple of shorter object length
  7: In if (matik == D) { :
   
  </code></pre>
  <blockquote>
  <p>ps. i am still new to R programming so i dont really many code. can you help me to find solution  to this problem</p>
  </blockquote>