| count_bases | R Documentation | 
This function takes a single argument, a DNA sequence as a character string, and counts the number of A's, C's, G's, and T's in the sequence. The counts are returned as a named vector.
count_bases(sequence)
sequence | 
 a character string containing a DNA sequence  | 
a named integer vector containing the counts of A's, C's, G's, and T's
sequence <- "ATCGAGCTAGCTAGCTAGCTAGCT"
count_bases(sequence)
# A  C  G  T
# 6  6  6  6
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.