text: user16558: I have an Excel sheet from the CRISPR library where I have sequences of gRNAs (with 30 nucleotides) in a column and I only need to keep the first 20 nucleotides for those gRNAs and delete the rest nucleotides. The column has 1000 rows that have 30 nucleotide gRNA sequences. How can I delete extra nucleotides using R
  
  user3541: You will need to "read" your data. There are packages that can read Excel files directly but I would save the data as csv first and then use read.csv(). The following would create a new column with your desired output:
  data_frame$new_col <- substring(data_frame$col_with_seqs, 1, 20)
  
  Alternatively you can just use Excel's LEFT() since your data is already in Excel:
  =LEFT(A1, 20)
  
  
original_text: 16558: <p>I have an Excel sheet from the CRISPR library where I have sequences of gRNAs (with 30 nucleotides) in a column and I only need to keep the first 20 nucleotides for those gRNAs and delete the rest nucleotides. The column has 1000 rows that have 30 nucleotide gRNA sequences. How can I delete extra nucleotides using R</p>
   3541: <p>You will need to &quot;read&quot; your data. There are packages that can read Excel files directly but I would save the data as csv first and then use <code>read.csv()</code>. The following would create a new column with your desired output:</p>
  <pre><code>data_frame<span class="math-container">$new_col &lt;- substring(data_frame$</span>col_with_seqs, 1, 20)
  </code></pre>
  <p>Alternatively you can just use Excel's <code>LEFT()</code> since your data is already in Excel:</p>
  <pre><code>=LEFT(A1, 20)
  </code></pre>
  