title: R-lang: remove first character if equal to quotation mark
body: <p>R newbie. I am trying to remove the, " from the beginning and end of a line in a dataframe. I do not want to remove if the quotation is not the first or last character. I'm not sure why the following is not working on my dataframe of data, where each line is a datapoint of text.</p>
  
  <p>The quotations are not due to being a character string, but are a part of the text.</p>
  
  <p>a line of the dataframe looks something like this:</p>
  
  <pre><code>x&lt;-  '"hello world. She said, "hello again" it was a pleasant response"'
  </code></pre>
  
  <p>result should be:</p>
  
  <pre><code>x2 &lt;- 'hello world. She said, "hello again" it was a pleasant response"'
  </code></pre>
  
  <p>I thought that this would work: </p>
  
  <pre><code>gsub("\\n\"", "", df)
  </code></pre>
  
  <p>but, this doesn't work. Suggestions? </p>