title: How to convert factor Rle to order perserved string list? R
body: <p>Ok so I have an object and I recovered a factor-RLE that looks sort of like this:</p>
  <pre><code>x &lt;- rle(c(1,1,1,2,2,3,4,4,4))
  </code></pre>
  <p>and I would want to do something to <code>x</code> such that this returned:</p>
  <pre><code>1 1 1 2 2 3 4 4 4
  </code></pre>
  <p>My example is a little more complex as my object looks like this:</p>
  <pre><code>factor-Rle of length 622253 with 50 runs
    Lengths: 32201 28715 22210 25478 20264 19072 15278 12130 14763 12299 13659 16494 ...
    Values :     +     -     +     -     +     -     +     -     +     -     +     - ...
  Levels(3): + - *
  </code></pre>
  <p>because the original object has 62090 elements, and each element has &gt;=1 entry that has a value, +, -, or *</p>
  <p>In this example, I want to know how can I recover the values (+, -, or *) in the same order they appear.</p>
  <p>This would be more reproducible example:</p>
  <pre><code>if (!require(&quot;BiocManager&quot;))
  install.packages(&quot;BiocManager&quot;)
  BiocManager::install(&quot;GenomicRanges&quot;)
  library(GenomicRanges)
  
  gr &lt;- GRanges(seqnames = Rle(c(&quot;chr1&quot;), c(3)), ranges = IRanges(c(1, 13, 22), width=c(12, 6, 6)), strand = &quot;+&quot;)
  gr2 &lt;- GRanges(seqnames = &quot;chr1&quot;, ranges = IRanges(c(15, 30), width=c(15, 6)), strand = &quot;+&quot;)
  gr3 &lt;- GRanges(seqnames = &quot;chr1&quot;, ranges = IRanges(c(34, 40, 58), width=c(2, 7, 7)), strand = &quot;-&quot;)
  gr4 &lt;- GRanges(seqnames = &quot;chr1&quot;, ranges = IRanges(c(80, 92, 105,140), width=c(5,3,9,15)), strand = &quot;+&quot;)
  </code></pre>
  <p>And, from this, I want to get an object that contains:</p>
  <pre><code>+ + - +
  </code></pre>
  <p>Once again, my attempted leads me to the factor Rle object:</p>
  <pre><code>&gt; grl@unlistData@strand
  factor-Rle of length 12 with 3 runs
  Lengths: 5 3 4
  Values : + - +
  Levels(3): + - *
  </code></pre>