title: How to tell if there are single quote or double quote marks in a string in r
body: <p>How to tell if there are single quote or double quote marks in a string in r.</p>
  <p>Here is my object:</p>
  <pre><code>test_object_1 &lt;- &quot;test_1&quot;
  </code></pre>
  <p>I want to use <code>grepl('&quot;', test_object_1)</code> to see if there are quotes in the <code>test_object</code>.</p>
  <p>When I do so, I get this:</p>
  <pre><code>&gt; grepl('&quot;', test_object_1)
  [1] FALSE
  </code></pre>
  <p>I want it to say <code>TRUE</code>, not <code>FALSE</code>.</p>
  <p>Here is the single quote mark version</p>
  <pre><code>&gt; test_object_2 &lt;- 'test_2'
  &gt; 
  &gt; grepl(&quot;'&quot;, test_object_2)
  [1] FALSE
  </code></pre>
  <p>Please advise. Thanks.</p>