HAMM: Counting Point Mutations | Ben Cunningham

# HAMM: Counting Point Mutations

Problem by Rosalind · on July 1, 2012

Given two strings $s$ and $t$ of equal length, the Hamming distance between $s$ and $t$, denoted $d_{\mathrm{H}}(s, t)$, is the number of corresponding symbols that differ in $s$ and $t$. See Figure 2.

Given: Two DNA strings $s$ and $t$ of equal length (not exceeding 1 kbp).

Return: The Hamming distance $d_{\mathrm{H}}(s, t)$.

## Sample Dataset

GAGCCTACTAACGGGAT
CATCGTAATGACGGCCT


## Sample Output

7


# R

library(readr)
library(magrittr)

f <- "hamm.txt"
dna <-

7