Skip to contents

Calculate Hamming distance of two character vectors

Usage

hamming_distance(a, b)

Arguments

a

the first character vector

b

the first character vector

Value

a vector of hamming similarities of the strings

Examples

hamming_distance(
  c("ACGTCGATGACGTGATGCGTAGCGTA", "ACGTCGATGTGCTCTCGTCGATCTAC"),
  c("ACGTCGACGACGTGATGCGCAGCGTA", "ACGTCGATGGGGTCTCGTCGATCTAC")
)
#> [1] 2 2