Description Usage Arguments Details Value See Also Examples
View source: R/encode_string.R
Computes the distance matrix for a string and then applies multidimensional scaling to this distance matrix.
1 | encode_string(string, method = "osa", k = 2, ...)
|
string |
a string vector. |
method |
the name of the distance metric. |
k |
the maximum dimension of the space which the string is to be represented in. |
The method for computing distance, can be any of the string distance metrics implemented as part of the stringdist
package (see stringdist-metrics
for a list).
data.frame
1 2 | a <- c("Berlin", "Hamburg", "München", "Köln")
encode_string(a, method='cosine', k=3)
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.