Learn R Programming

zoomerjoin (version 0.2.2)

hamming_distance: Calculate Hamming distance of two character vectors

Description

Calculate Hamming distance of two character vectors

Usage

hamming_distance(a, b, nthread = NULL)

Value

a vector of hamming similarities of the strings

Arguments

a

the first character vector

b

the first character vector

nthread

Maximum number of threads to use. If NULL (default), Rayon's global thread pool is used, which typically uses all logical CPU cores available.

Examples

Run this code
hamming_distance(
  c("ACGTCGATGACGTGATGCGTAGCGTA", "ACGTCGATGTGCTCTCGTCGATCTAC"),
  c("ACGTCGACGACGTGATGCGCAGCGTA", "ACGTCGATGGGGTCTCGTCGATCTAC")
)

Run the code above in your browser using DataLab