title: How to differentiate between character and vector of character in R
body: <p>I am quite new to R and its intricacies. I have a situation wherein I have to differentiate whether the user keyed in a value to a variable as character or as a vector of characters. What condition can I use to differentiate between the following syntax provided below?</p>
  
  <pre><code>c1 &lt;- "text"
  c2 &lt;- c("text")
  </code></pre>
  
  <p>Type of c1 and c2 returns <code>character</code> and <code>c1 == c2</code> returns <code>TRUE</code>. Does R treat both (c1 and c2) to be inherently same or does it give a workaround to indicate they are different and if so how?</p>