Extract text after a symbol in R
<pre><code>sample1 = read.csv("pirate.csv")
sample1[,7] 
[1] &gt;&gt;xyz&gt;&gt;hello&gt;&gt;mate 1
[2] &gt;&gt;xyz&gt;&gt;hello&gt;&gt;mate 2
[3] &gt;&gt;xyz&gt;&gt;mate 3
[4] &gt;&gt;xyz&gt;&gt;mate 4
[5] &gt;&gt;xyz&gt;&gt;hello&gt;&gt;mate 5
[6] &gt;&gt;xyz&gt;&gt;hello&gt;&gt;mate 6
</code></pre>

<p>I have to extract and create an array which contains all the words after last <code>&gt;&gt;</code>.</p>

<p>How to do this?</p>

<p>Also, How can I extract (a) o qwerty, (b) mate1 and (c) pirate1 in different variables from the following string</p>

<pre><code>p= '&gt;&gt;xyz- o qwerty&gt;&gt;hello&gt;&gt;mate1&gt;&gt;sole pirate1'
</code></pre>

<p>Thanks</p>