title: what is a vector of single characters
body: <p>I have the following function (from package seqinr):</p>
  
  <pre><code>translate(seq, frame = 0, sens = "F", numcode = 1, NAstring = "X", ambiguous = FALSE)
  </code></pre>
  
  <p>Shortly, it translates DNA sequences into protein sequences. I have problems with giving the seq argument. The documentation says:  </p>
  
  <pre><code>seq = the sequence to translate as a vector of single characters in lower case letters
  </code></pre>
  
  <p>I store the DNA sequence in a data.frame (named here seq):</p>
  
  <pre><code>seq &lt;- data.frame(geneSeq="ATGTGTTGGGCAGCCGCAATACCTATCGCTATATCTGGCGCTCAGGCTATCAGTGGTCAGAACACTCAAGCCAAAATGATTGCCGTTCAGACCGCTGCTGGTCGTCGTCAAGCTATGGAAATCATGAGGCAGACGAACATCCAGAATGCTGACCTATCGTTGCAAGCTCGAAGTAACCTTGAGAAAGCGTCCGCCGAGTTGACCTCACAGAACATGCAKAAGGTCCAAGCTATTGGGTCTATCCGAGCGGCTATCGGAGAAAGTATGCTTGAAGGTTCCTCAATGGACCGTATTAAGCGAGTCACAGAAGGACAGTTCATTCGGGAAGCCAATATGGTAACTGAGAACTATCGCCGTGACTACCAAGCAATCTTCGTACAGCAACTTGGTGGTACTCAAAGTGCTGCAAGTCAGATTGACGAAATCTATAAGAGCGAACAGAAACAGAAGAGTAAGCTACAGATGGTTCTGGACCCACTGGCTATCATGGGGTCTTCCGCTGCGAGTGCTTACGCATCCGATGCGTTCGACTCTAAGTTCACAACTAAGGCACCTATTGTTGCCGCTAAAGGAACCAAGACGGGGAGGTAA", stringsAsFactors=FALSE)
  </code></pre>
  
  <p>Every time I try to use the translate function, it returns the error:</p>
  
  <pre><code>Error in s2n(seq, levels = s2c("tcag")) : 
    sequence is not a vector of chars
  </code></pre>
  
  <p>I have tried the following, all give the above error:</p>
  
  <pre><code>trans&lt;- seqinr::translate(tolower(seq[1,1]))
  trans&lt;- seqinr::translate(stringr::str_split(tolower(seq[1,1]), pattern=""))
  trans&lt;- seqinr::translate(as.character(stringr::str_split(tolower(seq[1,1]), pattern="")))
  </code></pre>
  
  <p>How can I transform my DNA sequence in a vector of single characters?</p>