check_cost_defined {lingdist} | R Documentation |
Check whether there's missing characters in the cost matrix.
Description
Check whether there's missing characters in the cost matrix and return the missing characters.
Usage
check_cost_defined(data, cost_mat, delim = "")
Arguments
data |
DataFrame to be computed. |
cost_mat |
Cost matrix to be checked. |
delim |
The delimiter separating atomic symbols. |
Value
A string vector containing the missing characters, empty indicating there's no missing characters.
Examples
df <- as.data.frame(rbind(a=c("a_bc_d","d_bc_a"),b=c("b_bc_d","d_bc_a")))
cost.mat <- data.frame()
chars.not.found <- check_cost_defined(df, cost.mat, "_")
[Package lingdist version 1.0 Index]