Description Usage Arguments Details Value References Examples
View source: R/con_levenshtein_holland.R
The function computes the location-weighted, cost-sensitive (referring to the hexagon relationships) Levenshtein distance (Levenshtein, 1966) see also Needleman & Wunsch (1970).
1 | con_levenshtein_holland(a, b, costs = "hexa", weights = c(1.5, 1.25, 1))
|
a |
a character vector with person Holland codes. |
b |
a character vector with environment Holland codes. |
costs |
character with default set to |
weights |
a numeric vector with length equal to |
The function finds the distance according to Levenshtein (1966) between two sequences (see Abbott, 1995), which are the Holland codes given in argument a, which is the person code, and argument b, which is the environment code. Computational details can be found in Needleman & Wunsch, (1970).
a numeric with value for congruence.
Holland, J.L. 1963. A theory of vocational choice. I. Vocational images and choice. Vocational Guidance Quarterly, 11(4), 232–239.
Levenshtein, V. I. (1966). Binary Codes Capable of Correcting Deletions, Insertions and Reversals. Soviet Physics Doklady, 10, 707.
Abbott, A. (1995, August). Sequence Analysis: New Methods for Old Ideas. Annual Review of Sociology, 21, 93–113.
Needleman, S. B., & Wunsch, C. D. (1970). A general method applicable to the search for similarities in the amino acid sequence of two proteins. Journal of Molecular Biology, 48(3), 443–453. http://doi.org/10.1016/0022-2836(70)90057-4
1 2 3 4 5 | con_levenshtein_holland(a="RIA",b="SEC") # max. difference
con_levenshtein_holland(a="RIA",b="RIA") # max. similarity
# with 6 characters in Holland-code
w <- c(1.5,1.25,1,0.75,0.5,0.25)
con_levenshtein_holland(a="RIASEC",b="SECRIA", weights=w) # max. difference
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.