title: What is the difference between string and character in R?
body: <p>I'm not pretty familiar with R, but anyhow I'm writing a R wrapper for a c library. I come across this problem. How do I decide if the input argument is a string? In details,should I write like this:</p>
  
  <pre><code>dyn.load("hello.so")
  do_process &lt;- function(str) {
          if(!is.character(str))
              stop("not a character or string");
      result &lt;- .Call("hello", as.character(str))
      return result
  }
  </code></pre>
  
  <p>or this:</p>
  
  <pre><code>dyn.load("hello.so")
  do_process &lt;- function(str) {
          if(!is.string(str))
              stop("not a character or string");
      result &lt;- .Call("hello", as.string(str))
      return result
  }
  </code></pre>
  
  <p>Thanks.</p>