2017-6: k-mers
The term k-mer typically refers to all the possible substrings of length k that are contained in a string. In computational genomics, k-mers refer to all the possible subsequences (of length k) from a read obtained through DNA Sequencing. Write code that takes a character vector as its second argument and k (the substring length) as its first argument and returns a vector of the k-mers of the original string.
Examples
Implementation
You can also run the tests via ⌘/shift + enter