2022-1: Counting DNA Nucleotides?
This problem was inspired by Counting DNA Nucleotides found on the excellent bioinformatics website rosalind.info.
Write code that:
- takes an argument that is a character vector or scalar representing a DNA string (whose alphabet contains the symbols "A", "C", "G", and "T").
- returns a 4-element numeric vector containing the counts of each symbol "A", "C", "G", and "T" respectively.
Examples
Implementation
You can also run the tests via ⌘/shift + enter