Description Usage Arguments Details Value Author(s) References Examples
Given a large database of character strings to be compared, this function takes a random sample, without replacement, from the first character string, and compares it to all other string.2 characters.
1 | stringProbs(dat, N = 10)
|
dat |
A data frame with two columns. Column 1 contains the first string and column 2 contains the second. |
N |
The number of string.1 character strings to sample. |
The argument N can be equal to the total number of rows in the dataframe, but it cannot be larger.
A dataframe with the cumulative probability of each normalized edit distance data
Harold C. Doran
See Levenshtein documention distributed with this package
1 2 3 4 5 | dat <- data.frame(fname1 = c('Joseph McCall', 'Paul Jones', 'Larry Everett', 'Sam Thompson', 'Sally Fields', 'Doug Carter', 'Bill Friendly', 'Tom Davison', 'Frank Mann', 'Mary Jones'),
fname2 = c('Joe McCall', 'Paul Jones', 'Barry Everett', 'Samuel Thompson', 'Sally Fields', 'Douglas Carter', 'William Friend', 'Tommy Davison', 'Franklin Mann', 'Cary Jones'))
## Randomly sample five names from the data.
stringProbs(dat, N=5)
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.