salt: Salt vectors with common data problems

Description Usage Arguments Details Functions

Description

These are easy-to-use wrapper functions that call either salt_insert (for including new characters) or salt_replace (for salting that requires replacement of specific characters) with sane defaults.

Usage

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
salt_punctuation(x, p = 0.2, n = 1)

salt_letters(x, p = 0.2, n = 1)

salt_whitespace(x, p = 0.2, n = 1)

salt_digits(x, p = 0.2, n = 1)

salt_ocr(x, p = 0.2, rep_p = 0.1)

salt_capitalization(x, p = 0.1, rep_p = 0.1)

salt_decimal_commas(x, p = 0.1, rep_p = 0.1)

Arguments

x

A vector. This will always be coerced to character during salting.

p

A number between 0 and 1. Percent of values in x that should be salted.

n

A positive integer. Number of times to add new values from insertions into selected values in x manually supply your own list of characters.

rep_p

A number between 0 and 1. Probability that a given match should be replaced in one of the selected values.

Details

For a more fine-grained control over how characters are added and whether , see the documentation for salt_insert, salt_substitute, salt_replace, and salt_delete.

Functions


mdlincoln/salty documentation built on May 20, 2019, 9:59 a.m.