Learn R Programming

covfefe (version 1.0.0)

qwerty_distance: Calculate QWERTY distance between two keys

Description

Uses Euclidean distance based on key positions.

Usage

qwerty_distance(key1, key2)

Value

Numeric distance

Arguments

key1

Character. First key (single lowercase letter)

key2

Character. Second key (single lowercase letter)

Examples

Run this code
qwerty_distance("a", "s")  # Adjacent = 1
qwerty_distance("a", "p")  # Far apart

Run the code above in your browser using DataLab